(&self, mage_id: UnitID, location: MapLocation)
| 1596 | // ************************************************************************ |
| 1597 | |
| 1598 | fn ok_if_can_blink(&self, mage_id: UnitID, location: MapLocation) -> Result<(), GameError> { |
| 1599 | let mage = self.my_unit(mage_id)?; |
| 1600 | mage.ok_if_on_map()?; |
| 1601 | mage.ok_if_blink_unlocked()?; |
| 1602 | mage.ok_if_within_ability_range(OnMap(location))?; |
| 1603 | if !self.is_occupiable(location)? { |
| 1604 | Err(GameError::LocationNotEmpty)?; |
| 1605 | } |
| 1606 | Ok(()) |
| 1607 | } |
| 1608 | |
| 1609 | /// Whether the mage can blink to the given location, without taking into |
| 1610 | /// account the mage's ability heat. Takes into account only the mage's |
no test coverage detected