* 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. */
| 51 | * @param node Pointer to the node the unit originates from. |
| 52 | */ |
| 53 | AlienBAIState::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. |
nothing calls this directly
no test coverage detected