Boss fix and rules for Ice Refill added
This commit is contained in:
@@ -201,15 +201,15 @@ def place_bosses(world, player):
|
|||||||
|
|
||||||
place_boss(boss, level, loc, loc_text, world, player)
|
place_boss(boss, level, loc, loc_text, world, player)
|
||||||
elif world.boss_shuffle[player] == 'unique':
|
elif world.boss_shuffle[player] == 'unique':
|
||||||
bosses = placeable_bosses
|
bosses = list(placeable_bosses)
|
||||||
|
|
||||||
for [loc, level] in boss_locations:
|
for [loc, level] in boss_locations:
|
||||||
loc_text = loc + (' ('+level+')' if level else '')
|
loc_text = loc + (' ('+level+')' if level else '')
|
||||||
try:
|
try:
|
||||||
if level:
|
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:
|
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)
|
bosses.remove(boss)
|
||||||
except IndexError:
|
except IndexError:
|
||||||
raise FillError('Could not place boss for location %s' % loc_text)
|
raise FillError('Could not place boss for location %s' % loc_text)
|
||||||
|
|||||||
6
Rules.py
6
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:
|
for l in world.get_region('Dark Lake Hylia Ledge Spike Cave', player).locations:
|
||||||
if l.type == LocationType.Pot:
|
if l.type == LocationType.Pot:
|
||||||
add_rule(l, lambda state: state.world.can_take_damage or state.has('Hookshot', player))
|
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:
|
for l in world.get_region('Ice Hammer Block', player).locations:
|
||||||
if l.type == LocationType.Pot:
|
if l.type == LocationType.Pot:
|
||||||
add_rule(l, lambda state: state.has('Hammer', player) and state.can_lift_rocks(player))
|
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:
|
if loc:
|
||||||
set_rule(loc, lambda state: (state.world.can_take_damage and state.has_hearts(player, 4))
|
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))
|
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))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user