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

Method getFirstShield

game/state/shared/agent.cpp:1339–1349  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1337}
1338
1339sp<AEquipment> Agent::getFirstShield(GameState &state) const
1340{
1341 for (auto &e : equipment)
1342 {
1343 if (e->type->type == AEquipmentType::Type::DisruptorShield && e->canBeUsed(state))
1344 {
1345 return e;
1346 }
1347 }
1348 return nullptr;
1349}
1350
1351StateRef<BattleUnitImagePack> Agent::getImagePack(BodyPart bodyPart) const
1352{

Callers 1

applyDamageMethod · 0.80

Calls 1

canBeUsedMethod · 0.45

Tested by

no test coverage detected