19 #ifndef OPENXCOM_BATTLESCAPEGAME_H 20 #define OPENXCOM_BATTLESCAPEGAME_H 32 class SavedBattleGame;
35 class BattlescapeState;
43 enum BattleActionType { BA_NONE, BA_TURN, BA_WALK, BA_PRIME, BA_THROW, BA_AUTOSHOT, BA_SNAPSHOT, BA_AIMEDSHOT, BA_STUN, BA_HIT, BA_USE, BA_LAUNCH, BA_MINDCONTROL, BA_PANIC, BA_RETHINK };
47 BattleActionType type;
51 std::list<Position> waypoints;
64 BattleAction() : type(BA_NONE), actor(0), weapon(0), TU(0), targeting(
false), value(0), result(
""), strafe(
false), run(
false), diff(0), autoShotCounter(0), cameraPosition(0, 0, -1), desperate(
false), finalFacing(-1), finalAction(
false), number(0) { }
75 std::list<BattleState*> _states, _deleted;
76 BattleActionType _tuReserved, _playerTUReserved;
77 bool _playerPanicHandled;
85 bool handlePanickingPlayer();
90 std::vector<InfoboxOKState*> _infoboxQueue;
92 void showInfoBoxQueue();
93 bool _playedAggroSound, _endTurnRequested, _kneelReserved;
104 bool playableUnitSelected();
114 void handleNonTargetAction();
118 void setStateInterval(Uint32 interval);
120 void checkForCasualties(
BattleItem *murderweapon,
BattleUnit *murderer,
bool hiddenExplosion =
false,
bool terrainExplosion =
false);
124 bool checkReservedTU(
BattleUnit *bu,
int tu,
bool justChecking =
false);
128 void dropItem(
const Position &position,
BattleItem *item,
bool newItem =
false,
bool removeItem =
false);
134 bool cancelCurrentAction(
bool bForce =
false);
140 void primaryAction(
const Position &pos);
142 void secondaryAction(
const Position &pos);
146 void psiButtonAction();
150 void requestEndTurn();
152 void setTUReserved(BattleActionType tur,
bool player);
166 const Ruleset *getRuleset()
const;
167 static bool _debugPlay;
181 BattleActionType getReservedAction();
183 void tallyUnits(
int &liveAliens,
int &liveSoldiers,
bool convert);
185 void setKneelReserved(
bool reserved);
187 bool getKneelReserved();
189 bool checkForProximityGrenades(
BattleUnit *unit);
190 void cleanupDeleted();
A utility class that modifies tile properties on a battlescape map.
Definition: TileEngine.h:40
Definition: BattlescapeGame.h:45
Represents a single item in the battlescape.
Definition: BattleItem.h:39
Set of rules and stats for a game.
Definition: Ruleset.h:69
Interactive map of the battlescape.
Definition: Map.h:46
This class sets the battlescape in a certain sub-state.
Definition: BattleState.h:34
Packs of external game media.
Definition: ResourcePack.h:50
Battlescape game - the core game engine of the battlescape game.
Definition: BattlescapeGame.h:70
A utility class that calculates the shortest path between two points on the battlescape map...
Definition: Pathfinding.h:37
The battlescape data that gets written to disk when the game is saved.
Definition: SavedBattleGame.h:50
bool getPanicHandled()
Returns whether panic has been handled.
Definition: BattlescapeGame.h:169
Easy handling of X-Y-Z coordinates.
Definition: Position.h:30
Battlescape screen which shows the tactical battle.
Definition: BattlescapeState.h:48
Represents a moving unit in the battlescape, player controlled or AI controlled it holds info about i...
Definition: BattleUnit.h:58
COPYING:
Definition: BaseInfoState.cpp:40