* Returns the ratio between the amount of damage this * craft can take and the total it can take before it's * destroyed. * @return Percentage of damage. */
| 550 | * @return Percentage of damage. |
| 551 | */ |
| 552 | int Craft::getDamagePercentage() const |
| 553 | { |
| 554 | return (int)floor((double)_damage / _rules->getMaxDamage() * 100); |
| 555 | } |
| 556 | |
| 557 | /** |
| 558 | * Returns whether the craft is currently low on fuel |
no test coverage detected