Skip to content

Commit d7a944f

Browse files
authored
Merge pull request #2 from Magnemania/sc2wol-extended-units-logic
Mission-specific logic for new units
2 parents b114629 + 58feece commit d7a944f

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

worlds/sc2wol/LogicMixin.py

+11-4
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def _sc2wol_defense_rating(self, multiworld: MultiWorld, player: int, zerg_enemy
3434
if self.has_all({'Siege Tank', 'Maelstrom Rounds (Siege Tank)'}, player):
3535
defense_score += 2
3636
if self.has_all({'Widow Mine', 'Concealment (Widow Mine)'}, player):
37-
defense_score += 2
37+
defense_score += 1
3838
if zerg_enemy:
3939
defense_score += sum((zerg_defense_ratings[item] for item in zerg_defense_ratings if self.has(item, player)))
4040
if self.has('Firebat', player) and self.has('Bunker', player):
@@ -54,8 +54,15 @@ def _sc2wol_has_competent_comp(self, multiworld: MultiWorld, player: int) -> boo
5454
self.has('Siege Tank', player) and self._sc2wol_has_competent_anti_air(multiworld, player)
5555

5656
def _sc2wol_has_train_killers(self, multiworld: MultiWorld, player: int) -> bool:
57-
return (self.has_any({'Siege Tank', 'Diamondback', 'Marauder'}, player) or get_option_value(multiworld, player, 'required_tactics') > 0
58-
and self.has_all({'Reaper', "G-4 Clusterbomb"}, player) or self.has_all({'Spectre', 'Psionic Lash'}, player))
57+
return (
58+
self.has_any({'Siege Tank', 'Diamondback', 'Marauder', 'Cyclone'}, player)
59+
or get_option_value(multiworld, player, 'required_tactics') > 0
60+
and (
61+
self.has_all({'Reaper', "G-4 Clusterbomb"}, player)
62+
or self.has_all({'Spectre', 'Psionic Lash'}, player)
63+
or self.has_any({'Vulture', 'Liberator'}, player)
64+
)
65+
)
5966

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

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

0 commit comments

Comments
 (0)