More of Retro Mode

Implement correct Retro Mode item pools.
Set up most of the key logic to handle retro mode (still needs shop access)
Set ROM flags appropriately.
TODO: Support Retro Mode with custom item pools, deal with shops in general, deal with Bow paired with arrow requirements, correct Expert item pool for silvers, test older fill algorithms with retro mode, deal with the new Sahas/Bomb Shop reveal map info ROM flags.
This commit is contained in:
AmazingAmpharos
2018-03-15 16:23:02 -05:00
committed by GitHub
parent 28d4ce0997
commit f701aefa28
6 changed files with 107 additions and 75 deletions

14
Rom.py
View File

@@ -744,9 +744,7 @@ def patch_rom(world, rom, hashtable, beep='normal', color='red', sprite=None):
rom.write_byte(0x1800A0, 0x01) # return to light world on s+q without mirror
rom.write_byte(0x1800A1, 0x01) # enable overworld screen transition draining for water level inside swamp
rom.write_byte(0x180174, 0x01 if world.fix_fake_world else 0x00)
rom.write_byte(0x180175, 0x00) # Arrow mode: normal
rom.write_int16_to_rom(0x180176, 0) # Wood Arrow Cost (rupee arrow mode)
rom.write_int16_to_rom(0x180178, 0) # Silver Arrow Cost (rupee arrow mode)
rom.write_byte(0x18017E, 0x01) # Fairy fountains only trade in bottles
rom.write_byte(0x180034, 0x0A) # starting max bombs
rom.write_byte(0x180035, 30) # starting max arrows
for x in range(0x183000, 0x18304F):
@@ -787,11 +785,19 @@ def patch_rom(world, rom, hashtable, beep='normal', color='red', sprite=None):
rom.write_byte(0x18003C, 0x00)
rom.write_byte(0x180045, 0xFF if world.keysanity else 0x00) # free roaming items in menu
rom.write_byte(0x180172, 0x01 if world.retro else 0x00) # universal keys
rom.write_byte(0x180175, 0x01 if world.retro else 0x00) # rupee bow
rom.write_byte(0x180176, 0x0A if world.retro else 0x00) # wood arrow cost
rom.write_byte(0x180178, 0x32 if world.retro else 0x00) # silver arrow cost
rom.write_byte(0x301FC, 0xDA if world.retro else 0xE1) # rupees replace arrows under pots
rom.write_bytes(0xECB4E, [0xA9, 0x00, 0xEA, 0xEA] if world.retro else [0xAF, 0x77, 0xF3, 0x7E]) # Thief steals rupees instead of arrows
rom.write_bytes(0xF0D96, [0xA9, 0x00, 0xEA, 0xEA] if world.retro else [0xAF, 0x77, 0xF3, 0x7E]) # Pikit steals rupees instead of arrows
rom.write_bytes(0xEDA5, [0x35, 0x41] if world.retro else [0x43, 0x44]) # Chest game gives rupees instead of arrows
digging_game_rng = random.randint(1, 30) # set rng for digging game
rom.write_byte(0x180020, digging_game_rng)
rom.write_byte(0xEFD95, digging_game_rng)
rom.write_byte(0x1800A3, 0x01) # enable correct world setting behaviour after agahnim kills
rom.write_byte(0x180042, 0x01 if world.save_and_quite_from_boss else 0x00) # Allow Save and Quite after boss kill
rom.write_byte(0x180042, 0x01 if world.save_and_quit_from_boss else 0x00) # Allow Save and Quit after boss kill
# remove shield from uncle
rom.write_bytes(0x6D253, [0x00, 0x00, 0xf6, 0xff, 0x00, 0x0E])