Move Triforce Pieces Min and Max handling to Main
This commit is contained in:
22
Main.py
22
Main.py
@@ -124,8 +124,6 @@ def main(args, seed=None, fish=None):
|
||||
world.potshuffle = args.shufflepots.copy()
|
||||
world.mixed_travel = args.mixed_travel.copy()
|
||||
world.standardize_palettes = args.standardize_palettes.copy()
|
||||
world.treasure_hunt_count = {k: int(v) for k, v in args.triforce_goal.items()}
|
||||
world.treasure_hunt_total = {k: int(v) for k, v in args.triforce_pool.items()}
|
||||
world.shufflelinks = args.shufflelinks.copy()
|
||||
world.shuffletavern = args.shuffletavern.copy()
|
||||
world.pseudoboots = args.pseudoboots.copy()
|
||||
@@ -135,6 +133,26 @@ def main(args, seed=None, fish=None):
|
||||
world.collection_rate = args.collection_rate.copy()
|
||||
world.colorizepots = args.colorizepots.copy()
|
||||
|
||||
world.treasure_hunt_count = {}
|
||||
world.treasure_hunt_total = {}
|
||||
for p in args.triforce_goal:
|
||||
if int(args.triforce_goal[p]) != 0 or int(args.triforce_pool[p]) != 0 or int(args.triforce_goal_min[p]) != 0 or int(args.triforce_goal_max[p]) != 0 or int(args.triforce_pool_min[p]) != 0 or int(args.triforce_pool_max[p]) != 0:
|
||||
if int(args.triforce_goal[p]) != 0:
|
||||
world.treasure_hunt_count[p] = int(args.triforce_goal[p])
|
||||
elif int(args.triforce_goal_min[p]) != 0 and int(args.triforce_goal_max[p]) != 0:
|
||||
world.treasure_hunt_count[p] = random.randint(int(args.triforce_goal_min[p]), int(args.triforce_goal_max[p]))
|
||||
else:
|
||||
world.treasure_hunt_count[p] = 8 if world.goal[p] == 'trinity' else 20
|
||||
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]))
|
||||
else:
|
||||
world.treasure_hunt_total[p] = 10 if world.goal[p] == 'trinity' else 30
|
||||
else:
|
||||
# this will be handled in ItemList.py and custom item pool is used to determine the numbers
|
||||
world.treasure_hunt_count[p], world.treasure_hunt_total[p] = 0, 0
|
||||
|
||||
world.rom_seeds = {player: random.randint(0, 999999999) for player in range(1, world.players + 1)}
|
||||
world.finish_init()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user