From 54cce4c392992a90719d9cf3477e14cc61305f98 Mon Sep 17 00:00:00 2001 From: alwaysintreble Date: Sun, 12 Mar 2023 05:03:48 -0500 Subject: [PATCH] LTTP: fix ice rod hunt boss shuffle (#1529) --- worlds/alttp/ItemPool.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/worlds/alttp/ItemPool.py b/worlds/alttp/ItemPool.py index 80028c3f..7fd93ab9 100644 --- a/worlds/alttp/ItemPool.py +++ b/worlds/alttp/ItemPool.py @@ -9,7 +9,7 @@ from worlds.alttp.Dungeons import get_dungeon_item_pool_player from worlds.alttp.EntranceShuffle import connect_entrance from Fill import FillError from worlds.alttp.Items import ItemFactory, GetBeemizerItem -from worlds.alttp.Options import smallkey_shuffle, compass_shuffle, bigkey_shuffle, map_shuffle +from worlds.alttp.Options import smallkey_shuffle, compass_shuffle, bigkey_shuffle, map_shuffle, LTTPBosses from .StateHelpers import has_triforce_pieces, has_melee_weapon # This file sets the item pools for various modes. Timed modes and triforce hunt are enforced first, and then extra items are specified per mode to fill in the remaining space. @@ -250,8 +250,10 @@ def generate_itempool(world): world.push_item(loc, ItemFactory('Triforce Piece', player), False) world.treasure_hunt_count[player] = 1 if world.boss_shuffle[player] != 'none': - if 'turtle rock-' not in world.boss_shuffle[player]: - world.boss_shuffle[player] = f'Turtle Rock-Trinexx;{world.boss_shuffle[player]}' + if isinstance(world.boss_shuffle[player].value, str) and 'turtle rock-' not in world.boss_shuffle[player].value: + world.boss_shuffle[player] = LTTPBosses.from_text(f'Turtle Rock-Trinexx;{world.boss_shuffle[player].current_key}') + elif isinstance(world.boss_shuffle[player].value, int): + world.boss_shuffle[player] = LTTPBosses.from_text(f'Turtle Rock-Trinexx;{world.boss_shuffle[player].current_key}') else: logging.warning(f'Cannot guarantee that Trinexx is the boss of Turtle Rock for player {player}') loc.event = True