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

sc2: Fixing mission levels not counting towards the level 35 threshold #3109

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
6 changes: 3 additions & 3 deletions worlds/sc2/Client.py
Original file line number Diff line number Diff line change
Expand Up @@ -957,13 +957,13 @@ def caclulate_soa_options(ctx: SC2Context) -> int:

return options

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

async def updateZergTech(self, current_items, kerrigan_level):
zerg_items = current_items[SC2Race.ZERG]
kerrigan_primal_by_items = kerrigan_primal(self.ctx, current_items)
kerrigan_primal_by_items = kerrigan_primal(self.ctx, kerrigan_level)
kerrigan_primal_bot_value = 1 if kerrigan_primal_by_items else 0
await self.chat_send("?GiveZergTech {} {} {} {} {} {} {} {} {} {} {} {}".format(
kerrigan_level, kerrigan_primal_bot_value, zerg_items[0], zerg_items[1], zerg_items[2],
Expand Down
Loading