Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mission-specific logic for new units #2

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions worlds/sc2wol/LogicMixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def _sc2wol_defense_rating(self, multiworld: MultiWorld, player: int, zerg_enemy
if self.has_all({'Siege Tank', 'Maelstrom Rounds (Siege Tank)'}, player):
defense_score += 2
if self.has_all({'Widow Mine', 'Concealment (Widow Mine)'}, player):
defense_score += 2
defense_score += 1
if zerg_enemy:
defense_score += sum((zerg_defense_ratings[item] for item in zerg_defense_ratings if self.has(item, player)))
if self.has('Firebat', player) and self.has('Bunker', player):
Expand All @@ -54,8 +54,15 @@ def _sc2wol_has_competent_comp(self, multiworld: MultiWorld, player: int) -> boo
self.has('Siege Tank', player) and self._sc2wol_has_competent_anti_air(multiworld, player)

def _sc2wol_has_train_killers(self, multiworld: MultiWorld, player: int) -> bool:
return (self.has_any({'Siege Tank', 'Diamondback', 'Marauder'}, player) or get_option_value(multiworld, player, 'required_tactics') > 0
and self.has_all({'Reaper', "G-4 Clusterbomb"}, player) or self.has_all({'Spectre', 'Psionic Lash'}, player))
return (
self.has_any({'Siege Tank', 'Diamondback', 'Marauder', 'Cyclone'}, player)
or get_option_value(multiworld, player, 'required_tactics') > 0
and (
self.has_all({'Reaper', "G-4 Clusterbomb"}, player)
or self.has_all({'Spectre', 'Psionic Lash'}, player)
or self.has_any({'Vulture', 'Liberator'}, player)
)
)

def _sc2wol_able_to_rescue(self, multiworld: MultiWorld, player: int) -> bool:
return self.has_any({'Medivac', 'Hercules', 'Raven', 'Viking'}, player) or get_option_value(multiworld, player, 'required_tactics') > 0
Expand Down Expand Up @@ -97,7 +104,7 @@ def _sc2wol_final_mission_requirements(self, multiworld: MultiWorld, player: int
# Air
defense_rating = self._sc2wol_defense_rating(multiworld, player, True, True)
return defense_rating >= 8 and beats_kerrigan \
and self.has_any({'Viking', 'Battlecruiser'}, player) \
and self.has_any({'Viking', 'Battlecruiser', 'Valkyrie'}, player) \
and self.has_any({'Hive Mind Emulator', 'Psi Disruptor', 'Missile Turret'}, player)

def _sc2wol_cleared_missions(self, multiworld: MultiWorld, player: int, mission_count: int) -> bool:
Expand Down