Ziktofel / Archipelago

Archipelago Multi-Game Randomizer and Server
https://archipelago.gg
Other
1 stars 8 forks source link

SC2: Tagging Guardian Shell as SoA passive #197

Closed EnvyDragon closed 4 months ago

EnvyDragon commented 4 months ago

What is this fixing or adding?

Related to https://github.com/Ziktofel/Archipelago-SC2-data/pull/119

Adding Guardian Shell to the list of SoA passives so that it isn't added to the pool when those passives are disabled.

Ziktofel commented 4 months ago

I think some compat code should be needed:

    # Bits 3,4
    # Autocasts
    soa_autocasts_presence_value = 0
    if ctx.spear_of_adun_autonomously_cast_ability_presence == SpearOfAdunAutonomouslyCastAbilityPresence.option_not_present:
        soa_autocasts_presence_value = 0
    elif ctx.spear_of_adun_autonomously_cast_ability_presence == SpearOfAdunAutonomouslyCastAbilityPresence.option_lotv_protoss:
        soa_autocasts_presence_value = 1
    elif ctx.spear_of_adun_autonomously_cast_ability_presence == SpearOfAdunAutonomouslyCastAbilityPresence.option_protoss:
        soa_autocasts_presence_value = 2
    elif ctx.spear_of_adun_autonomously_cast_ability_presence == SpearOfAdunAutonomouslyCastAbilityPresence.option_everywhere:
        soa_autocasts_presence_value = 3
    options |= soa_autocasts_presence_value << 3

If the slot data version is less or equal than 3 (sc2-next uses currently 4, current release 3) and the option is set to etiher option_not_present or option_lotv_protoss, act as option_protoss is used. This would prevent the item from being straight useless in some cases

EnvyDragon commented 4 months ago

If the slot data version is less or equal than 3 (sc2-next uses currently 4, current release 3) and the option is set to etiher option_not_present or option_lotv_protoss, act as option_protoss is used. This would prevent the item from being straight useless in some cases

This is for cases where a world was generated on v3, but is being played using the v4 client, right? Do we want to communicate to players in any way that their SoA settings are being overridden for a couple of maps?

On option_not_present it'll be irrelevant because the other SoA items won't exist in the world, but on option_lotv_only where LotV maps are present, it's possible that players would unintentionally end up with the two SoA autocast abilities on prophecy/prologue. It seems minor enough to ignore, but it's worth considering.

Ziktofel commented 4 months ago

The thing with this change could land in release notes

Ziktofel commented 4 months ago

and this compat code is only for this case a v3 game played with v4 client. There's already also some compat for v2 games

Ziktofel commented 4 months ago

Gotta test now the updated Guardian Shell myself

Ziktofel commented 4 months ago

Tested ingame part and looks OK, merging