Fix var loading again
Update Deprecated Args Parse CLI Parse Settings Fix defaults Fix priority Add Enemizer error Fix Custom Item Array again Make output more verbose Fix double-negative options
This commit is contained in:
10
Rom.py
10
Rom.py
@@ -78,6 +78,8 @@ class LocalRom(object):
|
||||
self.name = name
|
||||
self.hash = hash
|
||||
self.orig_buffer = None
|
||||
if not os.path.isfile(file):
|
||||
raise RuntimeError("Could not find valid local base rom for patching at expected path %s." % args.rom)
|
||||
with open(file, 'rb') as stream:
|
||||
self.buffer = read_rom(stream)
|
||||
if patch:
|
||||
@@ -759,10 +761,10 @@ def patch_rom(world, rom, player, team, enemized):
|
||||
difficulty.progressive_shield_limit, overflow_replacement,
|
||||
difficulty.progressive_armor_limit, overflow_replacement,
|
||||
difficulty.progressive_bottle_limit, overflow_replacement])
|
||||
|
||||
|
||||
#Work around for json patch ordering issues - write bow limit separately so that it is replaced in the patch
|
||||
rom.write_bytes(0x180098, [difficulty.progressive_bow_limit, overflow_replacement])
|
||||
|
||||
|
||||
if difficulty.progressive_bow_limit < 2 and world.swords == 'swordless':
|
||||
rom.write_bytes(0x180098, [2, overflow_replacement])
|
||||
rom.write_byte(0x180181, 0x01) # Make silver arrows work only on ganon
|
||||
@@ -2089,9 +2091,9 @@ def patch_shuffled_dark_sanc(world, rom, player):
|
||||
dark_sanc_entrance = str(world.get_region('Inverted Dark Sanctuary', player).entrances[0].name)
|
||||
room_id, ow_area, vram_loc, scroll_y, scroll_x, link_y, link_x, camera_y, camera_x, unknown_1, unknown_2, door_1, door_2 = door_addresses[dark_sanc_entrance][1]
|
||||
door_index = door_addresses[str(dark_sanc_entrance)][0]
|
||||
|
||||
|
||||
rom.write_byte(0x180241, 0x01)
|
||||
rom.write_byte(0x180248, door_index + 1)
|
||||
rom.write_byte(0x180248, door_index + 1)
|
||||
write_int16(rom, 0x180250, room_id)
|
||||
rom.write_byte(0x180252, ow_area)
|
||||
write_int16s(rom, 0x180253, [vram_loc, scroll_y, scroll_x, link_y, link_x, camera_y, camera_x])
|
||||
|
||||
Reference in New Issue
Block a user