Overcharges the robot, resetting the robot's cooldowns. The robot must be on the same team as you. NoSuchUnit - either unit does not exist (inside the vision range). TeamNotAllowed - either robot is not on the current player's team. UnitNotOnMap - the healer is not on the map. InappropriateUnitType - the unit is not a healer, or the target is not a robot. ResearchNotUnlocked - you do not have the
(&mut self, healer_id: UnitID, robot_id: UnitID)
| 1741 | /// * OutOfRange - the target does not lie within ability range of the healer. |
| 1742 | /// * Overheated - the healer is not ready to use overcharge again. |
| 1743 | pub fn overcharge(&mut self, healer_id: UnitID, robot_id: UnitID) |
| 1744 | -> Result<(), GameError> { |
| 1745 | self.ok_if_can_overcharge(healer_id, robot_id)?; |
| 1746 | self.ok_if_overcharge_ready(healer_id)?; |
| 1747 | self.my_unit_mut(healer_id)?.overcharge(); |
| 1748 | self.my_unit_mut(robot_id)?.be_overcharged(); |
| 1749 | Ok(()) |
| 1750 | } |
| 1751 | |
| 1752 | // ************************************************************************ |
| 1753 | // ************************* STRUCTURE METHODS **************************** |
no test coverage detected