(&self, knight_id: UnitID, target_id: UnitID)
| 1470 | // ************************************************************************ |
| 1471 | |
| 1472 | fn ok_if_can_javelin(&self, knight_id: UnitID, target_id: UnitID) -> Result<(), GameError> { |
| 1473 | let knight = self.my_unit(knight_id)?; |
| 1474 | let target = self.unit(target_id)?; |
| 1475 | knight.ok_if_on_map()?; |
| 1476 | knight.ok_if_javelin_unlocked()?; |
| 1477 | knight.ok_if_within_ability_range(target.location())?; |
| 1478 | Ok(()) |
| 1479 | } |
| 1480 | |
| 1481 | /// Whether the knight can javelin the given robot, without taking into |
| 1482 | /// account the knight's ability heat. Takes into account only the knight's |
no test coverage detected