mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 12:11:33 -06:00

* Clean these functions up, get the hell out of here 5 parameter function * Clean up a bunch of rules that no longer need to be multi-lined since the functions are shorter * Clean up some range functions * Update to use world instead of player like Vi recommended * Fix merge conflict * Create new options * Slightly revise ls rule * Update options.py * Update options.py * Add tedious option for ls * Update laurels zips description * Create new options * Slightly revise ls rule * Update options.py * Update options.py * Add tedious option for ls * Update laurels zips description * Creating structures to redo ladder storage rules * Put together overworld ladder groups, remove tedious * Write up the rules for the regular rules * Update slot data and UT stuff * Put new ice grapple stuff in er rules * Ice grapple hard to get to fountain cross room * More ladder data * Wrote majority of overworld ladder rules * Finish the ladder storage rules * Update notes * Add note * Add well rail to the rules * More rules * Comment out logically irrelevant entrances * Update with laurels_zip helper * Add parameter to has_ice_grapple_logic for difficulty * Add new parameter to has_ice_grapple_logic * Move ice grapple chest to lower forest in ER/ladders * Fix rule * Finishing out hooking the new rules into the code * Fix bugs * Add more hard ice grapples * Fix more bugs * Shops my beloved * Change victory condition back * Remove debug stuff * Update plando connections description * Fix extremely rare bug * Add well front -> back hard ladder storages * Note in ls rules about knocking yourself down with bombs being out of logic * Add atoll fuse with wand + hard ls * Add some nonsense that boils down to activating the fuse in overworld * Further update LS description * Fix missing logic on bridge switch chest in upper zig * Revise upper zig rule change to account for ER * Fix merge conflict * Fix formatting, fix rule for heir access after merge * Add the shop sword logic stuff in * Remove todo that was already done * Fill out a to-do with some cursed nonsense * Fix event in wrong region * Fix missing cathedral -> elevator connection * Fix missing cathedral -> elevator connection * Add ER exception to cathedral -> elevator * Fix secret gathering place issue * Fix incorrect ls rule * Move 3 locations to Quarry Back since they're easily accessible from the back * Also update non-er region * Remove redundant parentheses * Add new test for a weird edge case in ER * Slight option description updates * Use has_ladder in spots where it wasn't used for some reason, add a comment * Fix unit test for ER * Update per exempt's suggestion * Add back LogicRules as an invisible option, to not break old yamls * Remove unused elevation from portal class * Update ladder storage without items description * Remove shop_scene stuff since it's no longer relevant in the mod by the time this version comes out * Remove shop scene stuff from game info since it's no longer relevant in the mod by the time this comes out * Update portal list to match main * god I love github merging things * Remove note * Add ice grapple hard path from upper overworld to temple rafters entrance * Actually that should be medium * Remove outdated note * Add ice grapple hard for swamp mid to the ledge * Add missing laurels zip in swamp * Some fixes to the ladder storage data while reviewing it * Add unit test for weird edge case * Backport outlet region system to fix ls bug * Fix incorrect ls, add todo * Add missing swamp ladder storage connections * Add swamp zip to er data * Add swamp zip to er rules * Add hard ice grapple for forest grave path main to upper * Add ice grapple logic for all bomb walls except the east quarry one * Add ice grapple logic for frog stairs eye to mouth without the ladder * Add hard ice grapple for overworld to the stairs to west garden * Add the ice grapple boss quick kills to medium ice grappling * Add the reverse connection for the ice grapple kill on Garden Knight * Add atoll house ice grapple push, and add west garden ice grapple entry to the regular rules
187 lines
11 KiB
Python
187 lines
11 KiB
Python
from typing import Dict, List, Set, NamedTuple, Optional
|
|
|
|
|
|
# ladders in overworld, since it is the most complex area for ladder storage
|
|
class OWLadderInfo(NamedTuple):
|
|
ladders: Set[str] # ladders where the top or bottom is at the same elevation
|
|
portals: List[str] # portals at the same elevation, only those without doors
|
|
regions: List[str] # regions where a melee enemy can hit you out of ladder storage
|
|
|
|
|
|
# groups for ladders at the same elevation, for use in determing whether you can ls to entrances in diff rulesets
|
|
ow_ladder_groups: Dict[str, OWLadderInfo] = {
|
|
# lowest elevation
|
|
"LS Elev 0": OWLadderInfo({"Ladders in Overworld Town", "Ladder to Ruined Atoll", "Ladder to Swamp"},
|
|
["Swamp Redux 2_conduit", "Overworld Cave_", "Atoll Redux_lower", "Maze Room_",
|
|
"Town Basement_beach", "Archipelagos Redux_lower", "Archipelagos Redux_lowest"],
|
|
["Overworld Beach"]),
|
|
# also the east filigree room
|
|
"LS Elev 1": OWLadderInfo({"Ladders near Weathervane", "Ladders in Overworld Town", "Ladder to Swamp"},
|
|
["Furnace_gyro_lower", "Swamp Redux 2_wall"],
|
|
["Overworld Tunnel Turret"]),
|
|
# also the fountain filigree room and ruined passage door
|
|
"LS Elev 2": OWLadderInfo({"Ladders near Weathervane", "Ladders to West Bell"},
|
|
["Archipelagos Redux_upper", "Ruins Passage_east"],
|
|
["After Ruined Passage"]),
|
|
# also old house door
|
|
"LS Elev 3": OWLadderInfo({"Ladders near Weathervane", "Ladder to Quarry", "Ladders to West Bell",
|
|
"Ladders in Overworld Town"},
|
|
[],
|
|
["Overworld after Envoy", "East Overworld"]),
|
|
# skip top of top ladder next to weathervane level, does not provide logical access to anything
|
|
"LS Elev 4": OWLadderInfo({"Ladders near Dark Tomb", "Ladder to Quarry", "Ladders to West Bell", "Ladders in Well",
|
|
"Ladders in Overworld Town"},
|
|
["Darkwoods Tunnel_"],
|
|
[]),
|
|
"LS Elev 5": OWLadderInfo({"Ladders near Overworld Checkpoint", "Ladders near Patrol Cave"},
|
|
["PatrolCave_", "Forest Belltower_", "Fortress Courtyard_", "ShopSpecial_"],
|
|
["East Overworld"]),
|
|
# skip top of belltower, middle of dark tomb ladders, and top of checkpoint, does not grant access to anything
|
|
"LS Elev 6": OWLadderInfo({"Ladders near Patrol Cave", "Ladder near Temple Rafters"},
|
|
["Temple_rafters"],
|
|
["Overworld above Patrol Cave"]),
|
|
# in-line with the chest above dark tomb, gets you up the mountain stairs
|
|
"LS Elev 7": OWLadderInfo({"Ladders near Patrol Cave", "Ladder near Temple Rafters", "Ladders near Dark Tomb"},
|
|
["Mountain_"],
|
|
["Upper Overworld"]),
|
|
}
|
|
|
|
|
|
# ladders accessible within different regions of overworld, only those that are relevant
|
|
# other scenes will just have them hardcoded since this type of structure is not necessary there
|
|
region_ladders: Dict[str, Set[str]] = {
|
|
"Overworld": {"Ladders near Weathervane", "Ladders near Overworld Checkpoint", "Ladders near Dark Tomb",
|
|
"Ladders in Overworld Town", "Ladder to Swamp", "Ladders in Well"},
|
|
"Overworld Beach": {"Ladder to Ruined Atoll"},
|
|
"Overworld at Patrol Cave": {"Ladders near Patrol Cave"},
|
|
"Overworld Quarry Entry": {"Ladder to Quarry"},
|
|
"Overworld Belltower": {"Ladders to West Bell"},
|
|
"Overworld after Temple Rafters": {"Ladders near Temple Rafters"},
|
|
}
|
|
|
|
|
|
class LadderInfo(NamedTuple):
|
|
origin: str # origin region
|
|
destination: str # destination portal
|
|
ladders_req: Optional[str] = None # ladders required to do this
|
|
dest_is_region: bool = False # whether it is a region that you are going to
|
|
|
|
|
|
easy_ls: List[LadderInfo] = [
|
|
# In the furnace
|
|
# Furnace ladder to the fuse entrance
|
|
LadderInfo("Furnace Ladder Area", "Furnace, Overworld Redux_gyro_upper_north"),
|
|
# Furnace ladder to Dark Tomb
|
|
LadderInfo("Furnace Ladder Area", "Furnace, Crypt Redux_"),
|
|
# Furnace ladder to the West Garden connector
|
|
LadderInfo("Furnace Ladder Area", "Furnace, Overworld Redux_gyro_west"),
|
|
|
|
# West Garden
|
|
# exit after Garden Knight
|
|
LadderInfo("West Garden", "Archipelagos Redux, Overworld Redux_upper"),
|
|
# West Garden laurels exit
|
|
LadderInfo("West Garden", "Archipelagos Redux, Overworld Redux_lowest"),
|
|
|
|
# Atoll, use the little ladder you fix at the beginning
|
|
LadderInfo("Ruined Atoll", "Atoll Redux, Overworld Redux_lower"),
|
|
LadderInfo("Ruined Atoll", "Atoll Redux, Frog Stairs_mouth"), # special case
|
|
|
|
# East Forest
|
|
# Entrance by the dancing fox holy cross spot
|
|
LadderInfo("East Forest", "East Forest Redux, East Forest Redux Laddercave_upper"),
|
|
|
|
# From the west side of Guard House 1 to the east side
|
|
LadderInfo("Guard House 1 West", "East Forest Redux Laddercave, East Forest Redux_gate"),
|
|
LadderInfo("Guard House 1 West", "East Forest Redux Laddercave, Forest Boss Room_"),
|
|
|
|
# Fortress Exterior
|
|
# shop, ls at the ladder by the telescope
|
|
LadderInfo("Fortress Exterior from Overworld", "Fortress Courtyard, Shop_"),
|
|
# Fortress main entry and grave path lower entry, ls at the ladder by the telescope
|
|
LadderInfo("Fortress Exterior from Overworld", "Fortress Courtyard, Fortress Main_Big Door"),
|
|
LadderInfo("Fortress Exterior from Overworld", "Fortress Courtyard, Fortress Reliquary_Lower"),
|
|
# Use the top of the ladder by the telescope
|
|
LadderInfo("Fortress Exterior from Overworld", "Fortress Courtyard, Fortress Reliquary_Upper"),
|
|
LadderInfo("Fortress Exterior from Overworld", "Fortress Courtyard, Fortress East_"),
|
|
|
|
# same as above, except from the east side of the area
|
|
LadderInfo("Fortress Exterior from East Forest", "Fortress Courtyard, Overworld Redux_"),
|
|
LadderInfo("Fortress Exterior from East Forest", "Fortress Courtyard, Shop_"),
|
|
LadderInfo("Fortress Exterior from East Forest", "Fortress Courtyard, Fortress Main_Big Door"),
|
|
LadderInfo("Fortress Exterior from East Forest", "Fortress Courtyard, Fortress Reliquary_Lower"),
|
|
|
|
# same as above, except from the Beneath the Vault entrance ladder
|
|
LadderInfo("Fortress Exterior near cave", "Fortress Courtyard, Overworld Redux_", "Ladder to Beneath the Vault"),
|
|
LadderInfo("Fortress Exterior near cave", "Fortress Courtyard, Fortress Main_Big Door",
|
|
"Ladder to Beneath the Vault"),
|
|
LadderInfo("Fortress Exterior near cave", "Fortress Courtyard, Fortress Reliquary_Lower",
|
|
"Ladder to Beneath the Vault"),
|
|
|
|
# Swamp to Gauntlet
|
|
LadderInfo("Swamp Mid", "Swamp Redux 2, Cathedral Arena_", "Ladders in Swamp"),
|
|
|
|
# Ladder by the hero grave
|
|
LadderInfo("Back of Swamp", "Swamp Redux 2, Overworld Redux_conduit"),
|
|
LadderInfo("Back of Swamp", "Swamp Redux 2, Shop_"),
|
|
]
|
|
|
|
# if we can gain elevation or get knocked down, add the harder ones
|
|
medium_ls: List[LadderInfo] = [
|
|
# region-destination versions of easy ls spots
|
|
LadderInfo("East Forest", "East Forest Dance Fox Spot", dest_is_region=True),
|
|
# fortress courtyard knockdowns are never logically relevant, the fuse requires upper
|
|
LadderInfo("Back of Swamp", "Swamp Mid", dest_is_region=True),
|
|
LadderInfo("Back of Swamp", "Swamp Front", dest_is_region=True),
|
|
|
|
# gain height off the northeast fuse ramp
|
|
LadderInfo("Ruined Atoll", "Atoll Redux, Frog Stairs_eye"),
|
|
|
|
# Upper exit from the Forest Grave Path, use LS at the ladder by the gate switch
|
|
LadderInfo("Forest Grave Path Main", "Sword Access, East Forest Redux_upper"),
|
|
|
|
# Upper exits from the courtyard. Use the ramp in the courtyard, then the blocks north of the first fuse
|
|
LadderInfo("Fortress Exterior from Overworld", "Fortress Courtyard Upper", dest_is_region=True),
|
|
LadderInfo("Fortress Exterior from East Forest", "Fortress Courtyard, Fortress Reliquary_Upper"),
|
|
LadderInfo("Fortress Exterior from East Forest", "Fortress Courtyard, Fortress East_"),
|
|
LadderInfo("Fortress Exterior from East Forest", "Fortress Courtyard Upper", dest_is_region=True),
|
|
LadderInfo("Fortress Exterior near cave", "Fortress Courtyard, Fortress Reliquary_Upper",
|
|
"Ladder to Beneath the Vault"),
|
|
LadderInfo("Fortress Exterior near cave", "Fortress Courtyard, Fortress East_", "Ladder to Beneath the Vault"),
|
|
LadderInfo("Fortress Exterior near cave", "Fortress Courtyard Upper", "Ladder to Beneath the Vault",
|
|
dest_is_region=True),
|
|
|
|
# need to gain height to get up the stairs
|
|
LadderInfo("Lower Mountain", "Mountain, Mountaintop_"),
|
|
|
|
# Where the rope is behind Monastery
|
|
LadderInfo("Quarry Entry", "Quarry Redux, Monastery_back"),
|
|
LadderInfo("Quarry Monastery Entry", "Quarry Redux, Monastery_back"),
|
|
LadderInfo("Quarry Back", "Quarry Redux, Monastery_back"),
|
|
|
|
LadderInfo("Rooted Ziggurat Lower Back", "ziggurat2020_3, ziggurat2020_2_"),
|
|
LadderInfo("Rooted Ziggurat Lower Back", "Rooted Ziggurat Lower Front", dest_is_region=True),
|
|
|
|
# Swamp to Overworld upper
|
|
LadderInfo("Swamp Mid", "Swamp Redux 2, Overworld Redux_wall", "Ladders in Swamp"),
|
|
LadderInfo("Back of Swamp", "Swamp Redux 2, Overworld Redux_wall"),
|
|
]
|
|
|
|
hard_ls: List[LadderInfo] = [
|
|
# lower ladder, go into the waterfall then above the bonfire, up a ramp, then through the right wall
|
|
LadderInfo("Beneath the Well Front", "Sewer, Sewer_Boss_", "Ladders in Well"),
|
|
LadderInfo("Beneath the Well Front", "Sewer, Overworld Redux_west_aqueduct", "Ladders in Well"),
|
|
LadderInfo("Beneath the Well Front", "Beneath the Well Back", "Ladders in Well", dest_is_region=True),
|
|
# go through the hexagon engraving above the vault door
|
|
LadderInfo("Frog's Domain", "frog cave main, Frog Stairs_Exit", "Ladders to Frog's Domain"),
|
|
# the turret at the end here is not affected by enemy rando
|
|
LadderInfo("Frog's Domain", "Frog's Domain Back", "Ladders to Frog's Domain", dest_is_region=True),
|
|
# todo: see if we can use that new laurels strat here
|
|
# LadderInfo("Rooted Ziggurat Lower Back", "ziggurat2020_3, ziggurat2020_FTRoom_"),
|
|
# go behind the cathedral to reach the door, pretty easily doable
|
|
LadderInfo("Swamp Mid", "Swamp Redux 2, Cathedral Redux_main", "Ladders in Swamp"),
|
|
LadderInfo("Back of Swamp", "Swamp Redux 2, Cathedral Redux_main"),
|
|
# need to do hc midair, probably cannot get into this without hc
|
|
LadderInfo("Swamp Mid", "Swamp Redux 2, Cathedral Redux_secret", "Ladders in Swamp"),
|
|
LadderInfo("Back of Swamp", "Swamp Redux 2, Cathedral Redux_secret"),
|
|
]
|