Merged in DR v0.4.0.4

This commit is contained in:
codemann8
2021-05-24 18:16:02 -05:00
20 changed files with 193 additions and 52 deletions

21
Rom.py
View File

@@ -27,7 +27,7 @@ from EntranceShuffle import door_addresses, exit_ids
JAP10HASH = '03a63945398191337e896e5771f77173'
RANDOMIZERBASEHASH = 'a6186512f1c02acfcb8554e0538a84f9'
RANDOMIZERBASEHASH = '06e14a9760b94dc64806b401cacd4680'
class JsonRom(object):
@@ -677,6 +677,8 @@ def patch_rom(world, rom, player, team, enemized, is_mystery=False):
dr_flags |= DROptions.Rails
if world.standardize_palettes[player] == 'original':
dr_flags |= DROptions.OriginalPalettes
if world.experimental[player]:
dr_flags |= DROptions.DarkWorld_Spawns
# fix hc big key problems (map and compass too)
@@ -687,6 +689,23 @@ def patch_rom(world, rom, player, team, enemized, is_mystery=False):
rom.write_byte(0x1597b, sanctuary.dungeon.dungeon_id*2)
update_compasses(rom, world, player)
def should_be_bunny(region, mode):
if mode != 'inverted':
return region.is_dark_world and not region.is_light_world
else:
return region.is_light_world and not region.is_dark_world
# dark world spawns
sanc_region = world.get_region('Sanctuary', player)
if should_be_bunny(sanc_region, world.mode[player]):
rom.write_bytes(0x13fff2, [0x12, 0x00])
lh_name = 'Links House' if world.mode[player] != 'inverted' else 'Inverted Links House'
links_house = world.get_region(lh_name, player)
if should_be_bunny(links_house, world.mode[player]):
rom.write_bytes(0x13fff0, [0x04, 0x01])
# patch doors
if world.doorShuffle[player] == 'crossed':
rom.write_byte(0x138002, 2)