Skip to content

Commit

Permalink
Keymasters Keep, update to Advance Wars Days of Ruin (#20)
Browse files Browse the repository at this point in the history
- Add optional objective to rank up a random combat capable unit
- Correct freeplay 2p maps to not include 3p and 4p maps as there is no way to play these maps with less than the amount of players they are made for

Co-authored-by: Dragion147 <[email protected]>
  • Loading branch information
Dragion147 and Dragion147 authored Jan 5, 2025
1 parent dabe936 commit 62893e0
Showing 1 changed file with 33 additions and 3 deletions.
36 changes: 33 additions & 3 deletions worlds/keymasters_keep/games/advance_wars_days_of_ruin_game.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ def optional_game_constraint_templates(self) -> List[GameObjectiveTemplate]:
"TERRAIN": (self.freeplay_terrain, 1),
},
),
GameObjectiveTemplate(
label="Promote 5x UNIT to V Rank and have them survive, Commander unit does not count",
data={
"UNIT": (self.units_combat, 1),
},
),
]

def game_objective_templates(self) -> List[GameObjectiveTemplate]:
Expand Down Expand Up @@ -361,8 +367,6 @@ def maps_freeplay_2p(self) -> List[str]:
return sorted(
self.maps_classic
+ self.maps_2p
+ self.maps_3p
+ self.maps_4p
+ self.maps_trials_2p
)

Expand Down Expand Up @@ -403,6 +407,33 @@ def maps_campaign() -> List[str]:
"C26 - Sunrise",
]

@staticmethod
def units_combat() -> List[str]:
return [
"Infantry",
"Mech",
"Bike",
"Recon",
"Anti-Air",
"Tank",
"Medium Tank",
"War Tank",
"Artillery",
"Anti-Tank",
"Rockets",
"Missiles",
"Fighter",
"Bomber",
"Duster",
"B Copter",
"Seaplane",
"Battleship",
"Carrier",
"Submarine",
"Cruiser",
"Gunboat",
]

@staticmethod
def units_airfield() -> List[str]:
return [
Expand Down Expand Up @@ -436,7 +467,6 @@ def units_factory() -> List[str]:
def units_port() -> List[str]:
return [
"Battleship",
"Carrier",
"Submarine",
"Cruiser",
"Lander",
Expand Down

0 comments on commit 62893e0

Please sign in to comment.