Added Old Man escorting to pathing logic
This commit is contained in:
@@ -1543,10 +1543,13 @@ class Entrance(object):
|
||||
self.temp_path = []
|
||||
|
||||
def can_reach(self, state):
|
||||
# Destination Pickup OW Only No Ledges Can S&Q Allow Mirror
|
||||
multi_step_locations = { 'Pyramid Crack': ('Big Bomb', True, True, False, True),
|
||||
'Missing Smith': ('Frog', True, False, True, True),
|
||||
'Middle Aged Man': ('Dark Blacksmith Ruins', True, False, True, True) }
|
||||
# Destination Pickup OW Only No Ledges Can S&Q Allow Mirror
|
||||
multi_step_locations = { 'Pyramid Crack': ('Big Bomb', True, True, False, True),
|
||||
'Missing Smith': ('Frog', True, False, True, True),
|
||||
'Middle Aged Man': ('Dark Blacksmith Ruins', True, False, True, True),
|
||||
'Old Man Drop Off': ('Lost Old Man', True, False, False, True),
|
||||
#'Revealing Light': ('Suspicious Maiden', False, False, False, False) }
|
||||
}
|
||||
|
||||
if self.name in multi_step_locations:
|
||||
if self not in state.path:
|
||||
@@ -2750,7 +2753,7 @@ class Spoiler(object):
|
||||
self.shops = []
|
||||
self.bosses = OrderedDict()
|
||||
|
||||
self.suppress_spoiler_locations = ['Big Bomb', 'Dark Blacksmith Ruins', 'Frog', 'Middle Aged Man']
|
||||
self.suppress_spoiler_locations = ['Big Bomb', 'Dark Blacksmith Ruins', 'Frog', 'Middle Aged Man', 'Lost Old Man']
|
||||
|
||||
def set_overworld(self, entrance, exit, direction, player):
|
||||
if self.world.players == 1:
|
||||
|
||||
@@ -2317,6 +2317,7 @@ indirect_connections = {
|
||||
#'Blacksmith Area': 'Pyramid Fairy', # Hammerpegs
|
||||
#'Forgotten Forest Area': 'Pyramid Fairy', # Shield Shop
|
||||
#'Desert Area': 'Pyramid Fairy', # Mire Area
|
||||
'Old Man Drop Off': 'Old Man S&Q',
|
||||
'Old Man Cave': 'Old Man S&Q'
|
||||
}
|
||||
# format:
|
||||
|
||||
@@ -216,6 +216,12 @@ def generate_itempool(world, player):
|
||||
world.push_item(world.get_location('Agahnim 2', player), ItemFactory('Beat Agahnim 2', player), False)
|
||||
world.get_location('Agahnim 2', player).event = True
|
||||
world.get_location('Agahnim 2', player).locked = True
|
||||
world.push_item(world.get_location('Lost Old Man', player), ItemFactory('Escort Old Man', player), False)
|
||||
world.get_location('Lost Old Man', player).event = True
|
||||
world.get_location('Lost Old Man', player).locked = True
|
||||
world.push_item(world.get_location('Old Man Drop Off', player), ItemFactory('Return Old Man', player), False)
|
||||
world.get_location('Old Man Drop Off', player).event = True
|
||||
world.get_location('Old Man Drop Off', player).locked = True
|
||||
world.push_item(world.get_location('Dark Blacksmith Ruins', player), ItemFactory('Pick Up Purple Chest', player), False)
|
||||
world.get_location('Dark Blacksmith Ruins', player).event = True
|
||||
world.get_location('Dark Blacksmith Ruins', player).locked = True
|
||||
|
||||
2
Items.py
2
Items.py
@@ -198,6 +198,8 @@ item_table = {'Bow': (True, False, None, 0x0B, 200, 'You have\nchosen the\narche
|
||||
'Hidden Pits': (True, False, 'Event', 999, None, None, None, None, None, None, None, None),
|
||||
'Zelda Herself': (True, False, 'Event', 999, None, None, None, None, None, None, None, None),
|
||||
'Zelda Delivered': (True, False, 'Event', 999, None, None, None, None, None, None, None, None),
|
||||
'Escort Old Man': (True, False, 'Event', 999, None, None, None, None, None, None, None, None),
|
||||
'Return Old Man': (True, False, 'Event', 999, None, None, None, None, None, None, None, None),
|
||||
'Farmable Bombs': (True, False, 'Event', 999, None, None, None, None, None, None, None, None),
|
||||
'Farmable Rupees': (True, False, 'Event', 999, None, None, None, None, None, None, None, None),
|
||||
}
|
||||
|
||||
@@ -1024,6 +1024,7 @@ OWTileRegions = bidict({
|
||||
'West Death Mountain (Top)': 0x03,
|
||||
'Spectacle Rock Ledge': 0x03,
|
||||
'West Death Mountain (Bottom)': 0x03,
|
||||
'Old Man Drop Off': 0x03,
|
||||
|
||||
'East Death Mountain (Top West)': 0x05,
|
||||
'East Death Mountain (Top East)': 0x05,
|
||||
@@ -1553,6 +1554,7 @@ OWExitTypes = {
|
||||
],
|
||||
'OWTerrain': ['Lost Woods Bush (West)',
|
||||
'Lost Woods Bush (East)',
|
||||
'Old Man Drop Off',
|
||||
'Spectacle Rock Approach',
|
||||
'Spectacle Rock Leave',
|
||||
'DM Hammer Bridge (West)',
|
||||
|
||||
@@ -1154,6 +1154,7 @@ mandatory_connections = [# Intra-tile OW Connections
|
||||
('Lost Woods Bush (East)', 'Lost Woods West Area'), #pearl
|
||||
('West Death Mountain Drop', 'West Death Mountain (Bottom)'),
|
||||
('Spectacle Rock Drop', 'West Death Mountain (Top)'),
|
||||
('Old Man Drop Off', 'Old Man Drop Off'),
|
||||
('DM Hammer Bridge (West)', 'East Death Mountain (Top East)'), #hammer
|
||||
('DM Hammer Bridge (East)', 'East Death Mountain (Top West)'), #hammer
|
||||
('East Death Mountain Spiral Ledge Drop', 'Spiral Cave Ledge'),
|
||||
|
||||
@@ -15,7 +15,8 @@ def create_regions(world, player):
|
||||
create_lw_region(player, 'Lumberjack Area', None, ['Lumberjack Tree Tree', 'Lumberjack Tree Cave', 'Lumberjack House', 'Dark Lumberjack Mirror Spot', 'Lumberjack WN', 'Lumberjack SW']),
|
||||
create_lw_region(player, 'West Death Mountain (Top)', ['Ether Tablet'], ['Spectacle Rock Approach', 'West Death Mountain Drop', 'Tower of Hera', 'West Dark Death Mountain (Top) Mirror Spot', 'West Death Mountain EN']),
|
||||
create_lw_region(player, 'Spectacle Rock Ledge', ['Spectacle Rock'], ['Spectacle Rock Leave', 'Spectacle Rock Drop', 'Bubble Boy Mirror Spot']),
|
||||
create_lw_region(player, 'West Death Mountain (Bottom)', None, ['Old Man Cave (East)', 'Old Man House (Bottom)', 'Old Man House (Top)', 'Death Mountain Return Cave (East)', 'Spectacle Rock Cave', 'Spectacle Rock Cave Peak', 'Spectacle Rock Cave (Bottom)', 'West Dark Death Mountain (Bottom) Mirror Spot', 'West Death Mountain Teleporter', 'West Death Mountain ES']),
|
||||
create_lw_region(player, 'West Death Mountain (Bottom)', ['Old Man'], ['Old Man Drop Off', 'Old Man Cave (East)', 'Old Man House (Bottom)', 'Old Man House (Top)', 'Death Mountain Return Cave (East)', 'Spectacle Rock Cave', 'Spectacle Rock Cave Peak', 'Spectacle Rock Cave (Bottom)', 'West Dark Death Mountain (Bottom) Mirror Spot', 'West Death Mountain Teleporter', 'West Death Mountain ES']),
|
||||
create_dw_region(player, 'Old Man Drop Off', ['Old Man Drop Off'], None),
|
||||
create_lw_region(player, 'East Death Mountain (Top West)', None, ['DM Hammer Bridge (West)', 'East Dark Death Mountain (Top West) Mirror Spot', 'East Death Mountain WN']),
|
||||
create_lw_region(player, 'East Death Mountain (Top East)', None, ['DM Hammer Bridge (East)', 'Floating Island Bridge (East)', 'East Death Mountain Spiral Ledge Drop', 'East Death Mountain Fairy Ledge Drop', 'East Death Mountain Mimic Ledge Drop', 'Paradox Cave (Top)', 'East Dark Death Mountain (Top East) Mirror Spot', 'East Death Mountain EN']),
|
||||
create_lw_region(player, 'Spiral Cave Ledge', None, ['Spiral Ledge Drop', 'Spiral Mimic Bridge (West)', 'Spiral Cave', 'TR Ledge (West) Mirror Spot']),
|
||||
@@ -233,7 +234,7 @@ def create_regions(world, player):
|
||||
create_cave_region(player, 'Lumberjack Tree (top)', 'a drop\'s exit', ['Lumberjack Tree'], ['Lumberjack Tree (top to bottom)']),
|
||||
create_cave_region(player, 'Lumberjack Tree (bottom)', 'a drop\'s exit', None, ['Lumberjack Tree Exit']),
|
||||
create_cave_region(player, 'Lumberjack House', 'a boring house'),
|
||||
create_cave_region(player, 'Old Man Cave', 'a connector', ['Old Man'], ['Old Man Cave Exit (East)']),
|
||||
create_cave_region(player, 'Old Man Cave', 'a connector', ['Lost Old Man'], ['Old Man Cave Exit (East)']),
|
||||
create_cave_region(player, 'Old Man Cave Ledge', 'a connector', None, ['Old Man Cave Exit (West)', 'Old Man Cave Dropdown']),
|
||||
create_cave_region(player, 'Old Man House', 'a connector', None, ['Old Man House Exit (Bottom)', 'Old Man House Front to Back']),
|
||||
create_cave_region(player, 'Old Man House Back', 'a connector', None, ['Old Man House Exit (Top)', 'Old Man House Back to Front']),
|
||||
@@ -1200,7 +1201,7 @@ def adjust_locations(world, player):
|
||||
for l in ['Ganon', 'Agahnim 1', 'Agahnim 2', 'Dark Blacksmith Ruins', 'Middle Aged Man',
|
||||
'Frog', 'Missing Smith', 'Floodgate', 'Trench 1 Switch', 'Trench 2 Switch', 'Swamp Drain',
|
||||
'Attic Cracked Floor', 'Suspicious Maiden', 'Revealing Light', 'Big Bomb', 'Pyramid Crack',
|
||||
'Ice Block Drop', 'Zelda Pickup', 'Zelda Drop Off', 'Skull Star Tile']:
|
||||
'Ice Block Drop', 'Lost Old Man', 'Old Man Drop Off', 'Zelda Pickup', 'Zelda Drop Off', 'Skull Star Tile']:
|
||||
location = world.get_location_unsafe(l, player)
|
||||
if location:
|
||||
location.type = LocationType.Logical
|
||||
@@ -1585,6 +1586,8 @@ location_table = {'Mushroom': (0x180013, 0x186338, False, 'in the woods'),
|
||||
'Ganon': (None, None, False, 'from me'),
|
||||
'Agahnim 1': (None, None, False, 'from Ganon\'s wizardry form'),
|
||||
'Agahnim 2': (None, None, False, 'from Ganon\'s wizardry form'),
|
||||
'Lost Old Man': (None, None, False, None),
|
||||
'Old Man Drop Off': (None, None, False, None),
|
||||
'Floodgate': (None, None, False, None),
|
||||
'Frog': (None, None, False, None),
|
||||
'Missing Smith': (None, None, False, None),
|
||||
|
||||
4
Rules.py
4
Rules.py
@@ -180,7 +180,7 @@ def global_rules(world, player):
|
||||
#for exit in world.get_region('Flute Sky', player).exits:
|
||||
# exit.hide_path = True
|
||||
|
||||
set_rule(world.get_entrance('Old Man S&Q', player), lambda state: state.can_reach('Old Man', 'Location', player))
|
||||
set_rule(world.get_entrance('Old Man S&Q', player), lambda state: state.has('Return Old Man', player))
|
||||
|
||||
set_rule(world.get_entrance('Flute Spot 1', player), lambda state: state.can_flute(player))
|
||||
set_rule(world.get_entrance('Flute Spot 2', player), lambda state: state.can_flute(player))
|
||||
@@ -193,6 +193,8 @@ def global_rules(world, player):
|
||||
|
||||
set_rule(world.get_location('Sunken Treasure', player), lambda state: state.has('Open Floodgate', player))
|
||||
set_rule(world.get_location('Dark Blacksmith Ruins', player), lambda state: state.has('Return Smith', player))
|
||||
set_rule(world.get_location('Old Man', player), lambda state: state.has('Return Old Man', player))
|
||||
set_rule(world.get_location('Old Man Drop Off', player), lambda state: state.has('Escort Old Man', player))
|
||||
set_rule(world.get_location('Middle Aged Man', player), lambda state: state.has('Pick Up Purple Chest', player)) # Can S&Q with chest
|
||||
set_rule(world.get_location('Purple Chest', player), lambda state: state.has('Deliver Purple Chest', player)) # Can S&Q with chest
|
||||
set_rule(world.get_location('Big Bomb', player), lambda state: state.has('Crystal 5', player) and state.has('Crystal 6', player))
|
||||
|
||||
Reference in New Issue
Block a user