Merged in DR v1.2.0.19

This commit is contained in:
codemann8
2023-07-29 05:03:37 -05:00
13 changed files with 70 additions and 43 deletions

24
Main.py
View File

@@ -36,7 +36,7 @@ from source.overworld.EntranceShuffle2 import link_entrances_new
from source.tools.BPS import create_bps_from_data
from source.classes.CustomSettings import CustomSettings
version_number = '1.2.0.18'
version_number = '1.2.0.19'
version_branch = '-u'
__version__ = f'{version_number}{version_branch}'
@@ -131,8 +131,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()
@@ -142,6 +140,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])), 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:
# 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()