Returns OK if the unit can be overcharged. The unit must be a robot and not a healer. InappropriateUnitType - the unit is not a robot or is a healer.
(& self)
| 886 | /// |
| 887 | /// * InappropriateUnitType - the unit is not a robot or is a healer. |
| 888 | pub(crate) fn ok_if_can_be_overcharged(& self) -> Result<(), GameError> { |
| 889 | self.ok_if_robot()?; |
| 890 | if self.ok_if_unit_type(Healer).is_ok() { |
| 891 | Err(GameError::InappropriateUnitType)? |
| 892 | } |
| 893 | Ok(()) |
| 894 | } |
| 895 | |
| 896 | /// Resets a unit's move, attack, and ability cooldowns. |
| 897 | pub(crate) fn be_overcharged(&mut self) { |
no test coverage detected