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

Method getMaxShield

game/state/shared/agent.cpp:1416–1428  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1414int Agent::getHealth() const { return modified_stats.health; }
1415
1416int Agent::getMaxShield(GameState &state) const
1417{
1418 int maxShield = 0;
1419
1420 for (auto &e : equipment)
1421 {
1422 if (e->type->type != AEquipmentType::Type::DisruptorShield || !e->canBeUsed(state))
1423 continue;
1424 maxShield += e->type->max_ammo;
1425 }
1426
1427 return maxShield;
1428}
1429
1430int Agent::getShield(GameState &state) const
1431{

Callers

nothing calls this directly

Calls 1

canBeUsedMethod · 0.45

Tested by

no test coverage detected