Skip to content

Commit ca82d3d

Browse files
MatthewMarinetsAustinSumigray
authored andcommitted
sc2: Fixing mission levels not counting towards the level 35 threshold to unlock primal kerrigan (ArchipelagoMW#3109)
1 parent b5b7268 commit ca82d3d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

worlds/sc2/Client.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -957,13 +957,13 @@ def caclulate_soa_options(ctx: SC2Context) -> int:
957957

958958
return options
959959

960-
def kerrigan_primal(ctx: SC2Context, items: typing.Dict[SC2Race, typing.List[int]]) -> bool:
960+
def kerrigan_primal(ctx: SC2Context, kerrigan_level: int) -> bool:
961961
if ctx.kerrigan_primal_status == KerriganPrimalStatus.option_always_zerg:
962962
return True
963963
elif ctx.kerrigan_primal_status == KerriganPrimalStatus.option_always_human:
964964
return False
965965
elif ctx.kerrigan_primal_status == KerriganPrimalStatus.option_level_35:
966-
return items[SC2Race.ZERG][type_flaggroups[SC2Race.ZERG]["Level"]] >= 35
966+
return kerrigan_level >= 35
967967
elif ctx.kerrigan_primal_status == KerriganPrimalStatus.option_half_completion:
968968
total_missions = len(ctx.mission_id_to_location_ids)
969969
completed = len([(mission_id * VICTORY_MODULO + get_location_offset(mission_id)) in ctx.checked_locations
@@ -1138,7 +1138,7 @@ async def updateTerranTech(self, current_items):
11381138

11391139
async def updateZergTech(self, current_items, kerrigan_level):
11401140
zerg_items = current_items[SC2Race.ZERG]
1141-
kerrigan_primal_by_items = kerrigan_primal(self.ctx, current_items)
1141+
kerrigan_primal_by_items = kerrigan_primal(self.ctx, kerrigan_level)
11421142
kerrigan_primal_bot_value = 1 if kerrigan_primal_by_items else 0
11431143
await self.chat_send("?GiveZergTech {} {} {} {} {} {} {} {} {} {} {} {}".format(
11441144
kerrigan_level, kerrigan_primal_bot_value, zerg_items[0], zerg_items[1], zerg_items[2],

0 commit comments

Comments
 (0)