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

Method weaponDamageCooldown

bwapi/BWAPILIB/Source/Player.cpp:82–93  ·  view source on GitHub ↗

--------------------------------------------- GROUND WEAPON DAMAGE COOLDOWN ------------------------------

Source from the content-addressed store, hash-verified

80}
81//--------------------------------------------- GROUND WEAPON DAMAGE COOLDOWN ------------------------------
82int PlayerInterface::weaponDamageCooldown(UnitType unit) const
83{
84 int cooldown = unit.groundWeapon().damageCooldown();
85 if (unit == UnitTypes::Zerg_Zergling && getUpgradeLevel(UpgradeTypes::Adrenal_Glands) > 0)
86 {
87 // Divide cooldown by 2
88 cooldown /= 2;
89 // Prevent cooldown from going out of bounds
90 cooldown = std::min(std::max(cooldown,5), 250);
91 }
92 return cooldown;
93}
94//--------------------------------------------- ARMOR ------------------------------------------------------
95int PlayerInterface::armor(UnitType unit) const
96{

Callers 1

Filters.cppFile · 0.80

Calls 2

damageCooldownMethod · 0.80
groundWeaponMethod · 0.80

Tested by

no test coverage detected