From d8c28b733aa059ee4198e163a7c3583ba487a673 Mon Sep 17 00:00:00 2001 From: cassidoxa Date: Sun, 18 Aug 2019 15:22:13 -0400 Subject: [PATCH 01/14] Change to Bosses.py for inverted enemizer compatibility --- Bosses.py | 48 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 15 deletions(-) diff --git a/Bosses.py b/Bosses.py index 8cdaee5a..30cd56da 100644 --- a/Bosses.py +++ b/Bosses.py @@ -141,21 +141,39 @@ def place_bosses(world, player): if world.boss_shuffle == 'none': return # Most to least restrictive order - boss_locations = [ - ['Ganons Tower', 'top'], - ['Tower of Hera', None], - ['Skull Woods', None], - ['Ganons Tower', 'middle'], - ['Eastern Palace', None], - ['Desert Palace', None], - ['Palace of Darkness', None], - ['Swamp Palace', None], - ['Thieves Town', None], - ['Ice Palace', None], - ['Misery Mire', None], - ['Turtle Rock', None], - ['Ganons Tower', 'bottom'], - ] + if world.mode != 'inverted': + boss_locations = [ + ['Ganons Tower', 'top'], + ['Tower of Hera', None], + ['Skull Woods', None], + ['Ganons Tower', 'middle'], + ['Eastern Palace', None], + ['Desert Palace', None], + ['Palace of Darkness', None], + ['Swamp Palace', None], + ['Thieves Town', None], + ['Ice Palace', None], + ['Misery Mire', None], + ['Turtle Rock', None], + ['Ganons Tower', 'bottom'], + ] + else: + boss_locations = [ + ['Inverted Ganons Tower', 'top'], + ['Tower of Hera', None], + ['Skull Woods', None], + ['Inverted Ganons Tower', 'middle'], + ['Eastern Palace', None], + ['Desert Palace', None], + ['Palace of Darkness', None], + ['Swamp Palace', None], + ['Thieves Town', None], + ['Ice Palace', None], + ['Misery Mire', None], + ['Turtle Rock', None], + ['Inverted Ganons Tower', 'bottom'], + ] + all_bosses = sorted(boss_table.keys()) #s orted to be deterministic on older pythons placeable_bosses = [boss for boss in all_bosses if boss not in ['Agahnim', 'Agahnim2', 'Ganon']] From 3d64e2bef3940143176e365769a526856a195cc1 Mon Sep 17 00:00:00 2001 From: cassidoxa Date: Fri, 23 Aug 2019 10:18:37 -0400 Subject: [PATCH 02/14] Put player on HC ledge after dying to Ganon in inverted --- EntranceShuffle.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/EntranceShuffle.py b/EntranceShuffle.py index 8e84207f..0fafb1d2 100644 --- a/EntranceShuffle.py +++ b/EntranceShuffle.py @@ -1749,9 +1749,9 @@ def link_inverted_entrances(world, player): world.powder_patch_required[player] = True # check for ganon location - if world.get_entrance('Inverted Pyramid Hole', player).connected_region.name != 'Hyrule Castle Ledge': + if world.get_entrance('Inverted Pyramid Hole', player).connected_region.name != 'Pyramid': world.ganon_at_pyramid[player] = False - + # check for Ganon's Tower location if world.get_entrance('Inverted Ganons Tower', player).connected_region.name != 'Ganons Tower (Entrance)': world.ganonstower_vanilla[player] = False From fe1505408ad04e36073506ce75dd803b45ea8a88 Mon Sep 17 00:00:00 2001 From: cassidoxa Date: Fri, 23 Aug 2019 21:46:49 -0400 Subject: [PATCH 03/14] Fix mirror bonking in inverted reverted a change and fixed some inverted writes I messed up initially --- Rom.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Rom.py b/Rom.py index 785182b2..0a9f249d 100644 --- a/Rom.py +++ b/Rom.py @@ -891,7 +891,7 @@ def patch_rom(world, player, rom): rom.write_byte(0x2AF79, 0xD0 if world.mode != 'inverted' else 0xF0) # vortexes: Normal (D0=light to dark, F0=dark to light, 42 = both) rom.write_byte(0x3A943, 0xD0 if world.mode != 'inverted' else 0xF0) # Mirror: Normal (D0=Dark to Light, F0=light to dark, 42 = both) rom.write_byte(0x3A96D, 0xF0 if world.mode != 'inverted' else 0xD0) # Residual Portal: Normal (F0= Light Side, D0=Dark Side, 42 = both (Darth Vader)) - rom.write_byte(0x3A9A7, 0xD0 if world.mode != 'inverted' else 0xF0) # Residual Portal: Normal (D0= Light Side, F0=Dark Side, 42 = both (Darth Vader)) + rom.write_byte(0x3A9A7, 0xD0) # Residual Portal: Normal (D0= Light Side, F0=Dark Side, 42 = both (Darth Vader)) rom.write_bytes(0x180080, [50, 50, 70, 70]) # values to fill for Capacity Upgrades (Bomb5, Bomb10, Arrow5, Arrow10) @@ -1445,11 +1445,14 @@ def set_inverted_mode(world, rom): rom.write_byte(snes_to_pc(0x0283E0), 0xF0) # residual portals rom.write_byte(snes_to_pc(0x02B34D), 0xF0) rom.write_byte(snes_to_pc(0x06DB78), 0x8B) + rom.write_byte(snes_to_pc(0x05AF79), 0xF0) rom.write_byte(snes_to_pc(0x0DB3C5), 0xC6) rom.write_byte(snes_to_pc(0x07A3F4), 0xF0) # duck rom.write_int16s(snes_to_pc(0x02E849), [0x0043, 0x0056, 0x0058, 0x006C, 0x006F, 0x0070, 0x007B, 0x007F, 0x001B]) # dw flute rom.write_int16(snes_to_pc(0x02E8D5), 0x07C8) rom.write_int16(snes_to_pc(0x02E8F7), 0x01F8) + rom.write_byte(0x7A943, 0xF0) + rom.write_byte(0x7A96D, 0xD0) rom.write_byte(snes_to_pc(0x08D40C), 0xD0) # morph proof # the following bytes should only be written in vanilla # or they'll overwrite the randomizer's shuffles From ec9709f0093da837a6e6f2de462adb92fb8892fa Mon Sep 17 00:00:00 2001 From: Kevin Cathcart Date: Sat, 24 Aug 2019 15:35:23 -0400 Subject: [PATCH 04/14] Preopen GT for 0 crystals --- Rom.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Rom.py b/Rom.py index 0a9f249d..2dcc4f16 100644 --- a/Rom.py +++ b/Rom.py @@ -860,6 +860,7 @@ def patch_rom(world, player, rom): rom.write_byte(0x50599, 0x00) # disable below ganon chest rom.write_bytes(0xE9A5, [0x7E, 0x00, 0x24]) # disable below ganon chest rom.write_byte(0x18008B, 0x00) # Pyramid Hole not pre-opened + rom.write_byte(0x18008C, 0x01 if world.crystals_needed_for_gt == 0 else 0x00) # Pyramid Hole pre-opened if crystal requirement is 0 rom.write_byte(0xF5D73, 0xF0) # bees are catchable rom.write_byte(0xF5F10, 0xF0) # bees are catchable rom.write_byte(0x180086, 0x00 if world.aga_randomness else 0x01) # set blue ball and ganon warp randomness From eb1b5053e56ab8b0b6d0061e12b1dbf69da864bb Mon Sep 17 00:00:00 2001 From: Kevin Cathcart Date: Sat, 24 Aug 2019 15:35:58 -0400 Subject: [PATCH 05/14] update json spoiler meta section --- BaseClasses.py | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/BaseClasses.py b/BaseClasses.py index be6397fd..792804a6 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -1013,24 +1013,17 @@ class Spoiler(object): from Main import __version__ as ERVersion self.metadata = {'version': ERVersion, - 'seed': self.world.seed, 'logic': self.world.logic, 'mode': self.world.mode, - 'swords': self.world.swords, + 'weapons': self.world.swords, 'goal': self.world.goal, 'shuffle': self.world.shuffle, - 'algorithm': self.world.algorithm, - 'difficulty': self.world.difficulty, - 'difficulty_mode': self.world.difficulty_adjustments, - 'timer': self.world.timer, - 'progressive': self.world.progressive, + 'item_pool': self.world.difficulty, + 'item_functionality': self.world.difficulty_adjustments, 'accessibility': self.world.accessibility, - 'dungeonitems': self.world.place_dungeon_items, - 'quickswap': self.world.quickswap, - 'fastmenu': self.world.fastmenu, - 'disable_music': self.world.disable_music, + 'hints': self.world.hints, 'keysanity': self.world.keysanity, - 'players': self.world.players} + } def to_json(self): self.parse_data() From 6a6058adb31bb9548c2786a938e16f320a80aa20 Mon Sep 17 00:00:00 2001 From: Kevin Cathcart Date: Sat, 24 Aug 2019 15:36:54 -0400 Subject: [PATCH 06/14] Update goal sign/ganon taunts --- Rom.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Rom.py b/Rom.py index 2dcc4f16..2794a703 100644 --- a/Rom.py +++ b/Rom.py @@ -1363,6 +1363,9 @@ def write_strings(rom, world, player): tt['sign_ganons_tower'] = ('You need %d crystal to enter.' if world.crystals_needed_for_gt == 1 else 'You need %d crystals to enter.') % world.crystals_needed_for_gt tt['sign_ganon'] = ('You need %d crystal to beat Ganon.' if world.crystals_needed_for_ganon == 1 else 'You need %d crystals to beat Ganon.') % world.crystals_needed_for_ganon + if world.goal in ['dungeons']: + tt['sign_ganon'] = 'You need to complete all the dungeons.' + tt['uncle_leaving_text'] = Uncle_texts[random.randint(0, len(Uncle_texts) - 1)] tt['end_triforce'] = "{NOBORDER}\n" + Triforce_texts[random.randint(0, len(Triforce_texts) - 1)] tt['bomb_shop_big_bomb'] = BombShop2_texts[random.randint(0, len(BombShop2_texts) - 1)] @@ -1371,13 +1374,19 @@ def write_strings(rom, world, player): tt['sahasrahla_quest_have_master_sword'] = Sahasrahla2_texts[random.randint(0, len(Sahasrahla2_texts) - 1)] tt['blind_by_the_light'] = Blind_texts[random.randint(0, len(Blind_texts) - 1)] - if world.goal in ['pedestal', 'triforcehunt']: - tt['ganon_fall_in_alt'] = 'Why are you even here?\n You can\'t even hurt me!' + if world.goal in ['triforcehunt']: + tt['ganon_fall_in_alt'] = 'Why are you even here?\n You can\'t even hurt me! Get the Triforce Pieces.' tt['ganon_phase_3_alt'] = 'Seriously? Go Away, I will not Die.' + tt['sign_ganon'] = 'Go find the Triforce pieces... Ganon is invuinvincible!' + elif world.goal in ['pedestal']: + tt['ganon_fall_in_alt'] = 'Why are you even here?\n You can\'t even hurt me! Your goal is at the pedestal.' + tt['ganon_phase_3_alt'] = 'Seriously? Go Away, I will not Die.' + tt['sign_ganon'] = 'You need to get to the pedestal... Ganon is invincible!' else: tt['ganon_fall_in'] = Ganon1_texts[random.randint(0, len(Ganon1_texts) - 1)] tt['ganon_fall_in_alt'] = 'You cannot defeat me until you finish your goal!' tt['ganon_phase_3_alt'] = 'Got wax in\nyour ears?\nI can not die!' + tt['kakariko_tavern_fisherman'] = TavernMan_texts[random.randint(0, len(TavernMan_texts) - 1)] pedestalitem = world.get_location('Master Sword Pedestal', player).item From e29f39c58531fa3968db75ff2c8ad34cbc8e8881 Mon Sep 17 00:00:00 2001 From: Kevin Cathcart Date: Sat, 24 Aug 2019 15:38:22 -0400 Subject: [PATCH 07/14] Mark as pre-release --- Main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Main.py b/Main.py index 786a91a1..bba6c61a 100644 --- a/Main.py +++ b/Main.py @@ -18,7 +18,7 @@ from Fill import distribute_items_cutoff, distribute_items_staleness, distribute from ItemList import generate_itempool, difficulties, fill_prizes from Utils import output_path -__version__ = '0.6.2' +__version__ = '0.6.3-pre' def main(args, seed=None): start = time.clock() From df6bf6f99c779ce0ad65d2083c38e5b224b61cdb Mon Sep 17 00:00:00 2001 From: Kevin Cathcart Date: Sat, 24 Aug 2019 15:53:21 -0400 Subject: [PATCH 08/14] Fix errors --- BaseClasses.py | 16 ++++++++-------- Rom.py | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/BaseClasses.py b/BaseClasses.py index 792804a6..4715fff6 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -1044,20 +1044,20 @@ class Spoiler(object): def to_file(self, filename): self.parse_data() with open(filename, 'w') as outfile: - outfile.write('ALttP Entrance Randomizer Version %s - Seed: %s\n\n' % (self.metadata['version'], self.metadata['seed'])) + outfile.write('ALttP Entrance Randomizer Version %s - Seed: %s\n\n' % (self.metadata['version'], self.world.seed)) outfile.write('Logic: %s\n' % self.metadata['logic']) outfile.write('Mode: %s\n' % self.metadata['mode']) outfile.write('Goal: %s\n' % self.metadata['goal']) - outfile.write('Difficulty: %s\n' % self.metadata['difficulty']) - outfile.write('Item Functionality: %s\n' % self.metadata['difficulty_mode']) + outfile.write('Difficulty: %s\n' % self.metadata['item_pool']) + outfile.write('Item Functionality: %s\n' % self.metadata['item_functionality']) outfile.write('Entrance Shuffle: %s\n' % self.metadata['shuffle']) - outfile.write('Filling Algorithm: %s\n' % self.metadata['algorithm']) + outfile.write('Filling Algorithm: %s\n' % self.world.algorithm) outfile.write('Accessibility: %s\n' % self.metadata['accessibility']) - outfile.write('Maps and Compasses in Dungeons: %s\n' % ('Yes' if self.metadata['dungeonitems'] else 'No')) - outfile.write('L\\R Quickswap enabled: %s\n' % ('Yes' if self.metadata['quickswap'] else 'No')) - outfile.write('Menu speed: %s\n' % self.metadata['fastmenu']) + outfile.write('Maps and Compasses in Dungeons: %s\n' % ('Yes' if self.world.place_dungeon_items else 'No')) + outfile.write('L\\R Quickswap enabled: %s\n' % ('Yes' if self.world.quickswap else 'No')) + outfile.write('Menu speed: %s\n' % self.world.fastmenu) outfile.write('Keysanity enabled: %s\n' % ('Yes' if self.metadata['keysanity'] else 'No')) - outfile.write('Players: %d' % self.metadata['players']) + outfile.write('Players: %d' % self.world.players) if self.entrances: outfile.write('\n\nEntrances:\n\n') outfile.write('\n'.join(['%s%s %s %s' % ('Player {0}: '.format(entry['player']) if self.world.players >1 else '', entry['entrance'], '<=>' if entry['direction'] == 'both' else '<=' if entry['direction'] == 'exit' else '=>', entry['exit']) for entry in self.entrances.values()])) diff --git a/Rom.py b/Rom.py index 2794a703..357d7e54 100644 --- a/Rom.py +++ b/Rom.py @@ -1026,7 +1026,7 @@ def patch_rom(world, player, rom): # set rom name # 21 bytes from Main import __version__ - rom.name = bytearray('ER_{0}_{1:09}\0'.format(__version__,world.seed), 'utf8') + rom.name = bytearray('ER_{0}_{1:09}\0'.format(__version__[0:7],world.seed), 'utf8') assert len(rom.name) <= 21 rom.write_bytes(0x7FC0, rom.name) From 7dfff45a84cedec72f6b4a0305e4a13293676eaf Mon Sep 17 00:00:00 2001 From: Kevin Cathcart Date: Sun, 25 Aug 2019 22:22:31 -0400 Subject: [PATCH 09/14] Fix typo --- Rom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rom.py b/Rom.py index 357d7e54..f7e0e1b2 100644 --- a/Rom.py +++ b/Rom.py @@ -1377,7 +1377,7 @@ def write_strings(rom, world, player): if world.goal in ['triforcehunt']: tt['ganon_fall_in_alt'] = 'Why are you even here?\n You can\'t even hurt me! Get the Triforce Pieces.' tt['ganon_phase_3_alt'] = 'Seriously? Go Away, I will not Die.' - tt['sign_ganon'] = 'Go find the Triforce pieces... Ganon is invuinvincible!' + tt['sign_ganon'] = 'Go find the Triforce pieces... Ganon is invincible!' elif world.goal in ['pedestal']: tt['ganon_fall_in_alt'] = 'Why are you even here?\n You can\'t even hurt me! Your goal is at the pedestal.' tt['ganon_phase_3_alt'] = 'Seriously? Go Away, I will not Die.' From 05e5d6227db22363f2970c3bd875b623c632e60e Mon Sep 17 00:00:00 2001 From: Kevin Cathcart Date: Sun, 25 Aug 2019 22:24:35 -0400 Subject: [PATCH 10/14] Remove text for faster fairy potion fill --- Text.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Text.py b/Text.py index a5e03bda..517ccf18 100644 --- a/Text.py +++ b/Text.py @@ -1432,6 +1432,7 @@ class TextTable(object): 'desert_thief_question_yes', 'desert_thief_after_item_get', 'desert_thief_reassure', + 'pond_item_bottle_filled' ] for msg in messages_to_zero: From 12d7459a60dd6d00762b823b9ddf1cc3e252172a Mon Sep 17 00:00:00 2001 From: Kevin Cathcart Date: Sun, 25 Aug 2019 22:28:12 -0400 Subject: [PATCH 11/14] Implement progressive bow limit --- Rom.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/Rom.py b/Rom.py index f7e0e1b2..d79b84a8 100644 --- a/Rom.py +++ b/Rom.py @@ -657,20 +657,17 @@ def patch_rom(world, player, rom): difficulty = world.difficulty_requirements - if difficulty.progressive_bow_limit < 2 and world.swords == 'swordless': - # TODO: write 2 to progressive bow limit byte - rom.write_byte(0x180181, 0x01) # Make silver arrows work on on ganon - else: - # TODO: write difficulty.progressive_bow_limit to progressive bow limit byte - pass - - #Set overflow items for progressive equipment rom.write_bytes(0x180090, [difficulty.progressive_sword_limit, overflow_replacement, difficulty.progressive_shield_limit, overflow_replacement, difficulty.progressive_armor_limit, overflow_replacement, - difficulty.progressive_bottle_limit, overflow_replacement]) + difficulty.progressive_bottle_limit, overflow_replacement, + 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 # set up game internal RNG seed for i in range(1024): From fd1074d58af354f8430f91da819f517e08af79f7 Mon Sep 17 00:00:00 2001 From: cassidoxa Date: Sun, 25 Aug 2019 00:54:08 -0400 Subject: [PATCH 12/14] Adjust swordless rules for inverted --- Rules.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Rules.py b/Rules.py index b193f4d9..18dcff8c 100644 --- a/Rules.py +++ b/Rules.py @@ -932,17 +932,23 @@ def open_rules(world, player): def swordless_rules(world, player): - set_rule(world.get_entrance('Agahnims Tower', player), lambda state: state.has('Cape', player) or state.has('Hammer', player) or state.has('Beat Agahnim 1', player)) # barrier gets removed after killing agahnim, relevant for entrance shuffle set_rule(world.get_entrance('Agahnim 1', player), lambda state: (state.has('Hammer', player) or state.has('Fire Rod', player) or state.can_shoot_arrows(player) or state.has('Cane of Somaria', player)) and state.has_key('Small Key (Agahnims Tower)', player, 2)) set_rule(world.get_location('Ether Tablet', player), lambda state: state.has('Book of Mudora', player) and state.has('Hammer', player)) - set_rule(world.get_location('Bombos Tablet', player), lambda state: state.has('Book of Mudora', player) and state.has('Hammer', player) and state.has_Mirror(player)) - set_rule(world.get_entrance('Misery Mire', player), lambda state: state.has_Pearl(player) and state.has_misery_mire_medallion(player)) # sword not required to use medallion for opening in swordless (!) - set_rule(world.get_entrance('Turtle Rock', player), lambda state: state.has_Pearl(player) and state.has_turtle_rock_medallion(player) and state.can_reach('Turtle Rock (Top)', 'Region', player)) # sword not required to use medallion for opening in swordless (!) set_rule(world.get_entrance('Skull Woods Torch Room', player), lambda state: state.has_key('Small Key (Skull Woods)', player, 3) and state.has('Fire Rod', player)) # no curtain set_rule(world.get_entrance('Ice Palace Entrance Room', player), lambda state: state.has('Fire Rod', player) or state.has('Bombos', player)) #in swordless mode bombos pads are present in the relevant parts of ice palace set_rule(world.get_location('Ganon', player), lambda state: state.has('Hammer', player) and state.has_fire_source(player) and state.has('Silver Arrows', player) and state.can_shoot_arrows(player) and state.has_crystals(world.crystals_needed_for_ganon, player)) set_rule(world.get_entrance('Ganon Drop', player), lambda state: state.has('Hammer', player)) # need to damage ganon to get tiles to drop + if world.mode != 'inverted': + set_rule(world.get_entrance('Agahnims Tower', player), lambda state: state.has('Cape', player) or state.has('Hammer', player) or state.has('Beat Agahnim 1', player)) # barrier gets removed after killing agahnim, relevant for entrance shuffle + set_rule(world.get_entrance('Turtle Rock', player), lambda state: state.has_Pearl(player) and state.has_turtle_rock_medallion(player) and state.can_reach('Turtle Rock (Top)', 'Region', player)) # sword not required to use medallion for opening in swordless (!) + set_rule(world.get_entrance('Misery Mire', player), lambda state: state.has_Pearl(player) and state.has_misery_mire_medallion(player)) # sword not required to use medallion for opening in swordless (!) + set_rule(world.get_location('Bombos Tablet', player), lambda state: state.has('Book of Mudora', player) and state.has('Hammer', player) and state.has_Mirror(player)) + else: + # only need ddm access for aga tower in inverted + set_rule(world.get_entrance('Turtle Rock', player), lambda state: state.has_turtle_rock_medallion(player) and state.can_reach('Turtle Rock (Top)', 'Region', player)) # sword not required to use medallion for opening in swordless (!) + set_rule(world.get_entrance('Misery Mire', player), lambda state: state.has_misery_mire_medallion(player)) # sword not required to use medallion for opening in swordless (!) + set_rule(world.get_location('Bombos Tablet', player), lambda state: state.has('Book of Mudora', player) and state.has('Hammer', player)) def standard_rules(world, player): add_rule(world.get_entrance('Sewers Door', player), lambda state: state.can_kill_most_things(player)) From 2bd2ae80de7feb5053364ff9d370d00fb4f9bb39 Mon Sep 17 00:00:00 2001 From: Kevin Cathcart Date: Sun, 25 Aug 2019 22:35:03 -0400 Subject: [PATCH 13/14] Remove obsolete comment --- Rules.py | 1 - 1 file changed, 1 deletion(-) diff --git a/Rules.py b/Rules.py index 18dcff8c..fb609fb8 100644 --- a/Rules.py +++ b/Rules.py @@ -34,7 +34,6 @@ def set_rules(world, player): raise NotImplementedError('Not implemented yet') if world.swords == 'swordless': - # FIXME: !!! Does not handle inverted properly swordless_rules(world, player) if world.logic == 'noglitches': From 895d274b02f64e140d79f1c60746dbd0a45b6d3f Mon Sep 17 00:00:00 2001 From: Kevin Cathcart Date: Sun, 25 Aug 2019 22:36:19 -0400 Subject: [PATCH 14/14] New music muting mechanism --- Rom.py | 59 +--------------------------------------------------------- 1 file changed, 1 insertion(+), 58 deletions(-) diff --git a/Rom.py b/Rom.py index d79b84a8..01d25247 100644 --- a/Rom.py +++ b/Rom.py @@ -1098,64 +1098,7 @@ def apply_rom_settings(rom, beep, color, quickswap, fastmenu, disable_music, spr rom.write_byte(0x18004B, 0x01 if quickswap else 0x00) - music_volumes = [ - (0x00, [0xD373B, 0xD375B, 0xD90F8]), - (0x14, [0xDA710, 0xDA7A4, 0xDA7BB, 0xDA7D2]), - (0x3C, [0xD5954, 0xD653B, 0xDA736, 0xDA752, 0xDA772, 0xDA792]), - (0x50, [0xD5B47, 0xD5B5E]), - (0x54, [0xD4306]), - (0x64, [0xD6878, 0xD6883, 0xD6E48, 0xD6E76, 0xD6EFB, 0xD6F2D, 0xDA211, 0xDA35B, 0xDA37B, 0xDA38E, 0xDA39F, 0xDA5C3, 0xDA691, 0xDA6A8, 0xDA6DF]), - (0x78, [0xD2349, 0xD3F45, 0xD42EB, 0xD48B9, 0xD48FF, 0xD543F, 0xD5817, 0xD5957, 0xD5ACB, 0xD5AE8, 0xD5B4A, 0xDA5DE, 0xDA608, 0xDA635, - 0xDA662, 0xDA71F, 0xDA7AF, 0xDA7C6, 0xDA7DD]), - (0x82, [0xD2F00, 0xDA3D5]), - (0xA0, [0xD249C, 0xD24CD, 0xD2C09, 0xD2C53, 0xD2CAF, 0xD2CEB, 0xD2D91, 0xD2EE6, 0xD38ED, 0xD3C91, 0xD3CD3, 0xD3CE8, 0xD3F0C, - 0xD3F82, 0xD405F, 0xD4139, 0xD4198, 0xD41D5, 0xD41F6, 0xD422B, 0xD4270, 0xD42B1, 0xD4334, 0xD4371, 0xD43A6, 0xD43DB, - 0xD441E, 0xD4597, 0xD4B3C, 0xD4BAB, 0xD4C03, 0xD4C53, 0xD4C7F, 0xD4D9C, 0xD5424, 0xD65D2, 0xD664F, 0xD6698, 0xD66FF, - 0xD6985, 0xD6C5C, 0xD6C6F, 0xD6C8E, 0xD6CB4, 0xD6D7D, 0xD827D, 0xD960C, 0xD9828, 0xDA233, 0xDA3A2, 0xDA49E, 0xDA72B, - 0xDA745, 0xDA765, 0xDA785, 0xDABF6, 0xDAC0D, 0xDAEBE, 0xDAFAC]), - (0xAA, [0xD9A02, 0xD9BD6]), - (0xB4, [0xD21CD, 0xD2279, 0xD2E66, 0xD2E70, 0xD2EAB, 0xD3B97, 0xD3BAC, 0xD3BE8, 0xD3C0D, 0xD3C39, 0xD3C68, 0xD3C9F, 0xD3CBC, - 0xD401E, 0xD4290, 0xD443E, 0xD456F, 0xD47D3, 0xD4D43, 0xD4DCC, 0xD4EBA, 0xD4F0B, 0xD4FE5, 0xD5012, 0xD54BC, 0xD54D5, - 0xD54F0, 0xD5509, 0xD57D8, 0xD59B9, 0xD5A2F, 0xD5AEB, 0xD5E5E, 0xD5FE9, 0xD658F, 0xD674A, 0xD6827, 0xD69D6, 0xD69F5, - 0xD6A05, 0xD6AE9, 0xD6DCF, 0xD6E20, 0xD6ECB, 0xD71D4, 0xD71E6, 0xD7203, 0xD721E, 0xD8724, 0xD8732, 0xD9652, 0xD9698, - 0xD9CBC, 0xD9DC0, 0xD9E49, 0xDAA68, 0xDAA77, 0xDAA88, 0xDAA99, 0xDAF04]), - (0x8c, [0xD1D28, 0xD1D41, 0xD1D5C, 0xD1D77, 0xD1EEE, 0xD311D, 0xD31D1, 0xD4148, 0xD5543, 0xD5B6F, 0xD65B3, 0xD6760, 0xD6B6B, - 0xD6DF6, 0xD6E0D, 0xD73A1, 0xD814C, 0xD825D, 0xD82BE, 0xD8340, 0xD8394, 0xD842C, 0xD8796, 0xD8903, 0xD892A, 0xD91E8, - 0xD922B, 0xD92E0, 0xD937E, 0xD93C1, 0xDA958, 0xDA971, 0xDA98C, 0xDA9A7]), - (0xC8, [0xD1D92, 0xD1DBD, 0xD1DEB, 0xD1F5D, 0xD1F9F, 0xD1FBD, 0xD1FDC, 0xD1FEA, 0xD20CA, 0xD21BB, 0xD22C9, 0xD2754, 0xD284C, - 0xD2866, 0xD2887, 0xD28A0, 0xD28BA, 0xD28DB, 0xD28F4, 0xD293E, 0xD2BF3, 0xD2C1F, 0xD2C69, 0xD2CA1, 0xD2CC5, 0xD2D05, - 0xD2D73, 0xD2DAF, 0xD2E3D, 0xD2F36, 0xD2F46, 0xD2F6F, 0xD2FCF, 0xD2FDF, 0xD302B, 0xD3086, 0xD3099, 0xD30A5, 0xD30CD, - 0xD30F6, 0xD3154, 0xD3184, 0xD333A, 0xD33D9, 0xD349F, 0xD354A, 0xD35E5, 0xD3624, 0xD363C, 0xD3672, 0xD3691, 0xD36B4, - 0xD36C6, 0xD3724, 0xD3767, 0xD38CB, 0xD3B1D, 0xD3B2F, 0xD3B55, 0xD3B70, 0xD3B81, 0xD3BBF, 0xD3F65, 0xD3FA6, 0xD404F, - 0xD4087, 0xD417A, 0xD41A0, 0xD425C, 0xD4319, 0xD433C, 0xD43EF, 0xD440C, 0xD4452, 0xD4494, 0xD44B5, 0xD4512, 0xD45D1, - 0xD45EF, 0xD4682, 0xD46C3, 0xD483C, 0xD4848, 0xD4855, 0xD4862, 0xD486F, 0xD487C, 0xD4A1C, 0xD4A3B, 0xD4A60, 0xD4B27, - 0xD4C7A, 0xD4D12, 0xD4D81, 0xD4E90, 0xD4ED6, 0xD4EE2, 0xD5005, 0xD502E, 0xD503C, 0xD5081, 0xD51B1, 0xD51C7, 0xD51CF, - 0xD51EF, 0xD520C, 0xD5214, 0xD5231, 0xD5257, 0xD526D, 0xD5275, 0xD52AF, 0xD52BD, 0xD52CD, 0xD52DB, 0xD549C, 0xD5801, - 0xD58A4, 0xD5A68, 0xD5A7F, 0xD5C12, 0xD5D71, 0xD5E10, 0xD5E9A, 0xD5F8B, 0xD5FA4, 0xD651A, 0xD6542, 0xD65ED, 0xD661D, - 0xD66D7, 0xD6776, 0xD68BD, 0xD68E5, 0xD6956, 0xD6973, 0xD69A8, 0xD6A51, 0xD6A86, 0xD6B96, 0xD6C3E, 0xD6D4A, 0xD6E9C, - 0xD6F80, 0xD717E, 0xD7190, 0xD71B9, 0xD811D, 0xD8139, 0xD816B, 0xD818A, 0xD819E, 0xD81BE, 0xD829C, 0xD82E1, 0xD8306, - 0xD830E, 0xD835E, 0xD83AB, 0xD83CA, 0xD83F0, 0xD83F8, 0xD844B, 0xD8479, 0xD849E, 0xD84CB, 0xD84EB, 0xD84F3, 0xD854A, - 0xD8573, 0xD859D, 0xD85B4, 0xD85CE, 0xD862A, 0xD8681, 0xD87E3, 0xD87FF, 0xD887B, 0xD88C6, 0xD88E3, 0xD8944, 0xD897B, - 0xD8C97, 0xD8CA4, 0xD8CB3, 0xD8CC2, 0xD8CD1, 0xD8D01, 0xD917B, 0xD918C, 0xD919A, 0xD91B5, 0xD91D0, 0xD91DD, 0xD9220, - 0xD9273, 0xD9284, 0xD9292, 0xD92AD, 0xD92C8, 0xD92D5, 0xD9311, 0xD9322, 0xD9330, 0xD934B, 0xD9366, 0xD9373, 0xD93B6, - 0xD97A6, 0xD97C2, 0xD97DC, 0xD97FB, 0xD9811, 0xD98FF, 0xD996F, 0xD99A8, 0xD99D5, 0xD9A30, 0xD9A4E, 0xD9A6B, 0xD9A88, - 0xD9AF7, 0xD9B1D, 0xD9B43, 0xD9B7C, 0xD9BA9, 0xD9C84, 0xD9C8D, 0xD9CAC, 0xD9CE8, 0xD9CF3, 0xD9CFD, 0xD9D46, 0xDA35E, - 0xDA37E, 0xDA391, 0xDA478, 0xDA4C3, 0xDA4D7, 0xDA4F6, 0xDA515, 0xDA6E2, 0xDA9C2, 0xDA9ED, 0xDAA1B, 0xDAA57, 0xDABAF, - 0xDABC9, 0xDABE2, 0xDAC28, 0xDAC46, 0xDAC63, 0xDACB8, 0xDACEC, 0xDAD08, 0xDAD25, 0xDAD42, 0xDAD5F, 0xDAE17, 0xDAE34, - 0xDAE51, 0xDAF2E, 0xDAF55, 0xDAF6B, 0xDAF81, 0xDB14F, 0xDB16B, 0xDB180, 0xDB195, 0xDB1AA]), - (0xD2, [0xD2B88, 0xD364A, 0xD369F, 0xD3747]), - (0xDC, [0xD213F, 0xD2174, 0xD229E, 0xD2426, 0xD4731, 0xD4753, 0xD4774, 0xD4795, 0xD47B6, 0xD4AA5, 0xD4AE4, 0xD4B96, 0xD4CA5, - 0xD5477, 0xD5A3D, 0xD6566, 0xD672C, 0xD67C0, 0xD69B8, 0xD6AB1, 0xD6C05, 0xD6DB3, 0xD71AB, 0xD8E2D, 0xD8F0D, 0xD94E0, - 0xD9544, 0xD95A8, 0xD9982, 0xD9B56, 0xDA694, 0xDA6AB, 0xDAE88, 0xDAEC8, 0xDAEE6, 0xDB1BF]), - (0xE6, [0xD210A, 0xD22DC, 0xD2447, 0xD5A4D, 0xD5DDC, 0xDA251, 0xDA26C]), - (0xF0, [0xD945E, 0xD967D, 0xD96C2, 0xD9C95, 0xD9EE6, 0xDA5C6]), - (0xFA, [0xD2047, 0xD24C2, 0xD24EC, 0xD25A4, 0xD51A8, 0xD51E6, 0xD524E, 0xD529E, 0xD6045, 0xD81DE, 0xD821E, 0xD94AA, 0xD9A9E, - 0xD9AE4, 0xDA289]), - (0xFF, [0xD2085, 0xD21C5, 0xD5F28]) - ] - for volume, addresses in music_volumes: - for address in addresses: - rom.write_byte(address, volume if not disable_music else 0x00) + rom.write_byte(0x18021A, 1 if disable_music else 0x00) # restore Mirror sound effect volumes (for existing seeds that lack it) rom.write_byte(0xD3E04, 0xC8)