From 4dfd6023084e5d31c5e3810986b5d7f26e99bf99 Mon Sep 17 00:00:00 2001 From: aerinon Date: Tue, 15 Feb 2022 17:03:24 -0700 Subject: [PATCH] Boss fix and rules for Ice Refill added --- Bosses.py | 6 +++--- Rules.py | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Bosses.py b/Bosses.py index 4e22bc8b..53393d5f 100644 --- a/Bosses.py +++ b/Bosses.py @@ -201,15 +201,15 @@ def place_bosses(world, player): place_boss(boss, level, loc, loc_text, world, player) elif world.boss_shuffle[player] == 'unique': - bosses = placeable_bosses + bosses = list(placeable_bosses) for [loc, level] in boss_locations: loc_text = loc + (' ('+level+')' if level else '') try: if level: - boss = random.choice(b for b in placeable_bosses if can_place_boss(world, player, b, loc, level)) + boss = random.choice([b for b in placeable_bosses if can_place_boss(world, player, b, loc, level)]) else: - boss = random.choice(b for b in bosses if can_place_boss(world, player, b, loc, level)) + boss = random.choice([b for b in bosses if can_place_boss(world, player, b, loc, level)]) bosses.remove(boss) except IndexError: raise FillError('Could not place boss for location %s' % loc_text) diff --git a/Rules.py b/Rules.py index d6f8d232..37ff2e06 100644 --- a/Rules.py +++ b/Rules.py @@ -739,6 +739,8 @@ def pot_rules(world, player): for l in world.get_region('Dark Lake Hylia Ledge Spike Cave', player).locations: if l.type == LocationType.Pot: add_rule(l, lambda state: state.world.can_take_damage or state.has('Hookshot', player)) + + # dungeons for l in world.get_region('Ice Hammer Block', player).locations: if l.type == LocationType.Pot: add_rule(l, lambda state: state.has('Hammer', player) and state.can_lift_rocks(player)) @@ -750,6 +752,10 @@ def pot_rules(world, player): if loc: set_rule(loc, lambda state: (state.world.can_take_damage and state.has_hearts(player, 4)) or state.has('Cane of Byrna', player) or state.has('Cape', player)) + for l in world.get_region('Ice Refill', player).locations: + if l.type == LocationType.Pot: + # or can_reach_blue is redundant as you have to hit a crystal switch somewhere... + add_rule(l, lambda state: state.can_hit_crystal(player))