Work around for json patch - split out bow limit into a separate patch so that it can be overridden properly.

This commit is contained in:
compiling 2019-12-08 12:41:28 +11:00
parent f8628337bb
commit 6b97cebec5
1 changed files with 4 additions and 2 deletions

6
Rom.py
View File

@ -662,8 +662,10 @@ def patch_rom(world, player, rom):
[difficulty.progressive_sword_limit, overflow_replacement,
difficulty.progressive_shield_limit, overflow_replacement,
difficulty.progressive_armor_limit, overflow_replacement,
difficulty.progressive_bottle_limit, overflow_replacement,
difficulty.progressive_bow_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])
if difficulty.progressive_bow_limit < 2 and world.swords == 'swordless':
rom.write_bytes(0x180098, [2, overflow_replacement])