Skip to content

Commit

Permalink
requested change
Browse files Browse the repository at this point in the history
  • Loading branch information
EnvyDragon committed May 15, 2024
1 parent 985b0db commit bacd3c2
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions worlds/sc2/Client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit bacd3c2

Please sign in to comment.