From 1ae9da59bb105fe2939117f57cf85bf85a0a4a4b Mon Sep 17 00:00:00 2001 From: Kara Alexandra Date: Thu, 14 May 2026 23:52:59 -0500 Subject: [PATCH] Fix Sword and Shield item --- BaseClasses.py | 5 ++++- Items.py | 2 +- Rom.py | 19 ++++++++++--------- vanilla_placements.yaml | 17 +++++++++-------- vanilla_placements_universal.yaml | 17 +++++++++-------- 5 files changed, 33 insertions(+), 27 deletions(-) diff --git a/BaseClasses.py b/BaseClasses.py index 2fb9b3ea..9f1b3706 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -1519,7 +1519,10 @@ class CollectionState(object): if not item: return changed = False - if item.name.startswith('Progressive '): + if item.name == "Sword and Shield": + self.prog_items["Fighter Sword", item.player] += 1 + self.prog_items["Blue Shield", item.player] += 1 + elif item.name.startswith('Progressive '): if 'Sword' in item.name: if self.has('Golden Sword', item.player): pass diff --git a/Items.py b/Items.py index ec6a18b8..f9323e46 100644 --- a/Items.py +++ b/Items.py @@ -55,7 +55,7 @@ item_table = {'Bow': (True, False, None, 0x0B, 200, 'Bow!\nJoin the archer class 'Master Sword': (True, False, 'Sword', 0x50, 100, 'Master Sword!\nEvil\'s bane!', 'and the master sword', 'sword-wielding kid', 'glow sword for sale', 'fungus for blue slasher', 'sword boy fights again', 'the Master Sword'), 'Tempered Sword': (True, False, 'Sword', 0x02, 150, 'Tempered Sword!\nMore slashy!', 'the tempered sword', 'sword-wielding kid', 'flame sword for sale', 'fungus for red slasher', 'sword boy fights again', 'the Tempered Sword'), 'Fighter Sword': (True, False, 'Sword', 0x49, 50, 'Fighter Sword!\nStarter level slashy!', 'the tiny sword', 'sword-wielding kid', 'tiny sword for sale', 'fungus for tiny slasher', 'sword boy fights again', 'the Fighter Sword'), - 'Sword and Shield': (True, False, 'Sword', 0x00, 'Sword and Shield!\nUncle sword ahoy!', 'the sword and shield', 'sword and shield-wielding kid', 'training set for sale', 'fungus for training set', 'sword and shield boy fights again', 'the small sword and shield'), + 'Sword and Shield': (True, False, 'Sword', 0x00, 50, 'Sword and Shield!\nUncle sword ahoy!', 'the sword and shield', 'sword and shield-wielding kid', 'training set for sale', 'fungus for training set', 'sword and shield boy fights again', 'the small sword and shield'), 'Golden Sword': (True, False, 'Sword', 0x03, 200, 'Golden Sword!\nBest slashy!', 'and the butter sword', 'sword-wielding kid', 'butter for sale', 'cap churned to butter', 'sword boy fights again', 'the Golden Sword'), 'Progressive Sword': (True, False, 'Sword', 0x5E, 150, 'Sword!\nA better sword for your time!', 'the unknown sword', 'sword-wielding kid', 'sword for sale', 'fungus for some slasher', 'sword boy fights again', 'a Sword'), 'Progressive Glove': (True, False, None, 0x61, 150, 'Glove!\nLift more than you can now!', 'and the lift upgrade', 'body-building kid', 'some glove for sale', 'fungus for gloves', 'body-building boy lifts again', 'a Glove'), diff --git a/Rom.py b/Rom.py index 8b3873b2..7f1e5f07 100644 --- a/Rom.py +++ b/Rom.py @@ -994,7 +994,7 @@ def patch_rom(world, rom, player, team, is_mystery=False, rom_header=None): set_inverted_mode(world, player, rom, inverted_buffer) uncle_location = world.get_location('Link\'s Uncle', player) - if uncle_location.item is None or uncle_location.item.name not in ['Master Sword', 'Tempered Sword', 'Fighter Sword', 'Golden Sword', 'Progressive Sword']: + if uncle_location.item is None or uncle_location.item.name not in ['Master Sword', 'Tempered Sword', 'Fighter Sword', 'Golden Sword', 'Progressive Sword', 'Sword and Shield']: # disable sword sprite from uncle rom.write_bytes(0x6D263, [0x00, 0x00, 0xf6, 0xff, 0x00, 0x0E]) rom.write_bytes(0x6D26B, [0x00, 0x00, 0xf6, 0xff, 0x00, 0x0E]) @@ -1779,14 +1779,15 @@ def patch_rom(world, rom, player, team, is_mystery=False, rom_header=None): rom.write_byte(0x180358, 0x01 if glitches_enabled else 0x00) rom.write_byte(0x18008B, 0x01 if glitches_enabled else 0x00) - # remove shield from uncle - rom.write_bytes(0x6D253, [0x00, 0x00, 0xf6, 0xff, 0x00, 0x0E]) - rom.write_bytes(0x6D25B, [0x00, 0x00, 0xf6, 0xff, 0x00, 0x0E]) - rom.write_bytes(0x6D283, [0x00, 0x00, 0xf6, 0xff, 0x00, 0x0E]) - rom.write_bytes(0x6D28B, [0x00, 0x00, 0xf7, 0xff, 0x00, 0x0E]) - rom.write_bytes(0x6D2CB, [0x00, 0x00, 0xf6, 0xff, 0x02, 0x0E]) - rom.write_bytes(0x6D2FB, [0x00, 0x00, 0xf7, 0xff, 0x02, 0x0E]) - rom.write_bytes(0x6D313, [0x00, 0x00, 0xe4, 0xff, 0x08, 0x0E]) + if uncle_location.item is None or uncle_location.item.name not in ['Sword and Shield']: + # remove shield from uncle + rom.write_bytes(0x6D253, [0x00, 0x00, 0xf6, 0xff, 0x00, 0x0E]) + rom.write_bytes(0x6D25B, [0x00, 0x00, 0xf6, 0xff, 0x00, 0x0E]) + rom.write_bytes(0x6D283, [0x00, 0x00, 0xf6, 0xff, 0x00, 0x0E]) + rom.write_bytes(0x6D28B, [0x00, 0x00, 0xf7, 0xff, 0x00, 0x0E]) + rom.write_bytes(0x6D2CB, [0x00, 0x00, 0xf6, 0xff, 0x02, 0x0E]) + rom.write_bytes(0x6D2FB, [0x00, 0x00, 0xf7, 0xff, 0x02, 0x0E]) + rom.write_bytes(0x6D313, [0x00, 0x00, 0xe4, 0xff, 0x08, 0x0E]) rom.write_byte(0x18004E, 0) # Escape Fill (nothing) write_int16(rom, 0x180183, 300) # Escape fill rupee bow diff --git a/vanilla_placements.yaml b/vanilla_placements.yaml index f48d7231..d0bd73c2 100644 --- a/vanilla_placements.yaml +++ b/vanilla_placements.yaml @@ -3,10 +3,13 @@ item_pool_adjust: "Bottle (Random)": -4 "Bottle": 4 + "Fighter Sword": -1 + "Blue Shield": -1 + "Sword and Shield": 1 + "Bombs (10)": -1 "Bombs (3)": 1 - "Rupees (5)": -1 "Arrows (10)": -1 "Rupees (20)": 2 placements: @@ -61,12 +64,11 @@ placements: "Blind's Hideout - Far Left": Rupees (20) "Blind's Hideout - Far Right": Rupees (20) "Blind's Hideout - Top": Piece of Heart - "Chicken House": Arrows (10) # TODO: VERIFY + "Chicken House": Arrows (10) # Blue Boomerang that turns into 10 arrows "Sick Kid": Bug Catching Net "Kakariko Tavern": Bottle - "Link's Uncle": Fighter Sword - "Secret Passage": Blue Shield -# "Secret Passage": Lamp + "Link's Uncle": Sword and Shield + "Secret Passage": Rupees (5) # Lamp that turns into blue rupee "Sahasrahla's Hut - Left": Rupees (50) "Sahasrahla's Hut - Middle": Bombs (3) "Sahasrahla's Hut - Right": Rupees (50) @@ -74,8 +76,7 @@ placements: "Blacksmith": Tempered Sword "Magic Bat": Magic Upgrade (1/2) "Library": Book of Mudora - "Link's House": Rupees (5) -# "Link's House": Lamp + "Link's House": Rupees (5) # Lamp that turns into blue rupee "Checkerboard Cave": Piece of Heart "Aginah's Cave": Piece of Heart "Cave 45": Piece of Heart @@ -95,7 +96,7 @@ placements: "Superbunny Cave - Bottom": Rupees (20) "Chest Game": Piece of Heart "C-Shaped House": Rupees (300) - "Brewery": Rupees (300) + "Brewery": Rupees (300) # Red Boomerang that turns into 300 rupees "Pyramid Fairy - Left": Golden Sword "Pyramid Fairy - Right": Silver Arrows "Peg Cave": Piece of Heart diff --git a/vanilla_placements_universal.yaml b/vanilla_placements_universal.yaml index 8de39293..96141e0d 100644 --- a/vanilla_placements_universal.yaml +++ b/vanilla_placements_universal.yaml @@ -3,10 +3,13 @@ item_pool_adjust: "Bottle (Random)": -4 "Bottle": 4 + "Fighter Sword": -1 + "Blue Shield": -1 + "Sword and Shield": 1 + "Bombs (10)": -1 "Bombs (3)": 1 - "Rupees (5)": -1 "Arrows (10)": -1 "Rupees (20)": -8 @@ -63,12 +66,11 @@ placements: "Blind's Hideout - Far Left": Rupees (20) "Blind's Hideout - Far Right": Rupees (20) "Blind's Hideout - Top": Piece of Heart - "Chicken House": Arrows (10) # TODO: VERIFY + "Chicken House": Arrows (10) # Blue Boomerang that turns into 10 arrows "Sick Kid": Bug Catching Net "Kakariko Tavern": Bottle - "Link's Uncle": Fighter Sword - "Secret Passage": Blue Shield -# "Secret Passage": Lamp + "Link's Uncle": Sword and Shield + "Secret Passage": Rupees (5) # Lamp that turns into blue rupee "Sahasrahla's Hut - Left": Rupees (50) "Sahasrahla's Hut - Middle": Bombs (3) "Sahasrahla's Hut - Right": Rupees (50) @@ -76,8 +78,7 @@ placements: "Blacksmith": Tempered Sword "Magic Bat": Magic Upgrade (1/2) "Library": Book of Mudora - "Link's House": Rupees (5) -# "Link's House": Lamp + "Link's House": Rupees (5) # Lamp that turns into blue rupee "Checkerboard Cave": Piece of Heart "Aginah's Cave": Piece of Heart "Cave 45": Piece of Heart @@ -97,7 +98,7 @@ placements: "Superbunny Cave - Bottom": Rupees (20) "Chest Game": Piece of Heart "C-Shaped House": Rupees (300) - "Brewery": Rupees (300) + "Brewery": Rupees (300) # Red Boomerang that turns into 300 rupees "Pyramid Fairy - Left": Golden Sword "Pyramid Fairy - Right": Silver Arrows "Peg Cave": Piece of Heart