Increases the unit's current health by the given amount, without healing beyond the unit's maximum health. Returns true if unit is healed to max.
(&mut self, heal_amount: u32)
| 554 | /// Increases the unit's current health by the given amount, without healing |
| 555 | /// beyond the unit's maximum health. Returns true if unit is healed to max. |
| 556 | pub(crate) fn be_healed(&mut self, heal_amount: u32) -> bool { |
| 557 | self.health = cmp::min(self.health + heal_amount, self.max_health); |
| 558 | self.health == self.max_health |
| 559 | } |
| 560 | |
| 561 | // ************************************************************************ |
| 562 | // *************************** ABILITY METHODS ***************************** |
no outgoing calls
no test coverage detected