(&mut self)
| 1570 | } |
| 1571 | |
| 1572 | fn process_rangers(&mut self) { |
| 1573 | let team = self.team(); |
| 1574 | let mut targets: Vec<(MapLocation, i32, UnitID)> = vec![]; |
| 1575 | |
| 1576 | for unit in self.my_planet_mut().units.values_mut() { |
| 1577 | if unit.team() == team && unit.unit_type() == UnitType::Ranger { |
| 1578 | let target = unit.process_snipe(); |
| 1579 | if let Some(target) = target { |
| 1580 | targets.push((target, unit.damage().unwrap(), unit.id())); |
| 1581 | } |
| 1582 | } |
| 1583 | } |
| 1584 | |
| 1585 | for (target, damage, id) in targets { |
| 1586 | self.damage_location(target, damage); |
| 1587 | self.viewer_changes.push(ViewerDelta::RangerSnipe { |
| 1588 | ranger_id: id, |
| 1589 | target_location: target |
| 1590 | }); |
| 1591 | } |
| 1592 | } |
| 1593 | |
| 1594 | // ************************************************************************ |
| 1595 | // **************************** MAGE METHODS ****************************** |
no test coverage detected