From 0df2b2221da7eb36a1f19b7a11230ecb4e2ecc98 Mon Sep 17 00:00:00 2001 From: espeon65536 Date: Sat, 11 Sep 2021 11:19:23 -0500 Subject: [PATCH] Separate triforce pieces in pool from the item pool setting --- playerSettings.yaml | 9 ++++++++- worlds/oot/ItemPool.py | 9 +-------- worlds/oot/Options.py | 13 +++++++++++-- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/playerSettings.yaml b/playerSettings.yaml index b1d6bc1b..dc26ed88 100644 --- a/playerSettings.yaml +++ b/playerSettings.yaml @@ -723,13 +723,20 @@ Ocarina of Time: triforce_hunt: # Gather pieces of the Triforce scattered around the world to complete the game. false: 50 true: 0 - triforce_goal: # Number of Triforce pieces required to complete the game. Total number placed determined by the Item Pool setting. + triforce_goal: # Number of Triforce pieces required to complete the game. # you can add additional values between minimum and maximum 1: 0 # minimum value 50: 0 # maximum value random: 50 random-low: 0 random-high: 0 + extra_triforce_percentage: # Percentage of additional Triforce pieces in the pool, separate from the item pool setting. + # you can add additional values between minimum and maximum + 0: 0 # minimum value + 100: 0 # maximum value + random: 50 + random-low: 0 + random-high: 0 bombchus_in_logic: # Bombchus are properly considered in logic. The first found pack will have 20 chus; Kokiri Shop and Bazaar sell refills; bombchus open Bombchu Bowling. false: 50 true: 0 diff --git a/worlds/oot/ItemPool.py b/worlds/oot/ItemPool.py index bfaa3f83..6efda566 100644 --- a/worlds/oot/ItemPool.py +++ b/worlds/oot/ItemPool.py @@ -115,13 +115,6 @@ item_difficulty_max = { }, } -TriforceCounts = { - 'plentiful': Decimal(2.00), - 'balanced': Decimal(1.50), - 'scarce': Decimal(1.25), - 'minimal': Decimal(1.00), -} - DT_vanilla = ( ['Recovery Heart'] * 2) @@ -1356,7 +1349,7 @@ def get_pool_core(world): world.remove_from_start_inventory.append(item.name) if world.triforce_hunt: - triforce_count = int((TriforceCounts[world.item_pool_value] * world.triforce_goal).to_integral_value(rounding=ROUND_HALF_UP)) + triforce_count = int((Decimal(100 + world.extra_triforce_percentage)/100 * world.triforce_goal).to_integral_value(rounding=ROUND_HALF_UP)) pending_junk_pool.extend(['Triforce Piece'] * triforce_count) if world.shuffle_ganon_bosskey == 'on_lacs': diff --git a/worlds/oot/Options.py b/worlds/oot/Options.py index 3dd1e96c..247edb58 100644 --- a/worlds/oot/Options.py +++ b/worlds/oot/Options.py @@ -109,13 +109,21 @@ class TriforceHunt(Toggle): class TriforceGoal(Range): - """Number of Triforce pieces required to complete the game. Total number placed determined by the Item Pool setting.""" + """Number of Triforce pieces required to complete the game.""" displayname = "Required Triforce Pieces" range_start = 1 - range_end = 50 + range_end = 100 default = 20 +class ExtraTriforces(Range): + """Percentage of additional Triforce pieces in the pool, separate from the item pool setting.""" + displayname = "Percentage of Extra Triforce Pieces" + range_start = 0 + range_end = 100 + default = 50 + + class LogicalChus(Toggle): """Bombchus are properly considered in logic. The first found pack will have 20 chus; Kokiri Shop and Bazaar sell refills; bombchus open Bombchu Bowling.""" displayname = "Bombchus Considered in Logic" @@ -132,6 +140,7 @@ world_options: typing.Dict[str, type(Option)] = { # "spawn_positions": Toggle, "triforce_hunt": TriforceHunt, "triforce_goal": TriforceGoal, + "extra_triforce_percentage": ExtraTriforces, "bombchus_in_logic": LogicalChus, # "mq_dungeons": make_range(0, 12), }