MCPcopy Create free account
hub / github.com/bwapi/bwapi / armor

Method armor

bwapi/BWAPILIB/Source/Player.cpp:95–104  ·  view source on GitHub ↗

--------------------------------------------- ARMOR ------------------------------------------------------

Source from the content-addressed store, hash-verified

93}
94//--------------------------------------------- ARMOR ------------------------------------------------------
95int PlayerInterface::armor(UnitType unit) const
96{
97 int armor = unit.armor();
98 armor += getUpgradeLevel(unit.armorUpgrade());
99 if ( unit == UnitTypes::Zerg_Ultralisk && getUpgradeLevel(UpgradeTypes::Chitinous_Plating) > 0 )
100 armor += 2;
101 else if ( unit == UnitTypes::Hero_Torrasque )
102 armor += 2;
103 return armor;
104}
105//-------------------------------------------- DAMAGE ------------------------------------------------------
106int PlayerInterface::damage(WeaponType wpn) const
107{

Callers 3

writeUnitInfoFunction · 0.45
getDamageFromImplFunction · 0.45
Filters.cppFile · 0.45

Calls 1

armorUpgradeMethod · 0.80

Tested by

no test coverage detected