Fix up some key rules.
This commit is contained in:
parent
6eff675ae7
commit
52835bba5c
10
Dungeons.py
10
Dungeons.py
|
@ -1,10 +1,9 @@
|
|||
from Items import ItemFactory
|
||||
import random
|
||||
from BaseClasses import CollectionState
|
||||
|
||||
|
||||
def fill_dungeons(world):
|
||||
ES = (['Hyrule Castle'], None, [ItemFactory('Small Key (Escape)')], [ItemFactory('Map (Escape)')])
|
||||
ES = (['Hyrule Castle', 'Sewers', 'Sewers (Dark)', 'Sanctuary'], None, [ItemFactory('Small Key (Escape)')], [ItemFactory('Map (Escape)')])
|
||||
EP = (['Eastern Palace'], ItemFactory('Big Key (Eastern Palace)'), [], ItemFactory(['Map (Eastern Palace)', 'Compass (Eastern Palace)']))
|
||||
DP = (['Desert Palace North', 'Desert Palace Main', 'Desert Palace East'], ItemFactory('Big Key (Desert Palace)'), [ItemFactory('Small Key (Desert Palace)')], ItemFactory(['Map (Desert Palace)', 'Compass (Desert Palace)']))
|
||||
ToH = (['Tower of Hera (Bottom)', 'Tower of Hera (Basement)', 'Tower of Hera (Top)'], ItemFactory('Big Key (Tower of Hera)'), [ItemFactory('Small Key (Tower of Hera)')], ItemFactory(['Map (Tower of Hera)', 'Compass (Tower of Hera)']))
|
||||
|
@ -22,11 +21,8 @@ def fill_dungeons(world):
|
|||
|
||||
all_state_base = world.get_all_state()
|
||||
|
||||
# this key is in a fixed location (for now)
|
||||
mandatory_sw_key_location = random.choice(['[dungeon-D3-B1] Skull Woods - South of Big Chest'] if world.shuffle != 'vanilla' else ['[dungeon-D3-B1] Skull Woods - South of Big Chest', '[dungeon-D3-B1] Skull Woods - Push Statue Room', '[dungeon-D3-B1] Skull Woods - Compass Room'])
|
||||
|
||||
world.push_item(world.get_location(mandatory_sw_key_location), ItemFactory('Small Key (Skull Woods)'), False)
|
||||
world.get_location(mandatory_sw_key_location).event = True
|
||||
world.push_item(world.get_location('[dungeon-D3-B1] Skull Woods - South of Big Chest'), ItemFactory('Small Key (Skull Woods)'), False)
|
||||
world.get_location('[dungeon-D3-B1] Skull Woods - South of Big Chest').event = True
|
||||
|
||||
dungeons = [TR, ES, EP, DP, ToH, AT, PoD, TT, SW, IP, MM, GT, SP]
|
||||
for dungeon in dungeons:
|
||||
|
|
12
Rules.py
12
Rules.py
|
@ -327,10 +327,8 @@ def no_glitches_rules(world):
|
|||
set_rule(world.get_entrance('7 Chest Cave Push Block Reverse'), lambda state: False) # no glitches does not require block override
|
||||
set_rule(world.get_entrance('7 Chest Cave Bomb Jump'), lambda state: False)
|
||||
|
||||
# if pyramid hole leads to big chest hole in skull woods, skull woods holds a crystal and ganon's tower is vanilla, the SW big chest cannot hold a small key
|
||||
if world.get_entrance('Pyramid Hole').connected_region.name == 'Skull Woods First Section (Top)' and world.get_entrance('Ganons Tower').connected_region.name == 'Ganons Tower (Entrance)' and\
|
||||
'Crystal' in world.get_location('Mothula - Crystal').item.name:
|
||||
forbid_item(world.get_location('[dungeon-D3-B1] Skull Woods - Big Chest'), 'Small Key (Skull Woods')
|
||||
# need to be able to drop into hole to reach big chest, bombjumps are not expected
|
||||
add_rule(world.get_location('[dungeon-D3-B1] Skull Woods - Big Chest'), lambda state: state.can_reach('Skull Woods First Section (Top)', 'Region'))
|
||||
|
||||
# Light cones in standard depend on which world we actually are in, not which one the location would normally be
|
||||
# We add Lamp requirements only to those locations which lie in the dark world (or everything if open
|
||||
|
@ -376,7 +374,9 @@ def no_glitches_rules(world):
|
|||
|
||||
|
||||
def open_rules(world):
|
||||
pass
|
||||
# softlock protection as you can reach the sewers small key door with a guard drop key
|
||||
forbid_item(world.get_location('[dungeon-C-B1] Hyrule Castle - Boomerang Room'), 'Small Key (Escape)')
|
||||
forbid_item(world.get_location('[dungeon-C-B1] Hyrule Castle - Next To Zelda'), 'Small Key (Escape)')
|
||||
|
||||
|
||||
def swordless_rules(world):
|
||||
|
@ -402,6 +402,8 @@ def standard_rules(world):
|
|||
|
||||
|
||||
def set_trock_key_rules(world):
|
||||
# ToDo If only second section entrance is available, we may very well run out of valid key locations currently.
|
||||
|
||||
# this is good enough to allow even key distribution but may still prevent certain valid item combinations from being placed
|
||||
|
||||
all_state = world.get_all_state()
|
||||
|
|
Loading…
Reference in New Issue