From c1b8a9508b7f99d0c4f1d785f0c1c191d13ef91a Mon Sep 17 00:00:00 2001 From: Salzkorn Date: Thu, 5 Oct 2023 20:13:02 +0200 Subject: [PATCH 1/2] Fix upgrades from completed missions --- worlds/sc2/Client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worlds/sc2/Client.py b/worlds/sc2/Client.py index 42196d0c0b4d..849a73d8cc7a 100644 --- a/worlds/sc2/Client.py +++ b/worlds/sc2/Client.py @@ -484,7 +484,7 @@ def calculate_items(ctx: SC2Context) -> typing.Dict[SC2Race, typing.List[int]]: # Upgrades from completed missions if ctx.generic_upgrade_missions > 0: - for race in SC2Race: + for race in (SC2Race.TERRAN, SC2Race.ZERG): upgrade_flaggroup = type_flaggroups[race]["Upgrade"] num_missions = ctx.generic_upgrade_missions * len(ctx.mission_req_table) amounts = [ From 984501fd6f6594d40e9202822c4f10cc0979628f Mon Sep 17 00:00:00 2001 From: Salzkorn Date: Thu, 5 Oct 2023 20:41:28 +0200 Subject: [PATCH 2/2] Requested change --- worlds/sc2/Client.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/worlds/sc2/Client.py b/worlds/sc2/Client.py index 849a73d8cc7a..2e2b4f799b38 100644 --- a/worlds/sc2/Client.py +++ b/worlds/sc2/Client.py @@ -484,7 +484,9 @@ def calculate_items(ctx: SC2Context) -> typing.Dict[SC2Race, typing.List[int]]: # Upgrades from completed missions if ctx.generic_upgrade_missions > 0: - for race in (SC2Race.TERRAN, SC2Race.ZERG): + for race in SC2Race: + if "Upgrade" not in type_flaggroups[race]: + continue upgrade_flaggroup = type_flaggroups[race]["Upgrade"] num_missions = ctx.generic_upgrade_missions * len(ctx.mission_req_table) amounts = [