--------------------------------------------- GROUND WEAPON DAMAGE COOLDOWN ------------------------------
| 80 | } |
| 81 | //--------------------------------------------- GROUND WEAPON DAMAGE COOLDOWN ------------------------------ |
| 82 | int 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 ------------------------------------------------------ |
| 95 | int PlayerInterface::armor(UnitType unit) const |
| 96 | { |
no test coverage detected