| 1479 | bool BattleUnit::isCloaked() const { return cloakTicksAccumulated >= CLOAK_TICKS_REQUIRED_UNIT; } |
| 1480 | |
| 1481 | AIType BattleUnit::getAIType() const |
| 1482 | { |
| 1483 | switch (moraleState) |
| 1484 | { |
| 1485 | case MoraleState::Normal: |
| 1486 | return agent->type->aiType; |
| 1487 | case MoraleState::PanicFreeze: |
| 1488 | return AIType::PanicFreeze; |
| 1489 | case MoraleState::PanicRun: |
| 1490 | return AIType::PanicRun; |
| 1491 | case MoraleState::Berserk: |
| 1492 | return AIType::Berserk; |
| 1493 | } |
| 1494 | LogError("Unhandled morale state in getAIType()"); |
| 1495 | return AIType::None; |
| 1496 | } |
| 1497 | |
| 1498 | bool BattleUnit::canFly() const |
| 1499 | { |
no outgoing calls
no test coverage detected