mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-12-21 23:58:51 -05:00
more swordless fixes when time traveling (#3510)
This commit is contained in:
parent
ea49196bae
commit
907b770676
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user