Implement triforce_max_difference
This commit is contained in:
3
CLI.py
3
CLI.py
@@ -132,7 +132,7 @@ def parse_cli(argv, no_defaults=False):
|
||||
'flute_mode', 'bow_mode', 'take_any', 'boots_hint',
|
||||
'shuffle', 'door_shuffle', 'intensity', 'crystals_ganon', 'crystals_gt', 'openpyramid',
|
||||
'mapshuffle', 'compassshuffle', 'keyshuffle', 'bigkeyshuffle', 'startinventory',
|
||||
'usestartinventory', 'bombbag', 'overworld_map', 'restrict_boss_items',
|
||||
'usestartinventory', 'bombbag', 'overworld_map', 'restrict_boss_items', 'triforce_max_difference',
|
||||
'triforce_pool_min', 'triforce_pool_max', 'triforce_goal_min', 'triforce_goal_max',
|
||||
'triforce_min_difference', 'triforce_goal', 'triforce_pool', 'shufflelinks', 'shuffletavern',
|
||||
'pseudoboots', 'retro', 'accessibility', 'hints', 'beemizer', 'experimental', 'dungeon_counters',
|
||||
@@ -230,6 +230,7 @@ def parse_settings():
|
||||
"triforce_goal_min": 0,
|
||||
"triforce_goal_max": 0,
|
||||
"triforce_min_difference": 0,
|
||||
"triforce_max_difference": 10000,
|
||||
|
||||
"code": "",
|
||||
"multi": 1,
|
||||
|
||||
2
Main.py
2
Main.py
@@ -146,7 +146,7 @@ def main(args, seed=None, fish=None):
|
||||
if int(args.triforce_pool[p]) != 0:
|
||||
world.treasure_hunt_total[p] = int(args.triforce_pool[p])
|
||||
elif int(args.triforce_pool_min[p]) != 0 and int(args.triforce_pool_max[p]) != 0:
|
||||
world.treasure_hunt_total[p] = random.randint(max(int(args.triforce_pool_min[p]), world.treasure_hunt_count[p] + int(args.triforce_min_difference[p])), int(args.triforce_pool_max[p]))
|
||||
world.treasure_hunt_total[p] = random.randint(max(int(args.triforce_pool_min[p]), world.treasure_hunt_count[p] + int(args.triforce_min_difference[p])), min(int(args.triforce_pool_max[p]), world.treasure_hunt_count[p] + int(args.triforce_max_difference[p])))
|
||||
else:
|
||||
world.treasure_hunt_total[p] = 10 if world.goal[p] == 'trinity' else 30
|
||||
else:
|
||||
|
||||
@@ -573,13 +573,14 @@ Create bps patch(es) instead of generating rom(s) for distribution. `--bps`
|
||||
|
||||
### Triforce Hunt Settings
|
||||
|
||||
A collection of settings to control the triforce piece pool for the CLI/Mystery
|
||||
A collection of settings to control the triforce piece pool if not specified through --triforce_goal and --triforce_pool
|
||||
|
||||
* --triforce_goal_min: Minimum number of pieces to collect to win
|
||||
* --triforce_goal_max: Maximum number of pieces to collect to win
|
||||
* --triforce_pool_min: Minimum number of pieces in item pool
|
||||
* --triforce_pool_max: Maximum number of pieces in item pool
|
||||
* --triforce_min_difference: Minimum difference between pool and goal to win
|
||||
* --triforce_max_difference: Maximum difference between pool and goal to win
|
||||
|
||||
### Seed
|
||||
|
||||
|
||||
@@ -107,6 +107,7 @@
|
||||
triforce_pool_min: 20
|
||||
triforce_pool_max: 40
|
||||
triforce_min_difference: 10
|
||||
triforce_max_difference: 15
|
||||
dungeon_items:
|
||||
standard: 10
|
||||
mc: 3
|
||||
|
||||
@@ -83,6 +83,7 @@ triforce_goal_max: 30
|
||||
triforce_pool_min: 30
|
||||
triforce_pool_max: 40
|
||||
triforce_min_difference: 10
|
||||
triforce_max_difference: 12
|
||||
map_shuffle:
|
||||
on: 1
|
||||
off: 1
|
||||
|
||||
@@ -339,6 +339,7 @@
|
||||
"triforce_goal_min": {},
|
||||
"triforce_goal_max": {},
|
||||
"triforce_min_difference": {},
|
||||
"triforce_max_difference": {},
|
||||
"custom": {
|
||||
"type": "bool",
|
||||
"help": "suppress"
|
||||
|
||||
@@ -149,6 +149,7 @@ class CustomSettings(object):
|
||||
args.triforce_pool_min[p] = get_setting(settings['triforce_pool_min'], args.triforce_pool_min[p])
|
||||
args.triforce_pool_max[p] = get_setting(settings['triforce_pool_max'], args.triforce_pool_max[p])
|
||||
args.triforce_min_difference[p] = get_setting(settings['triforce_min_difference'], args.triforce_min_difference[p])
|
||||
args.triforce_max_difference[p] = get_setting(settings['triforce_max_difference'], args.triforce_max_difference[p])
|
||||
args.beemizer[p] = get_setting(settings['beemizer'], args.beemizer[p])
|
||||
|
||||
# mystery usage
|
||||
|
||||
@@ -132,6 +132,7 @@ def roll_settings(weights):
|
||||
ret.triforce_goal_min = get_choice_default('triforce_goal_min', default=0)
|
||||
ret.triforce_goal_max = get_choice_default('triforce_goal_max', default=0)
|
||||
ret.triforce_min_difference = get_choice_default('triforce_min_difference', default=0)
|
||||
ret.triforce_max_difference = get_choice_default('triforce_max_difference', default=10000)
|
||||
|
||||
ret.mode = get_choice('world_state')
|
||||
if ret.mode == 'retro':
|
||||
|
||||
Reference in New Issue
Block a user