Improve prioritization of garrison targeting.

Garrison groups should be preferred with the following priority:

1. Groups blocking base capture
2. Groups at bases connected to an active front line
3. Rear guard units

Previously they were being prioritized based on the distance to the
closest friendy control point, which is similar to this but an
aggressively placed carrier could throw it off.
This commit is contained in:
Dan Albert
2021-07-12 16:59:49 -07:00
parent cd558daf5a
commit 7e4390d743
5 changed files with 70 additions and 14 deletions

View File

@@ -65,14 +65,6 @@ class ObjectiveFinder:
yield ground_object
def threatening_vehicle_groups(self) -> Iterator[VehicleGroupGroundObject]:
"""Iterates over enemy vehicle groups near friendly control points.
Groups are sorted by their closest proximity to any friendly control
point (airfield or fleet).
"""
return self._targets_by_range(self.enemy_vehicle_groups())
def enemy_ships(self) -> Iterator[NavalGroundObject]:
for cp in self.enemy_control_points():
for ground_object in cp.ground_objects: