Changed garrison terminology to battle position. (#2352)

This commit is contained in:
SnappyComebacks
2022-07-26 22:41:45 -06:00
committed by GitHub
parent 2ecb3506b5
commit 2bd39bd9f5
9 changed files with 46 additions and 44 deletions

View File

@@ -11,5 +11,5 @@ class AttackAirInfrastructure(CompoundTask[TheaterState]):
aircraft_cold_start: bool
def each_valid_method(self, state: TheaterState) -> Iterator[Method[TheaterState]]:
for garrison in state.oca_targets:
yield [PlanOcaStrike(garrison, self.aircraft_cold_start)]
for battle_position in state.oca_targets:
yield [PlanOcaStrike(battle_position, self.aircraft_cold_start)]

View File

@@ -5,8 +5,8 @@ from game.commander.theaterstate import TheaterState
from game.htn import CompoundTask, Method
class AttackGarrisons(CompoundTask[TheaterState]):
class AttackBattlePositions(CompoundTask[TheaterState]):
def each_valid_method(self, state: TheaterState) -> Iterator[Method[TheaterState]]:
for garrisons in state.enemy_garrisons.values():
for garrison in garrisons.in_priority_order:
yield [PlanBai(garrison)]
for battle_positions in state.enemy_battle_positions.values():
for battle_position in battle_positions.in_priority_order:
yield [PlanBai(battle_position)]

View File

@@ -5,7 +5,7 @@ from game.commander.tasks.compound.attackairinfrastructure import (
AttackAirInfrastructure,
)
from game.commander.tasks.compound.attackbuildings import AttackBuildings
from game.commander.tasks.compound.attackgarrisons import AttackGarrisons
from game.commander.tasks.compound.attackbattlepositions import AttackBattlePositions
from game.commander.tasks.compound.capturebases import CaptureBases
from game.commander.tasks.compound.defendbases import DefendBases
from game.commander.tasks.compound.degradeiads import DegradeIads
@@ -28,7 +28,7 @@ class PlanNextAction(CompoundTask[TheaterState]):
yield [CaptureBases()]
yield [DefendBases()]
yield [InterdictReinforcements()]
yield [AttackGarrisons()]
yield [AttackBattlePositions()]
yield [AttackAirInfrastructure(self.aircraft_cold_start)]
yield [AttackBuildings()]
yield [DegradeIads()]