From dd18f13930399db92c83a715943a69f110c23481 Mon Sep 17 00:00:00 2001 From: aerinon Date: Thu, 24 Feb 2022 14:39:07 -0700 Subject: [PATCH] Trash ditching method rebalanced for lots of triforce pieces Added a few places Links House shouldn't go when shuffled Ped goal + vanilla sword = random sword in pool --- EntranceShuffle.py | 16 ++++++++-------- ItemList.py | 16 +++++----------- RELEASENOTES.md | 3 +++ source/item/FillUtil.py | 25 ++++--------------------- 4 files changed, 20 insertions(+), 40 deletions(-) diff --git a/EntranceShuffle.py b/EntranceShuffle.py index f606b52e..835f56a4 100644 --- a/EntranceShuffle.py +++ b/EntranceShuffle.py @@ -2557,10 +2557,10 @@ Isolated_LH_Doors_Open = ['Mimic Cave', 'Desert Palace Entrance (South)', 'Desert Palace Entrance (North)', 'Capacity Upgrade', - 'Ice Palace', - 'Skull Woods Final Section', - 'Dark World Hammer Peg Cave', - 'Turtle Rock Isolated Ledge Entrance'] + 'Ice Palace', 'Dark World Shop', 'Dark World Potion Shop', + 'Skull Woods Final Section', 'Skull Woods Second Section Door (West)', + 'Dark World Hammer Peg Cave', 'Dark Death Mountain Ledge (West)', + 'Turtle Rock Isolated Ledge Entrance', 'Dark Death Mountain Ledge (East)'] DW_Single_Cave_Doors = ['Bonk Fairy (Dark)', 'Dark Sanctuary Hint', @@ -3033,10 +3033,10 @@ Isolated_LH_Doors = ['Kings Grave', 'Desert Palace Entrance (South)', 'Desert Palace Entrance (North)', 'Capacity Upgrade', - 'Ice Palace', - 'Skull Woods Final Section', - 'Dark World Hammer Peg Cave', - 'Turtle Rock Isolated Ledge Entrance'] + 'Ice Palace', 'Dark World Shop', 'Dark World Potion Shop', + 'Skull Woods Final Section', 'Skull Woods Second Section Door (West)', + 'Dark World Hammer Peg Cave', 'Dark Death Mountain Ledge (West)', + 'Turtle Rock Isolated Ledge Entrance', 'Dark Death Mountain Ledge (East)'] # Entrances that cannot be used to access a must_exit entrance - symmetrical to allow reverse lookups Must_Exit_Invalid_Connections = defaultdict(set, { diff --git a/ItemList.py b/ItemList.py index d995e516..67b63c80 100644 --- a/ItemList.py +++ b/ItemList.py @@ -796,7 +796,7 @@ def get_pool_core(progressive, shuffle, difficulty, treasure_hunt_total, timer, lamps_needed_for_dark_rooms = 1 # insanity shuffle doesn't have fake LW/DW logic so for now guaranteed Mirror and Moon Pearl at the start - if shuffle == 'insanity_legacy': + if shuffle == 'insanity_legacy': place_item('Link\'s House', 'Magic Mirror') place_item('Sanctuary', 'Moon Pearl') else: @@ -854,6 +854,7 @@ def get_pool_core(progressive, shuffle, difficulty, treasure_hunt_total, timer, place_item('Master Sword Pedestal', swords_to_use.pop()) else: place_item('Master Sword Pedestal', 'Triforce') + pool.append(swords_to_use.pop()) else: pool.extend(diff.progressivesword if want_progressives() else diff.basicsword) if swords == 'assured': @@ -865,26 +866,19 @@ def get_pool_core(progressive, shuffle, difficulty, treasure_hunt_total, timer, pool.remove('Fighter Sword') pool.extend(['Rupees (50)']) - extraitems = total_items_to_place - len(pool) - len(placed_items) - if timer in ['timed', 'timed-countdown']: pool.extend(diff.timedother) - extraitems -= len(diff.timedother) clock_mode = 'stopwatch' if timer == 'timed' else 'countdown' elif timer == 'timed-ohko': pool.extend(diff.timedohko) - extraitems -= len(diff.timedohko) clock_mode = 'countdown-ohko' if goal == 'triforcehunt': pool.extend(triforcepool) - extraitems -= len(triforcepool) for extra in diff.extras: - if extraitems > 0: - if len(extra) > extraitems: - extra = random.choices(extra, k=extraitems) - pool.extend(extra) - extraitems -= len(extra) + pool.extend(extra) + + # note: massage item pool now handles shrinking the pool appropriately if goal == 'pedestal' and swords != 'vanilla': place_item('Master Sword Pedestal', 'Triforce') diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 9ec8d333..fb87f6fb 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -151,6 +151,9 @@ Same as above but both small keys and bigs keys of the dungeon are not allowed o * Expanded Mystery logic options (e.g. owglitches) * Allowed Mystery.py to create BPS patches * Allow creation of BPS and SFC files (no longer mutually exclusive) + * Pedestal goal + vanilla swords places a random sword in the pool + * Rebalanced trash ditching algo for seeds with lots of triforce pieces + * Added a few more places Links House shouldn't go when shuffled * Fixed a bug with shopsanity + district algorithm where pre-placed potions messed up the placeholder count * Fixed usestartinventory flag (can be use on a per player basis) * Fix for map indicators on keysanity menu not showing up diff --git a/source/item/FillUtil.py b/source/item/FillUtil.py index 4fbafdd9..ffe74956 100644 --- a/source/item/FillUtil.py +++ b/source/item/FillUtil.py @@ -829,28 +829,11 @@ vanilla_swords = {"Link's Uncle", 'Master Sword Pedestal', 'Blacksmith', 'Pyrami trash_items = { 'Nothing': -1, 'Bee Trap': 0, - 'Rupee (1)': 1, - 'Rupees (5)': 1, - 'Rupees (20)': 1, - - 'Small Heart': 2, - 'Bee': 2, - 'Arrows (5)': 2, - 'Chicken': 2, - 'Single Bomb': 2, - - 'Bombs (3)': 3, - 'Arrows (10)': 3, - 'Bombs (10)': 3, - 'Small Magic': 3, - - 'Big Magic': 4, - 'Red Potion': 4, - 'Blue Shield': 4, - 'Rupees (50)': 4, - 'Rupees (100)': 4, + 'Rupee (1)': 1, 'Rupees (5)': 1, 'Small Heart': 1, 'Bee': 1, 'Arrows (5)': 1, 'Chicken': 1, 'Single Bomb': 1, + 'Rupees (20)': 2, 'Small Magic': 2, + 'Bombs (3)': 3, 'Arrows (10)': 3, 'Bombs (10)': 3, + 'Big Magic': 4, 'Red Potion': 4, 'Blue Shield': 4, 'Rupees (50)': 4, 'Rupees (100)': 4, 'Rupees (300)': 5, - 'Piece of Heart': 17 }