19 #ifndef OPENXCOM_BATTLEAISTATE_H
20 #define OPENXCOM_BATTLEAISTATE_H
22 #include <yaml-cpp/yaml.h>
27 class SavedBattleGame;
31 enum AIMode { AI_PATROL, AI_AMBUSH, AI_COMBAT, AI_ESCAPE };
46 void load(
const YAML::Node& node);
48 virtual YAML::Node
save()
const;
BattleAIState(SavedBattleGame *save, BattleUnit *unit)
Creates a new BattleAIState linked to the game and a certain unit.
Definition: BattleAIState.cpp:29
Definition: BattlescapeGame.h:45
This class is used by the BattleUnit AI.
Definition: BattleAIState.h:35
virtual void enter()
Enters the state.
Definition: BattleAIState.cpp:63
virtual void think(BattleAction *action)
Runs state functionality every AI cycle.
Definition: BattleAIState.cpp:82
virtual ~BattleAIState()
Cleans up the BattleAIState.
Definition: BattleAIState.cpp:37
virtual YAML::Node save() const
Saves the AI state to YAML.
Definition: BattleAIState.cpp:54
void load(const YAML::Node &node)
Loads the AI state from YAML.
Definition: BattleAIState.cpp:46
The battlescape data that gets written to disk when the game is saved.
Definition: SavedBattleGame.h:50
virtual void exit()
Exits the state.
Definition: BattleAIState.cpp:72
Represents a moving unit in the battlescape, player controlled or AI controlled it holds info about i...
Definition: BattleUnit.h:58