From 21857bd13dad2bb6965fae179cb60da26ea7e652 Mon Sep 17 00:00:00 2001 From: EnvyDragon <138727357+EnvyDragon@users.noreply.github.com> Date: Wed, 15 May 2024 09:27:20 -0400 Subject: [PATCH 1/3] SC2: Tagging Guardian Shell as SoA passive --- worlds/sc2/Items.py | 1 + 1 file changed, 1 insertion(+) diff --git a/worlds/sc2/Items.py b/worlds/sc2/Items.py index 1e193dd80473..30089fcb6fab 100644 --- a/worlds/sc2/Items.py +++ b/worlds/sc2/Items.py @@ -1853,6 +1853,7 @@ def get_basic_units(world: 'SC2World', race: SC2Race) -> typing.Set[str]: spear_of_adun_castable_passives = { ItemNames.RECONSTRUCTION_BEAM, ItemNames.OVERWATCH, + ItemNames.GUARDIAN_SHELL, } nova_equipment = { From 985b0db1b6ec2b1293ab1ca124e1c81fdcf0dd22 Mon Sep 17 00:00:00 2001 From: EnvyDragon <138727357+EnvyDragon@users.noreply.github.com> Date: Wed, 15 May 2024 14:33:19 -0400 Subject: [PATCH 2/3] compat for slot version 3 --- worlds/sc2/Client.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/worlds/sc2/Client.py b/worlds/sc2/Client.py index c22b65e02ebf..221eedc1ef85 100644 --- a/worlds/sc2/Client.py +++ b/worlds/sc2/Client.py @@ -833,6 +833,11 @@ def calculate_items(ctx: SC2Context) -> typing.Dict[SC2Race, typing.List[int]]: if item_data.quantity == 1: accumulators[item_data.race][item_data.type.flag_word] |= 1 << item_data.number + # Guardian Shell breaks without SoA on version 4+, but can be generated without SoA on version 3 + if ctx.slot_data_version < 4 and name == ItemNames.GUARDIAN_SHELL \ + and ctx.spear_of_adun_autonomously_cast_ability_presence != SpearOfAdunAutonomouslyCastAbilityPresence.option_everywhere: + ctx.spear_of_adun_autonomously_cast_ability_presence = SpearOfAdunAutonomouslyCastAbilityPresence.option_protoss + # exists multiple times elif item_data.quantity > 1: flaggroup = item_data.type.flag_word From bacd3c270b4ba58b17dcb07ea523930c39f8dccf Mon Sep 17 00:00:00 2001 From: EnvyDragon <138727357+EnvyDragon@users.noreply.github.com> Date: Wed, 15 May 2024 17:33:41 -0400 Subject: [PATCH 3/3] requested change --- worlds/sc2/Client.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/worlds/sc2/Client.py b/worlds/sc2/Client.py index 221eedc1ef85..ea7946d44c73 100644 --- a/worlds/sc2/Client.py +++ b/worlds/sc2/Client.py @@ -833,11 +833,6 @@ def calculate_items(ctx: SC2Context) -> typing.Dict[SC2Race, typing.List[int]]: if item_data.quantity == 1: accumulators[item_data.race][item_data.type.flag_word] |= 1 << item_data.number - # Guardian Shell breaks without SoA on version 4+, but can be generated without SoA on version 3 - if ctx.slot_data_version < 4 and name == ItemNames.GUARDIAN_SHELL \ - and ctx.spear_of_adun_autonomously_cast_ability_presence != SpearOfAdunAutonomouslyCastAbilityPresence.option_everywhere: - ctx.spear_of_adun_autonomously_cast_ability_presence = SpearOfAdunAutonomouslyCastAbilityPresence.option_protoss - # exists multiple times elif item_data.quantity > 1: flaggroup = item_data.type.flag_word @@ -974,6 +969,9 @@ def caclulate_soa_options(ctx: SC2Context) -> int: soa_autocasts_presence_value = 2 elif ctx.spear_of_adun_autonomously_cast_ability_presence == SpearOfAdunAutonomouslyCastAbilityPresence.option_everywhere: soa_autocasts_presence_value = 3 + # Guardian Shell breaks without SoA on version 4+, but can be generated without SoA on version 3 + if ctx.slow_data_version < 4 and soa_autocasts_presence_value < 2: + soa_autocasts_presence_value = 2 options |= soa_autocasts_presence_value << 3 # Bit 5