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

Method canAttackUnit

game/state/battle/battleunit.cpp:951–955  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

949}
950
951WeaponStatus BattleUnit::canAttackUnit(GameState &state, sp<BattleUnit> unit)
952{
953 return canAttackUnit(state, unit, agent->getFirstItemInSlot(EquipmentSlotType::RightHand),
954 agent->getFirstItemInSlot(EquipmentSlotType::LeftHand));
955}
956
957WeaponStatus BattleUnit::canAttackUnit(GameState &state, sp<BattleUnit> unit,
958 sp<AEquipment> rightHand, sp<AEquipment> leftHand)

Callers 3

thinkMethod · 0.80
getWeaponDecisionMethod · 0.80
thinkMethod · 0.80

Calls 3

getFirstItemInSlotMethod · 0.80
canFireMethod · 0.45

Tested by

no test coverage detected