Quick Mushroom turn-in fix

This is a quick and dirty (will be replaced later) fix for having to screen transition after turning in the Mushroom, not applied in shuffles that don't move the potion shop. Also a minor fix is in place so the list of entrances that don't invoke the Skull Final etc. exit offset is expanded to include the bottom of Superbunny Cave and TR Big Chest.
This commit is contained in:
AmazingAmpharos 2018-02-11 22:25:19 -06:00 committed by GitHub
parent 3471a9394a
commit abedfd4d1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -59,6 +59,7 @@ class World(object):
self.can_take_damage = True self.can_take_damage = True
self.difficulty_requirements = None self.difficulty_requirements = None
self.fix_fake_world = True self.fix_fake_world = True
self.powder_patch_required = self.shuffle not in ['vanilla', 'dungeonssimple', 'dungeonsfull']
self.spoiler = Spoiler(self) self.spoiler = Spoiler(self)
def intialize_regions(self): def intialize_regions(self):

7
Rom.py
View File

@ -317,7 +317,8 @@ def patch_rom(world, rom, hashtable, beep='normal', sprite=None):
# todo fix screen scrolling # todo fix screen scrolling
if exit.name in ['Eastern Palace Exit', 'Tower of Hera Exit', 'Thieves Town Exit', 'Skull Woods Final Section Exit', 'Ice Palace Exit', 'Misery Mire Exit', if exit.name in ['Eastern Palace Exit', 'Tower of Hera Exit', 'Thieves Town Exit', 'Skull Woods Final Section Exit', 'Ice Palace Exit', 'Misery Mire Exit',
'Palace of Darkness Exit', 'Swamp Palace Exit', 'Ganons Tower Exit', 'Desert Palace Exit (North)', 'Agahnims Tower Exit', 'Spiral Cave Exit (Top)']: 'Palace of Darkness Exit', 'Swamp Palace Exit', 'Ganons Tower Exit', 'Desert Palace Exit (North)', 'Agahnims Tower Exit', 'Spiral Cave Exit (Top)',
'Superbunny Cave Exit (Bottom)', 'Turtle Rock Ledge Exit (East)']:
# For exits that connot be reached from another, no need to apply offset fixes. # For exits that connot be reached from another, no need to apply offset fixes.
rom.write_int16_to_rom(0x15DB5 + 2 * offset, link_y) # same as final else rom.write_int16_to_rom(0x15DB5 + 2 * offset, link_y) # same as final else
elif room_id == 0x0059 and world.fix_skullwoods_exit: elif room_id == 0x0059 and world.fix_skullwoods_exit:
@ -747,6 +748,10 @@ def patch_rom(world, rom, hashtable, beep='normal', sprite=None):
# patch swamp: Need to enable permanent drain of water as dam or swamp were moved # patch swamp: Need to enable permanent drain of water as dam or swamp were moved
rom.write_byte(0x18003D, 0x01 if world.swamp_patch_required else 0x00) rom.write_byte(0x18003D, 0x01 if world.swamp_patch_required else 0x00)
# powder patch: remove the need to leave the scrren after powder, since it causes problems for potion shop at race game
# 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])
# set correct flag for hera basement item # 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)': 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) rom.write_byte(0x4E3BB, 0xE4)