Begins the countdown to snipe a given location. Maximizes the units attack and movement heats until the ranger has sniped. The ranger may begin the countdown at any time, including resetting the countdown to snipe a different location. NoSuchUnit - either unit does not exist (inside the vision range). TeamNotAllowed - the ranger is not on the current player's team. UnitNotOnMap - the ranger is no
(&mut self, ranger_id: UnitID, location: MapLocation)
| 1562 | /// * ResearchNotUnlocked - you do not have the needed research to use snipe. |
| 1563 | /// * Overheated - the ranger is not ready to use snipe again. |
| 1564 | pub fn begin_snipe(&mut self, ranger_id: UnitID, location: MapLocation) |
| 1565 | -> Result<(), GameError> { |
| 1566 | self.ok_if_can_begin_snipe(ranger_id, location)?; |
| 1567 | self.ok_if_begin_snipe_ready(ranger_id)?; |
| 1568 | self.my_unit_mut(ranger_id).unwrap().begin_snipe(location); |
| 1569 | Ok(()) |
| 1570 | } |
| 1571 | |
| 1572 | fn process_rangers(&mut self) { |
| 1573 | let team = self.team(); |
no test coverage detected