From 97453b2132041b030a52ac2050969a18b976aa39 Mon Sep 17 00:00:00 2001 From: Ibot02 Date: Sun, 28 Jul 2024 17:13:27 +0200 Subject: [PATCH] Fix palace logic --- tmc/logic/palace_of_winds.logic | 472 ++++++++++++++++++++------------ tmc/module.yaml | 10 + 2 files changed, 306 insertions(+), 176 deletions(-) diff --git a/tmc/logic/palace_of_winds.logic b/tmc/logic/palace_of_winds.logic index 3982d71..a1ef67d 100644 --- a/tmc/logic/palace_of_winds.logic +++ b/tmc/logic/palace_of_winds.logic @@ -1,11 +1,97 @@ area PalaceOfWinds: - room F1BombarossaTornado: + room F1CapeChestRoom: + node Main: + door East + exit Cloud + node WizrobeFight: + enemy Wizrobes + node Cloud: + entrance Cloud + Main -> Cloud: item Cape + node PostFight: + chest BigChest + node MainBlueSwitch + node SouthEastBlueSwitch + node SouthEastRedSwitch + node SouthWestRedSwitch + node SouthWestBlueSwitch + SouthWestBlueSwitch -> WizrobeFight + SouthWestRedSwitch -> WizrobeFight: item Cape + SouthWestRedSwitch -> SouthWestBlueSwitch: (item BombBag | item Boomerang | item MagicalBoomerang | ( trick GustJarProjectilesThroughWalls & item GustJar )) + SouthEastRedSwitch -> SouthWestRedSwitch + SouthEastBlueSwitch -> SouthWestBlueSwitch: item Cape + SouthEastBlueSwitch <-> SouthEastRedSwitch: canHitSwitch + MainBlueSwitch <-> SouthEastBlueSwitch + Main <-> SouthEastRedSwitch: item Cape + Main -> MainBlueSwitch: helper HasProjectileDamage + WizrobeFight -> PostFight: kill Wizrobes + room F1ClonePushBlock: + node South: + door South + node Middle + node North: + door North + Middle -> North: helper CanSplit3 + North -> Middle + Middle <-> South: ( item Cape | helper HasProjectileDamage | item BombBag | item GustJar ) # TODO for enemizer: gust jar relies on peahats here + room F1DarknutFight: + node Main: + enemy Darknut + target Portal + node PostFight: + set F1Entrance.BluePortal #additional flag to the darknut being dead + node FightDone: + warp Portal + warp North + node NorthEntrance: + target North + Main <-> PostFight: kill Darknut + Main -> FightDone: flag F1Entrance.BluePortal + NorthEntrance -> Main: flag F1Entrance.BluePortal + room F1Entrance: + node Main: + door North + door Hole + exit RedPortal + exit BluePortal + node RedPortal: + entrance RedPortal + node BluePortal: + entrance BluePortal + Main -> RedPortal: flag RedPortal + Main -> BluePortal: flag BluePortal + room F1GrateChest: + node Main: + door East + door West + node North: + chest Chest + Main <-> North: item Cape + room F1Interior: + node Main: + chest BigChest + door South + door StairUp + exit MainRoofHoles + node Upper: + chest Chest + exit UpperRoofHole + Upper -> Main + room F1InteriorEntry: + node Main: + door North + door South + room F1PlatformRide: + node Main: + door South + door West + room F2BombarossaTornado: node East: door East node West: door North East <-> West: item Cape - room F1CrumbleClones: + room F2CrumbleClones: node Main: door North lock EastDoor @@ -18,7 +104,7 @@ area PalaceOfWinds: Main <-> East: open EastDoor Main <-> West: flag DoorOpen Upper -> Main - room F1CloudUpAndDown: + room F2CloudUpAndDown: node NorthEast: door NorthEast node NorthCenter: @@ -33,7 +119,7 @@ area PalaceOfWinds: chest Rupee4 chest Rupee5 enemy LikeLike - NorthCenter -> SouthCenter: item Cape + NorthCenter -> SouthCenter: ( item Cape & trick DreamJump ) SouthCenter <-> SouthEast: item Cape node West: exit CloudUp @@ -41,22 +127,31 @@ area PalaceOfWinds: node WestCloud: entrance CloudUp West -> WestCloud: item Cape - room F1RollerSmallKey: + room F2RollerSmallKey: node Main: chest Chest door North door South - room F1SpikyBeetleFight: - node Main: + room F2SpikyBeetleFight: + node Main + node NorthWest: door NorthWest + NorthWest -> Main node MainFight: enemy SpikyBeetles - Main <-> MainFight: flag SwitchesActivated + node SwitchesActivated: + set SwitchesActivated + Main -> SwitchesActivated: + ( (item Sword & item MagicalBoomerang) | helper CanSplit3 | helper CanSplit2 | (item Sword & item BombBag)) + Main -> MainFight: flag SwitchesActivated node MainPostFight: + set Door + node SouthWest: door SouthWest - Main -> MainPostFight: ( defeat SpikyBeetles & item Cape & item Cane ) - MainPostFight -> Main: ( defeat SpikyBeetles & item Cape ) - room F1TowerBottomLeft: + Main -> MainPostFight: kill SpikyBeetles + Main -> SouthWest: (item Cape & item Cane & flag Door) + SouthWest -> Main: (item Cape & flag Door) + room F2TowerBottomLeft: node Main: entrance FloorHole door South @@ -64,8 +159,8 @@ area PalaceOfWinds: door StairDown node East: door East - Main <-> East: flag PalaceOfWinds.F1TowerBottomMiddle.DoorOpen - room F1TowerBottomMiddle: + Main <-> East: flag PalaceOfWinds.F2TowerBottomMiddle.DoorOpen + room F2TowerBottomMiddle: node Main: exit RoofHole enemy Wizrobes @@ -77,62 +172,68 @@ area PalaceOfWinds: chest Chest set DoorOpen Main -> PostFight: flag DoorOpen - room F1TowerBottomRight: + room F2TowerBottomRight: node Main: door South door North door StairDown node West: door West - Main <-> West: flag PalaceOfWinds.F1TowerBottomMiddle.DoorOpen - room F1TowerTopLeft: + Main <-> West: flag PalaceOfWinds.F2TowerBottomMiddle.DoorOpen + room F2TowerTopLeft: node Main: entrance FloorHole door East door South - room F1TowerTopMiddle: + room F2TowerTopMiddle: node Main: exit RoofHole entrance FloorHole door East door West - room F1TowerTopRight: + room F2TowerTopRight: node Main: entrance FloorHole door South door West - room F2ClonePushBlock: - node North: + room F3ClonePushBlock: + node Cloud: door Cloud + node Main: + warp Cloud node South: door South - South -> North - North -> South: item CanSplit3 - room F2ExitAfterSmallKey: + Cloud <-> Main: item Cape + South -> Main + Main -> South: (helper CanSplit3 | helper CanSplit4) + room F3ExitAfterSmallKey: node West: door West node East: door South East <-> West: ( flag DoorOpen & item Cape ) - room F2GratePlatforms: + room F3GratePlatforms: node East: - door East + door EastSouth node West: - door SouthWest + door West East <-> West: item Cape node North: - door NorthEast + door F3PotPushing.WestDoor exit Cloud + node NorthEast: + door EastNorth + North <-> NorthEast: open F3PotPushing.WestDoor node Cloud: entrance Cloud North -> Cloud: item Cape - room F2PlatformRide: + room F3PlatformRide: node North: door North node South: door East North <-> South: item Cape - room F2PotPushing: + room F3PotPushing: node Main: lock WestDoor node South: @@ -145,44 +246,60 @@ area PalaceOfWinds: door North East -> Main Main -> East: item Cane + node EastSwitches: + set SwitchesActivated + East -> EastSwitches: (helper CanSplit3 | helper CanSplit4 | helper CanSplit2 | (item BombBag & (item Sword | item Boomerang | item MagicalBoomerang | item Bow))) node EastMinish - EastMinish -> East: ( item CanGrow & flag SwitchesActivated ) - East -> EastMinish: ( item CanTurnMinish & flag SwitchesActivated ) + EastMinish -> East: ( helper CanGrow & flag SwitchesActivated ) + East -> EastMinish: ( helper CanTurnMinish & flag SwitchesActivated ) node MainMinish: door MinishNorth - EastMinish -> MainMinish - room F2TowerBottomLeft: + EastMinish -> MainMinish: item PowerBracelets + room F3TowerBottomLeft: node Main: door North door StairUp - room F2TowerBottomMiddle: + room F3TowerBottomMiddle: node Main: exit RoofHole entrance FloorHole - enemy Wizrobes door East - room F2TowerBottomRight: + room F3TowerBottomRight: node Main: door North door West - set SwitchActive + door Stairs node East: door NorthEast - door East + node EastDoor: + target East + node EastPastDoor: + warp East + East -> EastPastDoor: + flag DoorOpen + EastDoor -> East: + flag SwitchActive node EastMinish: door NorthEastMinish door SouthMinish - node Chest: + node DroppedItem: chest Key - East <-> Chest: flag SwitchActive - East -> EastMinish: item CanTurnMinish - EastMinish -> East: item CanGrow - room F2TowerTopLeft: + East -> DroppedItem: flag DoorOpen + node HitSwitch: + set SwitchActive + set DoorOpen + Main -> HitSwitch: (helper CanHitSwitch | flag SwitchActive ) + East -> HitSwitch: + ( helper HasProjectileDamage | item BombBag | flag SwitchActive ) + room F3TowerTopLeft: node Main: door East - door South exit RoofHole - room F2TowerTopMiddle: + set PullSwitch + node South: + door South + Main <-> South: flag PullSwitch + room F3TowerTopMiddle: node Main: door East door West @@ -190,8 +307,8 @@ area PalaceOfWinds: entrance FloorHole node PostFight: chest Chest - Main <-> PostFight: defeat Wizrobes - room F2TowerTopRight: + Main -> PostFight: kill Wizrobes + room F3TowerTopRight: node Main: exit RoofHole door South @@ -202,7 +319,7 @@ area PalaceOfWinds: door SouthEastMinish East -> EastMinish: item CanTurnMinish EastMinish -> East: item CanGrow - room F3BlockMaze: + room F4BlockMaze: node West: chest Chest node Center: @@ -218,239 +335,242 @@ area PalaceOfWinds: node EastCloud: entrance EastCloud East -> EastCloud: item Cape - room F3CloudEntry: + room F4CloudEntry: node Main: - door Cloud door West - room F3CloudJumps: - node East: - door SouthEast + warp Cloud + node Cloud: + door Cloud + Main <-> Cloud: item Cape + room F4CloudJumps: + node West: + door SouthWest node CenterHP: chest HP door South node Center: chest Chest - Center -> East: item Cape - node West: - exit Cloud West -> Center: item Cape - node WestCloud: + node East: + exit Cloud + Center -> East: item Cape + East -> Center: (item Cape & trick CapeExtension) + node EastCloud: entrance Cloud - West -> WestCloud: item Cape - room F3FanJumps: + East -> EastCloud: item Cape + room F4FanJumps: node East: door East node West: door North East <-> West: item Cape - room F3Interior: + room F4Interior: node East: - door StairUp + target StairUp + lock StairUp + warp CenterFloorHole + target Portal + node EastDoorOpen: + warp StairUp + East -> EastDoorOpen: open StairUp + node EastRedPortal: + warp RedPortal + East -> EastRedPortal: flag F1Entrance.RedPortal + node EastOpenRedPortal: + set F1Entrance.RedPortal + node EastLightTorches: + set LeftTorch + set RightTorch + East -> EastLightTorches: item Lantern + East -> EastOpenRedPortal: (flag LeftTorch & flag RightTorch) node West: door StairDown entrance CenterFloorHole entrance WestFloorHole East <-> West: ( item Cape & flag BlocksBombed ) node NorthEast: - door NorthEast exit EastRoofHole entrance EastFloorHole + lock NorthEast + node NorthEastBehindDoor: + warp NorthEast + node NorthEastInDoor: + target NorthEast + NorthEast -> NorthEastBehindDoor: open NorthEast + NorthEastInDoor -> NorthEast: open NorthEast node NorthWest: door NorthWest - exit WestRoofHole entrance WestFloorHole West -> NorthWest: item Cape node North: chest Chest West <-> North: flag SwitchActive - room F3LakituJumps: + node SwitchHit: + set SwitchActive + East -> SwitchHit: (helper HasProjectileDamage | hasExplosive | item GustJar) # do we want gust jar to be a trick? grabbing a skull from elsewhere in the room might not be intuitive. Also TODO: Does mirror shield work here, if enemizer gives you the right kind of enemy to use fo the reflection? + room F4LakituJumps: node North: door North node South: door South North <-> South: item Cape - room F3ToHeartPiece: + room F4ToHeartPiece: node Main: door North door South - room F42ndBigKeyDoor: + room F52ndBigKeyDoor: node West: chest Chest door South node Center: + warp CenterCloud + node CenterCloud: door CenterCloud + Center <-> CenterCloud: item Cape node NorthEntrance: - entrance North set NorthDoorOpen node NorthExit: - exit North + door North Center -> NorthEntrance: item PoWBigKey - NorthExit -> Center: flag NorthDoorOpen + NorthExit <-> Center: flag NorthDoorOpen node East: door East + warp EastCloud + node EastCloud: door EastCloud - room F44Buttons: + East <-> EastCloud: item Cape + room F54Buttons: node NorthWest: - door NorthWest - node NorthEast: - door NorthEast - NorthWest <-> NorthEast: flag SwitchesActivated + door WestNorth + node North: + door EastNorth + NorthWest <-> North: flag SwitchesActivated + node NorthSwitches: + set SwitchesActivated + North -> NorthSwitches: ( helper CanSplit2 | helper CanSplit3 | helper CanSplit4 ) node SouthWest: - door SouthWest + door WestSouth node SouthEast: - door SouthEast + door WestEast SouthWest <-> SouthEast: item Cape - room F4BallAndChainSoldiers: + room F5BallAndChainSoldiers: node Main: door North enemy BallAndChainSoldiers lock WestDoor - node SouthEntrance: - entrance South + node BigKeyDoor: set BigKeyDoorOpen - node SouthExit: - exit South - SouthExit -> Main: flag BigKeyDoorOpen - Main -> SouthEntrance: item PoWBigKey + node South: + door South + South <-> Main: flag BigKeyDoorOpen + Main -> BigKeyDoor: item PoWBigKey node West: door West Main <-> West: open WestDoor node PostFight: - chest Chest - Main <-> PostFight: defeat BallAndChainSoldiers - room F4BigKey: + chest DroppedItem + Main -> PostFight: kill BallAndChainSoldiers + room F5BigKey: node Main: chest Chest door South - room F4BombableWallToOutside: + room F5BombableWallToOutside: node Main: door StairDown door North + target East + node PastBombWall: + warp BombWall node BombWall: - door BombWall - Main <-> BombWall: ( item BombBag | state HasExplosive ) - room F4BombarossaPath: + set BombWall + Main -> BombWall: ( item BombBag | hasExplosive ) + Main -> PastBombWall: flag BombWall + room F5BombarossaPath: node Main: door North door South - room F4BossEntry: + room F5BossEntry: node Main: door Boss - node South: door South - Main <-> South: flag DoorUnlocked node PostFight: chest Element - chest HP + chest HeartContainer entrance GreenPortal - Main <-> PostFight: defeat Gyorg - room F4CloudEntry: - node Main: + Main -> PostFight: kill Gyorg.Main.Gyorg + room F5CloudEntry: + node Cloud: door Cloud + node Main: + warp Cloud door South - room F4DropToDarknut: + Main <-> Cloud: item Cape + room F5DropToDarknut: node Main: door North - entrance Hole - room F4Eastof2ndBigDoorChest: + warp Hole + room F5Eastof2ndBigDoorChest: node Main: door West chest Chest - room F4MoblinAndWizrobeFight: + room F5MoblinAndWizrobeFight: node North: door North + set Fan node South: + enemy WizzrobesAndMoblins + node SouthEast: door South - North -> South: item Cape - room F4Outside: + North -> South: ( item Cape & flag Fan ) + South -> SouthEast: kill WizzrobesAndMoblins + SouthEast -> South + room F5Outside: node Main: - door South + door WestSouth enemy WizrobesAndMoblins node BombWall: - door North - Main <-> BombWall: ( item BombBag | state HasExplosive ) - room F4SmallKeyFanJump: + set F5ToBombarossaPath.BombableWall + Main -> BombWall: ( item BombBag | hasExplosive ) + InBombWall -> BombWall: ( item BombBag | hasExplosive ) + node PastBombWall: + warp WestNorth + Main -> PastBombWall: flag F5ToBombarossaPath.BombableWall + node InBombWall: + target WestNorth + InBombWall -> Main: flag F5ToBombarossaPath.BombableWall + room F5SmallKeyFanJump: node South: - door SouthWest + door WestSouth + set Fan node North: - door NorthEast - door NorthWest + door East + door WestNorth lock NorthDoor node NorthUp: door North North <-> NorthUp: open NorthDoor - South -> North: item Cape + South -> Center: ( item Cape & flag Fan ) node Center: chest Chest Center -> North - room F4ToBombarossaPath: + room F5ToBombarossaPath: node South: door South node East: - door East - East -> South: ( item BombBag | state HasExplosive ) + target East + node EastPastWall: + warp East + East -> EastBlowUpWall: ( item BombBag | hasExplosive ) + EastBlowUpWall: + set BombableWall + East -> EastPastWall: flag BombableWall + East -> South node North: door North entrance FloorHole - East <-> North: ( item BombBag | state HasExplosive ) - room GFCapeChestRoom: - node Main: - door East - exit Cloud - enemy Wizrobes - node Cloud: - entrance Cloud - Main -> Cloud: item Cape - node PostFight - PostFight <-> Main: ( defeat Wizrobes & ( item Cape | item Bow | item Boomerang | item BombBag ) ) - room GFClonePushBlock: - node South: - door South - node North: - door North - South -> North: ( item CanSplit3 & ( item Cape | item Bow | item Boomerang ) ) - North -> South: ( item Cape | item Bow | item Boomerang ) - room GFDarknutFight: - node Main: - enemy Darknut - node PostFight: - door Portal - door North - Main <-> PostFight: defeat Darknut - room GFEntrance: - node Main: - door North - door Hole - exit RedPortal - exit BluePortal - node RedPortal: - entrance RedPortal - node BluePortal: - entrance BluePortal - Main -> RedPortal: flag RedPortal - Main -> BluePortal: flag BluePortal - room GFGrateChest: - node Main: - door East - door West - node North: - chest Chest - Main <-> North: item Cape - room GFInterior: - node Main: - chest BigChest - door South - door StairUp - exit MainRoofHoles - node Upper: - chest Chest - exit UpperRoofHole - Upper -> Main - room GFInteriorEntry: - node Main: - door North - door South - room GFPlatformRide: - node Main: - door South - door West + East <-> North: ( flag BottomRock | flag TopRock ) + node BlowUpRocks: + set BottomRock + set TopRock + East -> BlowUpRocks: ( item BombBag | hasExplosive ) + North -> BlowUpRocks: ( item BombBag | hasExplosive ) diff --git a/tmc/module.yaml b/tmc/module.yaml index 48cce5f..527537c 100644 --- a/tmc/module.yaml +++ b/tmc/module.yaml @@ -22,6 +22,16 @@ provides: stateful: false type: truthy export: edge + hasExplosive: + arguments: [] + stateful: true + type: truthy + export: edge + helper: + arguments: ["unscoped"] + stateful: false + type: truthy + export: edge logic-sugar: entrance: type: multi