From d8366fbac79dbbff37a7d4c92b6222b83c720449 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Mon, 15 Feb 2021 22:33:44 +0100 Subject: [PATCH] Add Activated Flute as a proper item --- BaseClasses.py | 2 +- Items.py | 2 +- Rom.py | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/BaseClasses.py b/BaseClasses.py index 0189a7be..14b48db3 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -845,7 +845,7 @@ class CollectionState(object): elif self.has('Red Shield', item.player) and self.world.difficulty_requirements[item.player].progressive_shield_limit >= 3: self.prog_items['Mirror Shield', item.player] += 1 changed = True - elif self.has('Blue Shield', item.player) and self.world.difficulty_requirements[item.player].progressive_shield_limit >= 2: + elif self.has('Blue Shield', item.player) and self.world.difficulty_requirements[item.player].progressive_shield_limit >= 2: self.prog_items['Red Shield', item.player] += 1 changed = True elif self.world.difficulty_requirements[item.player].progressive_shield_limit >= 1: diff --git a/Items.py b/Items.py index 1792731a..5dc63e62 100644 --- a/Items.py +++ b/Items.py @@ -191,6 +191,7 @@ item_table = {'Bow': (True, None, 0x0B, 'You have\nchosen the\narcher class.', ' 'Blue Potion': (False, None, 0x30, 'Delicious blue goop!', 'and the blue goo', 'the liquid kid', 'potion for sale', 'free samples', 'bottle boy has blue goo again', 'a blue potion'), 'Bee': (False, None, 0x0E, 'I will sting your foes a few times', 'and the sting buddy', 'the beekeeper kid', 'insect for sale', 'shroom pollenation', 'bottle boy has mad bee again', 'a bee'), 'Small Heart': (False, None, 0x42, 'Just a little\npiece of love!', 'and the heart', 'the life-giving kid', 'little love for sale', 'fungus for life', 'life boy feels some love again', 'a heart'), + 'Activated Flute': (True, None, 0x4A, 'Save the duck\nand fly to\nfreedom!', 'and the duck call', 'the duck-call kid', 'duck call for sale', 'duck-calls for trade', 'flute boy plays again', 'the Flute'), 'Beat Agahnim 1': (True, 'Event', None, None, None, None, None, None, None, None), 'Beat Agahnim 2': (True, 'Event', None, None, None, None, None, None, None, None), 'Get Frog': (True, 'Event', None, None, None, None, None, None, None, None), @@ -198,7 +199,6 @@ item_table = {'Bow': (True, None, 0x0B, 'You have\nchosen the\narcher class.', ' 'Pick Up Purple Chest': (True, 'Event', None, None, None, None, None, None, None, None), 'Open Floodgate': (True, 'Event', None, None, None, None, None, None, None, None), # should probably be converted to an actual item, for purposes for startinventory and such - 'Activated Flute': (True, 'Event', None, None, None, None, None, None, None, None) } lookup_id_to_name = {data[2]: name for name, data in item_table.items()} diff --git a/Rom.py b/Rom.py index 5c3352f8..e0f3f8db 100644 --- a/Rom.py +++ b/Rom.py @@ -1296,7 +1296,9 @@ def patch_rom(world, rom, player, team, enemized): 'Big Key (Ganons Tower)': (0x366, 0x04), 'Compass (Ganons Tower)': (0x364, 0x04), 'Map (Ganons Tower)': (0x368, 0x04)} set_or_table = {'Flippers': (0x356, 1, 0x379, 0x02), 'Pegasus Boots': (0x355, 1, 0x379, 0x04), - 'Shovel': (0x34C, 1, 0x38C, 0x04), 'Flute': (0x34C, 3, 0x38C, 0x01), + 'Shovel': (0x34C, 1, 0x38C, 0x04), + 'Flute': (0x34C, 2, 0x38C, 0x01), + 'Activated Flute': (0x34C, 3, 0x38C, 0x01), 'Mushroom': (0x344, 1, 0x38C, 0x20 | 0x08), 'Magic Powder': (0x344, 2, 0x38C, 0x10), 'Blue Boomerang': (0x341, 1, 0x38C, 0x80), 'Red Boomerang': (0x341, 2, 0x38C, 0x40)} keys = {'Small Key (Eastern Palace)': [0x37E], 'Small Key (Desert Palace)': [0x37F],