Blinks the mage to the given location. NoSuchUnit - the mage does not exist (inside the vision range). TeamNotAllowed - the mage is not on the current player's team. UnitNotOnMap - the mage is not on the map. InappropriateUnitType - the unit is not a mage. ResearchNotUnlocked - you do not have the needed research to use blink. OutOfRange - the target does not lie within ability range of the mage.
(&mut self, mage_id: UnitID, location: MapLocation)
| 1640 | /// * LocationNotEmpty - the target location is already occupied. |
| 1641 | /// * Overheated - the mage is not ready to use blink again. |
| 1642 | pub fn blink(&mut self, mage_id: UnitID, location: MapLocation) -> Result<(), GameError> { |
| 1643 | self.ok_if_can_blink(mage_id, location)?; |
| 1644 | self.ok_if_blink_ready(mage_id)?; |
| 1645 | self.remove_unit(mage_id); |
| 1646 | self.my_unit_mut(mage_id).unwrap().blink(location); |
| 1647 | self.place_unit(mage_id); |
| 1648 | Ok(()) |
| 1649 | } |
| 1650 | |
| 1651 | // ************************************************************************ |
| 1652 | // *************************** HEALER METHODS ***************************** |
no test coverage detected