Merged DR 0.4.0.6

This commit is contained in:
codemann8
2021-06-04 21:58:27 -05:00
20 changed files with 171 additions and 98 deletions

21
Rom.py
View File

@@ -27,7 +27,7 @@ from EntranceShuffle import door_addresses, exit_ids
JAP10HASH = '03a63945398191337e896e5771f77173'
RANDOMIZERBASEHASH = 'e5d8410de046832272951f3e6b4fade2'
RANDOMIZERBASEHASH = '2f83a44f0ac2720b489d50bfa8e56837'
class JsonRom(object):
@@ -716,6 +716,9 @@ def patch_rom(world, rom, player, team, enemized, is_mystery=False):
if should_be_bunny(links_house, world.mode[player]):
rom.write_bytes(0x13fff0, [0x04, 0x01])
old_man_house = world.get_region('Old Man House', player)
if should_be_bunny(old_man_house, world.mode[player]):
rom.write_bytes(0x13fff4, [0xe4, 0x00])
# patch doors
if world.doorShuffle[player] == 'crossed':
@@ -1633,6 +1636,9 @@ def write_custom_shops(rom, world, player):
loc_item = world.get_location(retro_shops[shop.region.name][index], player).item
else:
loc_item = ItemFactory(item['item'], player)
if (not world.shopsanity[player] and shop.region.name == 'Capacity Upgrade'
and world.difficulty[player] != 'normal'):
continue # skip cap upgrades except in normal/shopsanity
item_id = loc_item.code
price = int16_as_bytes(item['price'])
replace = ItemFactory(item['replacement'], player).code if item['replacement'] else 0xFF
@@ -2064,7 +2070,7 @@ def write_strings(rom, world, player, team):
if world.doorShuffle[player] in ['crossed']:
attic_hint = world.get_location("Thieves' Town - Attic", player).parent_region.dungeon.name
this_hint = 'A cracked floor can be found in ' + attic_hint + '.'
if hint_locations[0] == 'telepathic_tile_thieves_town_upstairs':
if world.intensity[player] < 2 and hint_locations[0] == 'telepathic_tile_thieves_town_upstairs':
tt[hint_locations.pop(1)] = this_hint
else:
tt[hint_locations.pop(0)] = this_hint
@@ -2153,6 +2159,17 @@ def write_strings(rom, world, player, team):
bombos_text = 'Some Hot Air' if bombositem is None else hint_text(bombositem, True) if bombositem.pedestal_hint_text is not None else 'Unknown Item'
tt['tablet_bombos_book'] = bombos_text
# attic hint
if world.doorShuffle[player] in ['crossed']:
attic_hint = world.get_location("Thieves' Town - Attic", player).parent_region.dungeon.name
tt['blind_not_that_way'] = f'{attic_hint} is too bright for my eyes'
# see tagalog.asm tables at 957,967 or Follower_HandleTrigger in JPDASM
# also the baserom table at org $09A4C2 in hooks.asm (Escort text)
rom.write_byte(0x04a4be, 0xac) # change the room to blind's room
rom.write_byte(0x04a526, 0xb8) # y coordinate, shifted down
rom.write_byte(0x04a529, 0x19) # x tile shifted right a few tiles
rom.write_byte(0x04a52e, 0x06) # follower set to blind maiden
# inverted spawn menu changes
if world.mode[player] == 'inverted':
tt['menu_start_2'] = "{MENU}\n{SPEED0}\n≥@'s house\n Dark Chapel\n{CHOICE3}"