From 9f7dbb394ea60be42afab668d9e8855035d14771 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Sun, 6 Feb 2022 20:11:40 +0100 Subject: [PATCH] LttP: convert overflow progressive items into highest-allowed-tier of non-progressive item --- worlds/alttp/Rom.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/worlds/alttp/Rom.py b/worlds/alttp/Rom.py index 938261e1..c6a96a36 100644 --- a/worlds/alttp/Rom.py +++ b/worlds/alttp/Rom.py @@ -1018,17 +1018,15 @@ def patch_rom(world, rom, player, enemized): # Set overflow items for progressive equipment rom.write_bytes(0x180090, [difficulty.progressive_sword_limit if not world.swordless[player] else 0, - overflow_replacement, - difficulty.progressive_shield_limit, overflow_replacement, - difficulty.progressive_armor_limit, overflow_replacement, - difficulty.progressive_bottle_limit, overflow_replacement]) - - # Work around for json patch ordering issues - write bow limit separately so that it is replaced in the patch - rom.write_bytes(0x180098, [difficulty.progressive_bow_limit, overflow_replacement]) + item_table[difficulty.basic_sword[-1]].item_code, + difficulty.progressive_shield_limit, item_table[difficulty.basic_shield[-1]].item_code, + difficulty.progressive_armor_limit, item_table[difficulty.basic_armor[-1]].item_code, + difficulty.progressive_bottle_limit, overflow_replacement, + difficulty.progressive_bow_limit, item_table[difficulty.basic_bow[-1]].item_code]) if difficulty.progressive_bow_limit < 2 and ( world.swordless[player] or world.logic[player] == 'noglitches'): - rom.write_bytes(0x180098, [2, overflow_replacement]) + rom.write_bytes(0x180098, [2, item_table["Silver Bow"].item_code]) rom.write_byte(0x180181, 0x01) # Make silver arrows work only on ganon rom.write_byte(0x180182, 0x00) # Don't auto equip silvers on pickup