Update item counter for mystery

Fixed bug with door restart
Made retro keys more lenient with door shuffle
This commit is contained in:
aerinon
2021-02-13 20:58:59 -07:00
parent 2765f9bec0
commit 2caf5abe4a
6 changed files with 28 additions and 9 deletions

8
Rom.py
View File

@@ -525,7 +525,8 @@ class Sprite(object):
# split into palettes of 15 colors
return array_chunk(palette_as_colors, 15)
def patch_rom(world, rom, player, team, enemized):
def patch_rom(world, rom, player, team, enemized, is_mystery=False):
random.seed(world.rom_seeds[player])
# progressive bow silver arrow hint hack
@@ -714,7 +715,10 @@ def patch_rom(world, rom, player, team, enemized):
rom.write_byte(0x13f000+dungeon_id, opposite_door.roomIndex)
elif not opposite_door:
rom.write_byte(0x13f000+dungeon_id, 0) # no supertile preceeding boss
rom.write_byte(0x138004, dr_flags.value)
if is_mystery:
dr_flags |= DROptions.Hide_Total
rom.write_byte(0x138004, dr_flags.value & 0xff)
rom.write_byte(0x138005, (dr_flags.value & 0xff00) >> 8)
if dr_flags & DROptions.Town_Portal and world.mode[player] == 'inverted':
rom.write_byte(0x138006, 1)