diff options
| author | Adam Bird <archez39@me.com> | 2023-12-18 00:34:59 -0500 |
|---|---|---|
| committer | Adam Bird <archez39@me.com> | 2023-12-18 00:34:59 -0500 |
| commit | 03da69d7b745c4e6131555a2bfaa0c140a91f79e (patch) | |
| tree | 1a109a21f8b5271bb0274fc8e168e3a94ac45889 /soh/src/code | |
| parent | 86044a1c5071c9a0e00699939fa26946aeefbaff (diff) | |
| parent | 60faf3f750e29643ffa688b9b5fe752a9d2162c0 (diff) | |
Merge tag '8.0.4' into HEAD
MacReady Echo
Diffstat (limited to 'soh/src/code')
| -rw-r--r-- | soh/src/code/z_parameter.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/soh/src/code/z_parameter.c b/soh/src/code/z_parameter.c index 3bc7c9c6a..46a87d649 100644 --- a/soh/src/code/z_parameter.c +++ b/soh/src/code/z_parameter.c @@ -1521,6 +1521,13 @@ void Inventory_SwapAgeEquipment(void) { } } + // In Rando, when switching to adult for the second+ time, if a sword was not previously + // equiped in MS shuffle, then we need to set the swordless flag again + if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_MASTER_SWORD) && + gSaveContext.equips.buttonItems[0] == ITEM_NONE) { + Flags_SetInfTable(INFTABLE_SWORDLESS); + } + gSaveContext.equips.equipment = gSaveContext.adultEquips.equipment; } } else { @@ -1589,6 +1596,13 @@ void Inventory_SwapAgeEquipment(void) { } } + // In Rando, when switching to child from a swordless adult, and child Link previously had a + // sword equiped, then we need to unset the swordless flag to match + if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_MASTER_SWORD) && + gSaveContext.equips.buttonItems[0] != ITEM_NONE) { + Flags_UnsetInfTable(INFTABLE_SWORDLESS); + } + gSaveContext.equips.equipment = gSaveContext.childEquips.equipment; gSaveContext.equips.equipment &= (u16) ~(0xF << (EQUIP_TYPE_SWORD * 4)); gSaveContext.equips.equipment |= EQUIP_VALUE_SWORD_KOKIRI << (EQUIP_TYPE_SWORD * 4); |
