Smith multi-entrance fix

This sets the appropriate ROM flag to allow smith to enter previously multi-entrance caves.
This commit is contained in:
AmazingAmpharos 2018-02-25 00:04:41 -06:00 committed by GitHub
parent caffd7e34c
commit c26f325b0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

6
Rom.py
View File

@ -297,7 +297,7 @@ def patch_rom(world, rom, hashtable, beep='normal', sprite=None):
if world.keysanity:
rom.write_byte(0x155C9, random.choice([0x11, 0x16])) # Randomize GT music too in keysanity mode
# patch entrance/exits/holess
# patch entrance/exits/holes
for region in world.regions:
for exit in region.exits:
if exit.target is not None:
@ -753,6 +753,10 @@ def patch_rom(world, rom, hashtable, beep='normal', sprite=None):
# temporarally we are just nopping out this check we will conver this to a rom fix soon.
rom.write_bytes(0x02F539,[0xEA,0xEA,0xEA,0xEA,0xEA] if world.powder_patch_required else [0xAD, 0xBF, 0x0A, 0xF0, 0x4F])
# allow smith into multi-entrance caves in appropriate shuffles
if world.shuffle in ['restricted', 'full', 'crossed', 'insanity']:
rom.write_byte(0x18004C, 0x01)
# set correct flag for hera basement item
if world.get_location('Tower of Hera - Basement Cage').item is not None and world.get_location('Tower of Hera - Basement Cage').item.name == 'Small Key (Tower of Hera)':
rom.write_byte(0x4E3BB, 0xE4)