19 #ifndef OPENXCOM_CIVILIANBAISTATE_H
20 #define OPENXCOM_CIVILIANBAISTATE_H
22 #include "BattleAIState.h"
24 #include <yaml-cpp/yaml.h>
30 class SavedBattleGame;
42 int _escapeTUs, _AIMode, _visibleEnemies, _spottingEnemies;
45 Node *_fromNode, *_toNode;
52 void load(
const YAML::Node& node);
54 YAML::Node
save()
const;
61 int getSpottingUnits(
Position pos)
const;
62 int selectNearestTarget();
65 void evaluateAIMode();
Definition: BattlescapeGame.h:45
CivilianBAIState(SavedBattleGame *save, BattleUnit *unit, Node *node)
Creates a new BattleAIState linked to the game and a certain unit.
Definition: CivilianBAIState.cpp:43
This is the intial AI state of units, walking around and looking for intruders.
Definition: CivilianBAIState.h:37
void enter()
Enters the state.
Definition: CivilianBAIState.cpp:101
This class is used by the BattleUnit AI.
Definition: BattleAIState.h:35
YAML::Node save() const
Saves the AI state to YAML.
Definition: CivilianBAIState.cpp:83
void exit()
Exits the state.
Definition: CivilianBAIState.cpp:109
void think(BattleAction *action)
Runs state functionality every AI cycle.
Definition: CivilianBAIState.cpp:118
void load(const YAML::Node &node)
Loads the AI state from YAML.
Definition: CivilianBAIState.cpp:63
~CivilianBAIState()
Cleans up the BattleAIState.
Definition: CivilianBAIState.cpp:53
The battlescape data that gets written to disk when the game is saved.
Definition: SavedBattleGame.h:50
Represents a node/spawnpoint in the battlescape, loaded from RMP files.
Definition: Node.h:34
Easy handling of X-Y-Z coordinates.
Definition: Position.h:30
Represents a moving unit in the battlescape, player controlled or AI controlled it holds info about i...
Definition: BattleUnit.h:58