diff --git a/ItemList.py b/ItemList.py index 935e2e61..dacbdf14 100644 --- a/ItemList.py +++ b/ItemList.py @@ -44,6 +44,7 @@ Difficulty = namedtuple('Difficulty', 'progressive_bow_limit', 'heart_piece_limit', 'boss_heart_container_limit']) total_items_to_place = 153 +max_goal = 850 difficulties = { 'normal': Difficulty( @@ -203,6 +204,7 @@ def generate_itempool(world, player): world.push_item(loc, ItemFactory('Triforce', player), False) loc.event = True loc.locked = True + loc.forced_item = loc.item world.get_location('Ganon', player).event = True world.get_location('Ganon', player).locked = True @@ -774,7 +776,8 @@ def get_pool_core(progressive, shuffle, difficulty, treasure_hunt_total, timer, if goal in ['triforcehunt', 'trinity']: if treasure_hunt_total == 0: treasure_hunt_total = 30 if goal == 'triforcehunt' else 10 - triforcepool = ['Triforce Piece'] * int(treasure_hunt_total) + # triforce pieces max out + triforcepool = ['Triforce Piece'] * min(treasure_hunt_total, max_goal) pool.extend(alwaysitems) @@ -967,8 +970,8 @@ def make_custom_item_pool(progressive, shuffle, difficulty, timer, goal, mode, s pool.append(thisbottle) if customitemarray["triforcepieces"] > 0 or customitemarray["triforcepiecesgoal"] > 0: - # To display, count must be between 1 and 254 - larger values are not yet supported - treasure_hunt_count = max(min(customitemarray["triforcepiecesgoal"], 254), 1) + # Location pool doesn't support larger values + treasure_hunt_count = max(min(customitemarray["triforcepiecesgoal"], max_goal), 1) treasure_hunt_icon = 'Triforce Piece' # Ensure game is always possible to complete here, force sufficient pieces if the player is unwilling. if ((customitemarray["triforcepieces"] < treasure_hunt_count) and (goal in ['triforcehunt', 'trinity']) @@ -1053,7 +1056,7 @@ def make_customizer_pool(world, player): return pool, placed_items, precollected_items, clock_mode, 1 -# To display, count must be between 1 and 254 - larger values are not yet supported +# location pool doesn't support larger values at this time def set_default_triforce(goal, custom_goal, custom_total): triforce_goal, triforce_total = 0, 0 if goal == 'triforcehunt': @@ -1061,9 +1064,9 @@ def set_default_triforce(goal, custom_goal, custom_total): elif goal == 'trinity': triforce_goal, triforce_total = 8, 10 if custom_goal > 0: - triforce_goal = max(min(custom_goal, 254), 1) + triforce_goal = max(min(custom_goal, max_goal), 1) if custom_total > 0: - triforce_total = max(min(custom_total, 254), triforce_goal) + triforce_total = max(min(custom_total, max_goal), triforce_goal) return triforce_goal, triforce_total diff --git a/Main.py b/Main.py index c2af3655..75fd4dd6 100644 --- a/Main.py +++ b/Main.py @@ -103,8 +103,8 @@ 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 = args.triforce_goal.copy() - world.treasure_hunt_total = args.triforce_pool.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.pseudoboots = args.pseudoboots.copy() world.overworld_map = args.overworld_map.copy() diff --git a/RELEASENOTES.md b/RELEASENOTES.md index b18c1af0..668c1c52 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -157,6 +157,15 @@ Same as above but both small keys and bigs keys of the dungeon are not allowed o #### Volatile +* 1.0.2.0 + * Updated baserom to bleeding edge + * Pottery and enemy SRAM re-located to final destination + * Bulk of work on new font + * Updated TFH to support up to 850 pieces + * Fix for major item algorithm and pottery + * Updated map display on keysanity menu to work better with overworld_amp option + * Minor bug in crossed doors + * Minor bug in MultiClient which would count switches * 1.0.1.13 * New pottery modes * Trinity goal added diff --git a/Rom.py b/Rom.py index 3f1506ea..dcda3719 100644 --- a/Rom.py +++ b/Rom.py @@ -37,7 +37,7 @@ from source.dungeon.RoomList import Room0127 JAP10HASH = '03a63945398191337e896e5771f77173' -RANDOMIZERBASEHASH = '3c85536ef5463d329adb2e9e3cda654a' +RANDOMIZERBASEHASH = '8b87b7c4f37ab57463b93c5afd353299' class JsonRom(object): @@ -1197,7 +1197,8 @@ def patch_rom(world, rom, player, team, enemized, is_mystery=False): rom.write_byte(0x18003F, 0x01 if world.swords[player] == 'swordless' else 0x00) # hammer can harm ganon rom.write_byte(0x180041, 0x01 if world.swords[player] == 'swordless' else 0x00) # swordless medallions rom.write_byte(0x180044, 0x01 if world.swords[player] == 'swordless' else 0x00) # hammer activates tablets - rom.initial_sram.set_swordless_curtains() # open curtains + if world.swords[player] == 'swordless': + rom.initial_sram.set_swordless_curtains() # open curtains # set up clocks for timed modes if world.shuffle[player] == 'vanilla': @@ -1245,7 +1246,7 @@ def patch_rom(world, rom, player, team, enemized, is_mystery=False): # set up goals for treasure hunt rom.write_bytes(0x180165, [0x0E, 0x28] if world.treasure_hunt_icon[player] == 'Triforce Piece' else [0x0D, 0x28]) if world.goal[player] in ['triforcehunt', 'trinity']: - rom.write_byte(0x180167, int(world.treasure_hunt_count[player]) % 256) + rom.write_bytes(0x180167, int16_as_bytes(world.treasure_hunt_count[player])) rom.write_byte(0x180194, 1) # Must turn in triforced pieces (instant win not enabled) rom.write_bytes(0x180213, [0x00, 0x01]) # Not a Tournament Seed diff --git a/data/base2current.bps b/data/base2current.bps index 43f2319e..ecddb99b 100644 Binary files a/data/base2current.bps and b/data/base2current.bps differ diff --git a/source/item/FillUtil.py b/source/item/FillUtil.py index 4f052bd4..9614eeef 100644 --- a/source/item/FillUtil.py +++ b/source/item/FillUtil.py @@ -275,7 +275,7 @@ def massage_item_pool(world): world.itempool.remove(deleted) discrepancy -= 1 if discrepancy > 0: - logging.getLogger('').warning(f'Too many good items in pool, something will be removed at random') + raise Exception(f'Too many required items in pool, {discrepancy} items cannot be placed') if world.item_pool_config.placeholders is not None: removed = 0 single_rupees = [item for item in world.itempool if item.name == 'Rupee (1)']