MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / getType

Method getType

game/state/battle/battleunit.cpp:1448–1472  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1446}
1447
1448BattleUnitType BattleUnit::getType() const
1449{
1450 if (isLarge())
1451 {
1452 if (canFly())
1453 {
1454 return BattleUnitType::LargeFlyer;
1455 }
1456 else
1457 {
1458 return BattleUnitType::LargeWalker;
1459 }
1460 }
1461 else
1462 {
1463 if (canFly())
1464 {
1465 return BattleUnitType::SmallFlyer;
1466 }
1467 else
1468 {
1469 return BattleUnitType::SmallWalker;
1470 }
1471 }
1472}
1473
1474bool BattleUnit::isAIControlled(GameState &state) const
1475{

Callers 12

expandMethod · 0.45
applyEffectMethod · 0.45
dieMethod · 0.45
damageMethod · 0.45
expandMethod · 0.45
updateMethod · 0.45
initialMapPartRemovalMethod · 0.45
placeHazardMethod · 0.45
updateProjectilesMethod · 0.45
updateMovementFallingMethod · 0.45
thinkMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected