From 62c348fe7c1c5c0242b7c4197fd397e0dbae2b14 Mon Sep 17 00:00:00 2001 From: aerinon Date: Mon, 25 Oct 2021 16:31:36 -0600 Subject: [PATCH 1/3] Capacity upgrade fairy now sells nothing useful (nor could downgrade your sword) --- Rom.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Rom.py b/Rom.py index 2ea49059..ccfa4c43 100644 --- a/Rom.py +++ b/Rom.py @@ -1619,13 +1619,16 @@ def write_custom_shops(rom, world, player): loc_item = ItemFactory(item['item'], player) if (not world.shopsanity[player] and shop.region.name == 'Capacity Upgrade' and world.difficulty[player] != 'normal'): - continue # skip cap upgrades except in normal/shopsanity - item_id = loc_item.code - price = int16_as_bytes(item['price']) - replace = ItemFactory(item['replacement'], player).code if item['replacement'] else 0xFF - replace_price = int16_as_bytes(item['replacement_price']) + # really should be 5A instead of B0 -- surprise!!! + item_id, price, replace, replace_price, item_max = 0xB0, [0, 0], 0xFF, [0, 0], 1 + else: + item_id = loc_item.code + price = int16_as_bytes(item['price']) + replace = ItemFactory(item['replacement'], player).code if item['replacement'] else 0xFF + replace_price = int16_as_bytes(item['replacement_price']) + item_max = item['max'] item_player = 0 if item['player'] == player else item['player'] - item_data = [shop_id, item_id] + price + [item['max'], replace] + replace_price + [item_player] + item_data = [shop_id, item_id] + price + [item_max, replace] + replace_price + [item_player] items_data.extend(item_data) rom.write_bytes(0x184800, shop_data) From 3b3fe7f8ca756b412c47da3fd4be1e91f5c0c2bf Mon Sep 17 00:00:00 2001 From: aerinon Date: Wed, 27 Oct 2021 13:29:07 -0600 Subject: [PATCH 2/3] Bonk fairy (light) standard er restriction --- EntranceShuffle.py | 40 ++++++++++++++++++++++++++++++++++++++-- RELEASENOTES.md | 3 +++ Rules.py | 2 +- 3 files changed, 42 insertions(+), 3 deletions(-) diff --git a/EntranceShuffle.py b/EntranceShuffle.py index 7e5dcdd3..390cf83d 100644 --- a/EntranceShuffle.py +++ b/EntranceShuffle.py @@ -215,6 +215,13 @@ def link_entrances(world, player): if bomb_shop in dw_entrances: dw_entrances.remove(bomb_shop) + # standard mode cannot have Bonk Fairy Light be a connector in case of starting boots + # or boots are in links house, etc. + removed = False + if world.mode[player] == 'standard' and 'Bonk Fairy (Light)' in lw_entrances: + lw_entrances.remove('Bonk Fairy (Light)') + removed = True + # place the old man cave's entrance somewhere in the light world random.shuffle(lw_entrances) old_man_entrance = lw_entrances.pop() @@ -226,6 +233,8 @@ def link_entrances(world, player): # now scramble the rest connect_caves(world, lw_entrances, dw_entrances, caves, player) + if removed: + lw_entrances.append('Bonk Fairy (Light)') # scramble holes scramble_holes(world, player) @@ -395,14 +404,23 @@ def link_entrances(world, player): if bomb_shop in dw_entrances: dw_entrances.remove(bomb_shop) + # standard mode cannot have Bonk Fairy Light be a connector in case of + # starting boots or boots are in links house, etc. + removed = False + if world.mode[player] == 'standard' and 'Bonk Fairy (Light)' in lw_entrances: + lw_entrances.remove('Bonk Fairy (Light)') + removed = True + # place the old man cave's entrance somewhere in the light world old_man_entrance = lw_entrances.pop() connect_two_way(world, old_man_entrance, 'Old Man Cave Exit (West)', player) - # now scramble the rest connect_caves(world, lw_entrances, dw_entrances, caves, player) + if removed: + lw_entrances.append('Bonk Fairy (Light)') + # scramble holes scramble_holes(world, player) @@ -487,16 +505,24 @@ def link_entrances(world, player): connect_entrance(world, bomb_shop, 'Big Bomb Shop', player) entrances.remove(bomb_shop) + # standard mode cannot have Bonk Fairy Light be a connector in case of + # starting boots or boots are in links house, etc. + removed = False + if world.mode[player] == 'standard' and 'Bonk Fairy (Light)' in entrances: + entrances.remove('Bonk Fairy (Light)') + removed = True # place the old man cave's entrance somewhere random.shuffle(entrances) old_man_entrance = entrances.pop() connect_two_way(world, old_man_entrance, 'Old Man Cave Exit (West)', player) - # now scramble the rest connect_caves(world, entrances, [], caves, player) + if removed: + entrances.append('Bonk Fairy (Light)') + # scramble holes scramble_holes(world, player) @@ -971,6 +997,13 @@ def link_entrances(world, player): connect_entrance(world, bomb_shop, 'Big Bomb Shop', player) doors.remove(bomb_shop) + # standard mode cannot have Bonk Fairy Light be a connector in case of + # starting boots or boots are in links house, etc. + removed = False + if world.mode[player] == 'standard' and 'Bonk Fairy (Light)' in doors: + doors.remove('Bonk Fairy (Light)') + removed = True + # handle remaining caves for cave in caves: if isinstance(cave, str): @@ -980,6 +1013,9 @@ def link_entrances(world, player): connect_exit(world, exit, exit_pool.pop(), player) connect_entrance(world, doors.pop(), exit, player) + if removed: + doors.append('Bonk Fairy (Light)') + # place remaining doors connect_doors(world, doors, door_targets, player) elif world.shuffle[player] == 'insanity_legacy': diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 7098107e..2574015a 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -15,6 +15,9 @@ CLI: ```--bombbag``` # Bug Fixes and Notes. +* 0.5.1.5 + * Fix for hard pool capacity upgrades missing + * Bonk Fairy (Light) is no longer in logic for ER Standard and is forbidden to be a connector, so rain state isn't exitable * 0.5.1.4 * Revert quadrant glitch fix for baserom * Fix for inverted diff --git a/Rules.py b/Rules.py index 0d657844..cf19fbb1 100644 --- a/Rules.py +++ b/Rules.py @@ -1212,7 +1212,7 @@ def standard_rules(world, player): 'North Fairy Cave', 'North Fairy Cave Drop', 'Lost Woods Gamble', 'Snitch Lady (East)', 'Snitch Lady (West)', 'Tavern (Front)', 'Bush Covered House', 'Light World Bomb Hut', 'Kakariko Shop', 'Long Fairy Cave', 'Good Bee Cave', '20 Rupee Cave', 'Cave Shop (Lake Hylia)', - 'Waterfall of Wishing', 'Hyrule Castle Main Gate', '50 Rupee Cave', + 'Waterfall of Wishing', 'Hyrule Castle Main Gate', '50 Rupee Cave', 'Bonk Fairy (Light)', 'Fortune Teller (Light)', 'Lake Hylia Fairy', 'Light Hype Fairy', 'Desert Fairy', 'Lumberjack House', 'Lake Hylia Fortune Teller', 'Kakariko Gamble Game', 'Top of Pyramid']: add_rule(world.get_entrance(entrance, player), lambda state: state.has('Zelda Delivered', player)) From 4b0c2afa987e3a40ed0c9d52cf068dcbc70ef3b0 Mon Sep 17 00:00:00 2001 From: aerinon Date: Wed, 27 Oct 2021 14:30:25 -0600 Subject: [PATCH 3/3] Retro + enemizer fix for arrows under pots --- RELEASENOTES.md | 1 + Rom.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 2574015a..54da4dfc 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -18,6 +18,7 @@ CLI: ```--bombbag``` * 0.5.1.5 * Fix for hard pool capacity upgrades missing * Bonk Fairy (Light) is no longer in logic for ER Standard and is forbidden to be a connector, so rain state isn't exitable + * Bug fix for retro + enemizer and arrows appearing under pots * 0.5.1.4 * Revert quadrant glitch fix for baserom * Fix for inverted diff --git a/Rom.py b/Rom.py index ccfa4c43..eaa78bfe 100644 --- a/Rom.py +++ b/Rom.py @@ -1454,6 +1454,8 @@ def patch_rom(world, rom, player, team, enemized, is_mystery=False): rom.write_byte(0x180176, 0x0A if world.retro[player] else 0x00) # wood arrow cost rom.write_byte(0x180178, 0x32 if world.retro[player] else 0x00) # silver arrow cost rom.write_byte(0x301FC, 0xDA if world.retro[player] else 0xE1) # rupees replace arrows under pots + if enemized: + rom.write_byte(0x1B152e, 0xDA if world.retro[player] else 0xE1) rom.write_byte(0x30052, 0xDB if world.retro[player] else 0xE2) # replace arrows in fish prize from bottle merchant rom.write_bytes(0xECB4E, [0xA9, 0x00, 0xEA, 0xEA] if world.retro[player] else [0xAF, 0x77, 0xF3, 0x7E]) # Thief steals rupees instead of arrows rom.write_bytes(0xF0D96, [0xA9, 0x00, 0xEA, 0xEA] if world.retro[player] else [0xAF, 0x77, 0xF3, 0x7E]) # Pikit steals rupees instead of arrows