MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / AlienBAIState

Method AlienBAIState

src/Battlescape/AlienBAIState.cpp:53–65  ·  view source on GitHub ↗

* Sets up a BattleAIState. * @param save Pointer to the battle game. * @param unit Pointer to the unit. * @param node Pointer to the node the unit originates from. */

Source from the content-addressed store, hash-verified

51 * @param node Pointer to the node the unit originates from.
52 */
53AlienBAIState::AlienBAIState(SavedBattleGame *save, BattleUnit *unit, Node *node) : BattleAIState(save, unit), _aggroTarget(0), _knownEnemies(0), _visibleEnemies(0), _spottingEnemies(0),
54 _escapeTUs(0), _ambushTUs(0), _reserveTUs(0), _rifle(false), _melee(false), _blaster(false),
55 _wasHit(false), _didPsi(false), _AIMode(AI_PATROL), _closestDist(100), _fromNode(node), _toNode(0)
56{
57 _traceAI = Options::traceAI;
58
59 _intelligence = _unit->getIntelligence();
60 _escapeAction = new BattleAction();
61 _ambushAction = new BattleAction();
62 _attackAction = new BattleAction();
63 _patrolAction = new BattleAction();
64 _psiAction = new BattleAction();
65}
66
67/**
68 * Deletes the BattleAIState.

Callers

nothing calls this directly

Calls 1

getIntelligenceMethod · 0.45

Tested by

no test coverage detected