Skip to content

Instantly share code, notes, and snippets.

@Draknek
Created September 22, 2023 19:37
Show Gist options
  • Save Draknek/3f2d17521ed4c59a8637c5fc74c0ec7d to your computer and use it in GitHub Desktop.
Save Draknek/3f2d17521ed4c59a8637c5fc74c0ec7d to your computer and use it in GitHub Desktop.
Spooky Express (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
title Spooky Express
author Alan Hazelden
homepage https://alan.draknek.org
color_palette pastel
noaction
again_interval 0.16
key_repeat_interval 0.16
(verbose_logging)
run_rules_on_level_start
========
OBJECTS
========
Player
transparent
(lightgreen white
00000
01110
01110
01110
00000)
Delay
transparent
Delayed
transparent
WorldExitPoint
transparent
Tutorial
transparent
JunctionFrom
transparent
JunctionTo
transparent
TrainCartGap
red
Background
lightgreen green
01000
00110
10010
10100
01001
OptionalObstacle
green lightgreen
10001
00000
00000
00000
10001
PickupBG
lightgrey white
00000
01110
01110
01110
00000
Water1
blue white lightblue
20010
02002
12020
00220
02002
Water2
blue white lightblue
02000
20210
00202
01022
20200
Mountain
darkbrown darkbrown
..0..
.10..
.000.
0000.
11001
Forest
darkgreen brown
.000.
00000
00000
00100
.111.
Beach
yellow white
00010
01000
00001
00100
10000
Wormhole
white lightgrey
0..00
0000.
.010.
.0000
00..0
Junction
lightgrey
(Player
yellow black
.000.
01010
10001
01110
.000.)
FromD
grey darkbrown
.....
.....
1...1
0...0
0...0
FromU
grey darkbrown
0...0
0...0
1...1
.....
.....
FromL
grey darkbrown
001..
.....
.....
.....
001..
FromR
grey darkbrown
..100
.....
.....
.....
..100
VTrack
grey darkbrown
0...0
0...0
01110
0...0
0...0
HTrack
grey darkbrown
00000
..1..
..1..
..1..
00000
Crossing
grey grey
01110
1...1
1...1
1...1
01110
(01010
1...1
0...0
1...1
01010)
DRTrack
grey darkbrown
...00
..0..
.01..
0..1.
0...1
DLTrack
grey darkbrown
00...
..0..
..10.
.1..0
1...0
ULTrack
grey darkbrown
1...0
.1..0
..10.
..0..
00...
URTrack
grey darkbrown
0...1
0..1.
.01..
..0..
...00
UTrain
red black darkred
.000.
01110
00000
00100
00000
RTrain
red black darkred
0000.
00010
01010
00010
0000.
LTrain
red black darkred
.0000
01000
01010
01000
.0000
DTrain
red black darkred
00000
00100
00000
01110
.000.
Cart
red black darkred
22222
21112
21112
21112
22222
(Smoke1
white
..0..
.0.0.
0.0.0
.0.0.
..0..
Smoke2
white
.....
.0.0.
..0..
.0.0.
.....
Smoke3
white
.....
..0..
.0.0.
..0..
.....)
BluePassengerWaiting
DarkBrown Blue DarkBrown DarkBlue
..0..
.111.
21112
23332
.3.3.
BluePassengerOnCart
DarkBrown Blue DarkBrown DarkBlue
.....
..0..
.111.
.111.
.....
BlueTarget
lightblue darkbrown
00000
01110
01110
01110
00000
RedPassengerWaiting
DarkBrown Red DarkBrown DarkRed
..0..
.111.
21112
23332
.3.3.
RedPassengerOnCart
DarkBrown Red DarkBrown DarkRed
.....
..0..
.111.
.111.
.....
RedTarget
lightRed darkbrown
00000
01110
01110
01110
00000
TopAndBottomWaiting
DarkBrown Yellow DarkBrown Orange
..0..
.111.
21112
23332
.3.3.
BottomWaiting
DarkBrown Yellow DarkBrown Orange
.....
.....
2...2
23332
.3.3.
(TopAndBottomOnCart
DarkBrown Yellow DarkBrown Orange
.....
..0..
.111.
.333.
.....)
TopOnCart
DarkBrown Yellow DarkBrown Orange
.....
..0..
.111.
.....
.....
BottomOnCart
DarkBrown Yellow DarkBrown Orange
.....
.....
.....
.333.
.....
TopAndBottomTarget
lightBrown darkbrown
00000
01110
01110
01110
00000
HangOn
DarkBrown Yellow DarkBrown Orange
2.0.2
21112
.111.
.333.
.3.3.
HangOnLeft
transparent
HangOnRight
transparent
HangOnBoth
transparent
HangOnGuess
transparent
Slime
DarkBrown brown DarkBrown lightbrown
..0..
.111.
21112
23332
.3.3.
SlimeOnCart
DarkBrown Brown DarkBrown lightbrown
.....
..0..
.111.
.111.
.....
SlimeTarget
orange darkbrown
00000
01110
01110
01110
00000
Poop
transparent darkbrown
00000
01110
01110
01110
00000
1StackPassenger
brown transparent
11111
10111
11111
11111
11111
2StackPassenger
brown transparent
11111
10111
11111
11101
11111
3StackPassenger
brown transparent
11111
10101
11111
11101
11111
4StackPassenger
brown transparent
11111
10101
11111
10101
11111
1StackTarget
white darkbrown
11111
10111
11111
11111
11111
2StackTarget
white darkbrown
11111
10111
11111
11101
11111
3StackTarget
white darkbrown
11111
10101
11111
11101
11111
4StackTarget
white darkbrown
11111
10101
11111
10101
11111
HumanWaiting
black orange white blue
.000.
.111.
22222
.333.
.3.3.
HumanOnCart
black orange white blue
.....
.000.
.111.
.222.
.....
AnyTarget
darkbrown lightblue lightred
11112
20002
20002
20002
21111
DoorVisible
darkbrown
NoDoor
transparent
DoorHidden
transparent
(Zero 0
White Black
10011
01101
01101
01101
10011
One 1
White Black
10011
11011
11011
11011
10001
Two 2
White Black
10011
11101
11011
10111
10001
Three 3
White Black
10011
11101
11011
11101
10011
Four 4
White Black
10101
10101
10001
11101
11101
Five 5
White Black
10001
10111
10011
11101
10011
Six 6
White Black
11001
10111
10001
10110
11001
Seven 7
White Black
10001
11101
11011
11011
11011
Eight 8
White Black
11001
10110
11001
10110
11001
Nine 9
White Black
11001
10110
11000
11110
11001)
Black
black
=======
LEGEND
=======
. = Background
(M = Mountain)
% = Forest
(~ = Water1
, = Beach)
(? = OptionalObstacle)
~ = Cart
# = Black
ConnectsL = DLTrack or ULTrack or HTrack or Crossing
ConnectsR = DRTrack or URTrack or HTrack or Crossing
ConnectsU = ULTrack or URTrack or VTrack or Crossing
ConnectsD = DLTrack or DRTrack or VTrack or Crossing
U = UTrain
D = DTrain
L = LTrain
R = RTrain
I = VTrack
- = HTrack
(═ = Junction and HTrack
║ = Junction and VTrack
╝ = Junction and ULTrack
╚ = Junction and URTrack
╗ = Junction and DLTrack
╔ = Junction and DRTrack)
* = BluePassengerWaiting and PickupBG
O = BlueTarget
@ = RedPassengerWaiting and PickupBG
! = RedTarget
H = HumanWaiting and PickupBG
_ = PickupBG
(½ = TopAndBottomWaiting and PickupBG
y = TopAndBottomTarget)
HangOnTarget = TopAndBottomTarget
(h = HangOn and PickupBG
¾ = HangOnTarget)
(¹ = 1StackPassenger and PickupBG
² = 2StackPassenger and PickupBG
³ = 3StackPassenger and PickupBG
⁴ = 4StackPassenger and PickupBG
₁ = 1StackTarget
₂ = 2StackTarget
₃ = 3StackTarget
₄ = 4StackTarget)
s = Slime and PickupBG
b = SlimeTarget
→ = FromL
← = FromR
↑ = FromD
↓ = FromU
: = AnyTarget
W = Wormhole
+ = Crossing
PartTrack = FromD or FromU or FromL or FromR
Water = Water1 or Water2
Track = VTrack or HTrack or URTrack or ULTrack or DRTrack or DLTrack or Crossing
Train = UTrain or DTrain or LTrain or RTrain
TrainOrCart = Train or Cart
StackTarget = 1StackTarget or 2StackTarget or 3StackTarget or 4StackTarget
StackPassenger = 1StackPassenger or 2StackPassenger or 3StackPassenger or 4StackPassenger
Target = BlueTarget or RedTarget or TopAndBottomTarget or HangOnTarget or 1StackTarget or 2StackTarget or 3StackTarget or 4StackTarget or SlimeTarget or AnyTarget
ScaryPassengerWaiting = BluePassengerWaiting or RedPassengerWaiting or TopAndBottomWaiting or BottomWaiting or HangOn or 1StackPassenger or 2StackPassenger or 3StackPassenger or 4StackPassenger or Slime
PassengerWaiting = ScaryPassengerWaiting or HumanWaiting
PassengerOnCart = BluePassengerOnCart or RedPassengerOnCart or TopOnCart or BottomOnCart or HangOnLeft or HangOnRight or HangOnBoth or HangOnGuess or 1StackPassenger or 2StackPassenger or 3StackPassenger or 4StackPassenger or SlimeOnCart or Poop or HumanOnCart
Passenger = PassengerWaiting or PassengerOnCart
(Number = 0 or 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9)
Solid = Mountain or Forest or Water or Black
Collides = Mountain or Forest or Train or Cart or Passenger or Wormhole or DoorVisible
HangOnMarker = HangOnLeft or HangOnRight or HangOnBoth or HangOnGuess
=======
SOUNDS
=======
SFX0 91301709
SFX1 53409305
SFX2 38557307
SFX3 99431502
EndLevel 78709508
Train Move 88405308
(Track Create 24611507)
(Undo 77031907)
(Track Destroy 77031907)
PassengerWaiting Destroy 77365107
PassengerWaiting Create 18891907
================
COLLISIONLAYERS
================
Background
Tutorial, Junction, JunctionFrom, JunctionTo, OptionalObstacle
Player, Beach
Track, Solid, Wormhole
Delayed, DoorVisible, NoDoor, DoorHidden
Train, Cart, PickupBG, TrainCartGap
Delay, WorldExitPoint, Target, PartTrack
Passenger
======
RULES
======
(open door)
[ passenger no target no poop ] [ stationary DoorVisible ] -> [ passenger ] [ action DoorVisible ]
[ stationary DoorVisible ] -> [ nodoor ]
[ action DoorVisible ] -> [ DoorVisible ]
[ nodoor poop ] -> [ nodoor ]
(door init)
[ black | track no doorvisible no nodoor no doorhidden | black ] -> [ black | track action doorhidden | black ]
[ action doorhidden track | no doorvisible no nodoor no doorhidden track ] -> [ action doorhidden track | action doorhidden track ]
(set up junctions)
[ Junction ] -> [ action Junction ]
[ JunctionFrom | action Junction ] -> [ JunctionFrom | Junction ]
[ action Junction | PartTrack ] -> [ action Junction | JunctionTo PartTrack ]
left [ action Junction ConnectsL | no JunctionTo ] -> [ Junction ConnectsL | JunctionFrom ]
right [ action Junction ConnectsR | no JunctionTo ] -> [ Junction ConnectsR | JunctionFrom ]
up [ action Junction ConnectsU | no JunctionTo ] -> [ Junction ConnectsU | JunctionFrom ]
down [ action Junction ConnectsD | no JunctionTo ] -> [ Junction ConnectsD | JunctionFrom ]
(spawn tracks under train)
left [ LTrain no Track no Wormhole | no Track ] -> [ LTrain < FromL | action FromR ]
right [ RTrain no Track no Wormhole | no Track ] -> [ RTrain < FromR | action FromL ]
up [ UTrain no Track no Wormhole | no Track ] -> [ UTrain < FromU | action FromD ]
down [ DTrain no Track no Wormhole | no Track ] -> [ DTrain < FromD | action FromU ]
startloop
[ TrainOrCart moving PartTrack | TrainOrCart no Track ] -> [ TrainOrCart > PartTrack | TrainOrCart ]
[ left FromU no Track ] -> [ left FromR ULTrack ]
[ right FromU no Track ] -> [ right FromL URTrack ]
[ down FromU no Track ] -> [ down FromU VTrack ]
[ left FromD no Track ] -> [ left FromR DLTrack ]
[ right FromD no Track ] -> [ right FromL DRTrack ]
[ up FromD no Track ] -> [ up FromD VTrack ]
[ up FromL no Track ] -> [ up FromD ULTrack ]
[ down FromL no Track ] -> [ down FromU DLTrack ]
[ right FromL no Track ] -> [ right FromL HTrack ]
[ up FromR no Track ] -> [ up FromD URTrack ]
[ down FromR no Track ] -> [ down FromU DRTrack ]
[ left FromR no Track ] -> [ left FromR HTrack ]
[ > PartTrack Track | no Solid ] -> [ Track | > PartTrack ]
[ > PartTrack Track ] -> [ Track ]
endloop
(spawn player)
[ Player ] [ action PartTrack ] -> [ Player ] [ stationary PartTrack ]
[ action PartTrack ] -> [ Player PartTrack ]
(lay track - init)
[ > Player no Wormhole | Passenger ] -> cancel
[ > Player no Wormhole | Target ] -> cancel
[ > Player no Wormhole | Solid ] -> cancel
[ > Player no Wormhole | Train ] -> cancel
[ > Player PartTrack | ] -> [ > Player > PartTrack | ]
[ > Player stationary PartTrack ] -> cancel
(lay track - check joining with existing track)
left [ > PartTrack > Player | FromL ] -> [ > PartTrack > Player | HTrack ]
left [ > PartTrack > Player | FromU ] -> [ > PartTrack > Player | URTrack ]
left [ > PartTrack > Player | FromD ] -> [ > PartTrack > Player | DRTrack ]
right [ > PartTrack > Player | FromR ] -> [ > PartTrack > Player | HTrack ]
right [ > PartTrack > Player | FromU ] -> [ > PartTrack > Player | ULTrack ]
right [ > PartTrack > Player | FromD ] -> [ > PartTrack > Player | DLTrack ]
up [ > PartTrack > Player | FromL ] -> [ > PartTrack > Player | DLTrack ]
up [ > PartTrack > Player | FromR ] -> [ > PartTrack > Player | DRTrack ]
up [ > PartTrack > Player | FromU ] -> [ > PartTrack > Player | VTrack ]
down [ > PartTrack > Player | FromL ] -> [ > PartTrack > Player | ULTrack ]
down [ > PartTrack > Player | FromR ] -> [ > PartTrack > Player | URTrack ]
down [ > PartTrack > Player | FromD ] -> [ > PartTrack > Player | VTrack ]
(wormholes - undo)
left [ > Player > FromL | Wormhole ] -> [ | Wormhole > Player > FromL ]
right [ > Player > FromR | Wormhole ] -> [ | Wormhole > Player > FromR ]
up [ > Player > FromU | Wormhole ] -> [ | Wormhole > Player > FromU ]
down [ > Player > FromD | Wormhole ] -> [ | Wormhole > Player > FromD ]
[ > Player > PartTrack Wormhole ] [ no Player Wormhole | Track ] -> [ Wormhole ] [ Wormhole | Player PartTrack Track ]
[ PartTrack ConnectsL no FromR ] -> [ FromL ]
[ PartTrack ConnectsR no FromL ] -> [ FromR ]
[ PartTrack ConnectsU no FromD ] -> [ FromU ]
[ PartTrack ConnectsD no FromU ] -> [ FromD ]
(wormholes - normal)
[ > Player > PartTrack | Wormhole ] [ no Player | Wormhole | Track ] -> cancel
[ > Player > PartTrack | Wormhole ] [ no Player | Wormhole | PartTrack ] -> cancel
late [ Player Wormhole ] -> again
[ Player FromL Wormhole ] -> [ Player right FromL Wormhole ]
[ Player FromR Wormhole ] -> [ Player left FromR Wormhole ]
[ Player FromU Wormhole ] -> [ Player down FromU Wormhole ]
[ Player FromD Wormhole ] -> [ Player up FromD Wormhole ]
[ Player > PartTrack Wormhole ] [ Wormhole no Player | ] -> [ Wormhole ] [ Wormhole | Player PartTrack ]
(junctions - undo normal)
[ > Player > PartTrack JunctionTo | Junction ] -> [ JunctionTo | action Junction Player PartTrack ]
[ action Junction Player PartTrack | JunctionFrom ] -> [ Junction > PartTrack | JunctionFrom Player ]
[ action Junction ] -> [ Junction ]
(junctions - undo backwards)
left [ > Player > FromL JunctionFrom | Junction ] -> [ JunctionFrom | action Junction Player FromL ]
right [ > Player > FromR JunctionFrom | Junction ] -> [ JunctionFrom | action Junction Player FromR ]
up [ > Player > FromU JunctionFrom | Junction ] -> [ JunctionFrom | action Junction Player FromU ]
down [ > Player > FromD JunctionFrom | Junction ] -> [ JunctionFrom | action Junction Player FromD ]
[ action Junction Player PartTrack | JunctionTo Track ] -> [ Junction | action JunctionTo Player PartTrack ]
left [ ConnectsL no Junction | action JunctionTo Player PartTrack ] -> [ ConnectsL | JunctionTo < Player < FromR ]
right [ ConnectsR no Junction | action JunctionTo Player PartTrack ] -> [ ConnectsR | JunctionTo < Player < FromL ]
up [ ConnectsU no Junction | action JunctionTo Player PartTrack ] -> [ ConnectsU | JunctionTo < Player < FromD ]
down [ ConnectsD no Junction | action JunctionTo Player PartTrack ] -> [ ConnectsD | JunctionTo < Player < FromU ]
[ action Junction ] -> [ Junction ]
[ action JunctionTo ] -> [ JunctionTo ]
(lay track - undo)
left [ > Player > FromL | Crossing ] -> [ | Crossing > Player > FromL ]
right [ > Player > FromR | Crossing ] -> [ | Crossing > Player > FromR ]
up [ > Player > FromU | Crossing ] -> [ | Crossing > Player > FromU ]
down [ > Player > FromD | Crossing ] -> [ | Crossing > Player > FromD ]
left [ left FromL | ConnectsL no Train ] -> [ | FromL ]
left [ left FromL | ConnectsU no Train ] -> [ | FromU ]
left [ left FromL | ConnectsD no Train ] -> [ | FromD ]
right [ right FromR | ConnectsR no Train ] -> [ | FromR ]
right [ right FromR | ConnectsU no Train ] -> [ | FromU ]
right [ right FromR | ConnectsD no Train ] -> [ | FromD ]
up [ up FromU | ConnectsL no Train ] -> [ | FromL ]
up [ up FromU | ConnectsR no Train ] -> [ | FromR ]
up [ up FromU | ConnectsU no Train ] -> [ | FromU ]
down [ down FromD | ConnectsL no Train ] -> [ | FromL ]
down [ down FromD | ConnectsR no Train ] -> [ | FromR ]
down [ down FromD | ConnectsD no Train ] -> [ | FromD ]
[ > Player no PartTrack | ] -> [ | Player ]
(junctions - fix up after undo)
[ JunctionTo no PartTrack no Track | Junction ] -> [ > JunctionTo | Junction ]
[ left JunctionTo ] -> [ JunctionTo FromL ]
[ right JunctionTo ] -> [ JunctionTo FromR ]
[ up JunctionTo ] -> [ JunctionTo FromU ]
[ down JunctionTo ] -> [ JunctionTo FromD ]
(lay track - create track beneath us)
[ left FromU no Track ] -> [ left FromR ULTrack ]
[ right FromU no Track ] -> [ right FromL URTrack ]
[ down FromU no Track ] -> [ down FromU VTrack ]
[ left FromD no Track ] -> [ left FromR DLTrack ]
[ right FromD no Track ] -> [ right FromL DRTrack ]
[ up FromD no Track ] -> [ up FromD VTrack ]
[ up FromL no Track ] -> [ up FromD ULTrack ]
[ down FromL no Track ] -> [ down FromU DLTrack ]
[ right FromL no Track ] -> [ right FromL HTrack ]
[ up FromR no Track ] -> [ up FromD URTrack ]
[ down FromR no Track ] -> [ down FromU DRTrack ]
[ left FromR no Track ] -> [ left FromR HTrack ]
(lay track - junctions going through the wrong way)
left [ JunctionTo ConnectsL | < Player < PartTrack ] -> [ Player PartTrack action JunctionTo ConnectsL | ]
right [ JunctionTo ConnectsR | < Player < PartTrack ] -> [ Player PartTrack action JunctionTo ConnectsR | ]
up [ JunctionTo ConnectsU | < Player < PartTrack ] -> [ Player PartTrack action JunctionTo ConnectsU | ]
down [ JunctionTo ConnectsD | < Player < PartTrack ] -> [ Player PartTrack action JunctionTo ConnectsD | ]
[ Player PartTrack action JunctionTo | Junction ] -> [ JunctionTo | Player PartTrack action Junction ]
[ Player PartTrack action Junction | JunctionFrom no Track ] -> [ > Player > PartTrack action Junction | JunctionFrom ]
[ Player PartTrack action Junction | JunctionFrom Track ] -> [ Junction | JunctionFrom Track ] again
[ left PartTrack action Junction ] -> [ left FromR Junction ]
[ right PartTrack action Junction ] -> [ right FromL Junction ]
[ up PartTrack action Junction ] -> [ up FromD Junction ]
[ down PartTrack action Junction ] -> [ down FromU Junction ]
(lay track - check joining with existing track)
startloop
[ > PartTrack > Player | ] -> [ | > PartTrack Player ]
[ Track FromL no ConnectsL ] -> cancel
[ Track FromR no ConnectsR ] -> cancel
[ Track FromU no ConnectsU ] -> cancel
[ Track FromD no ConnectsD ] -> cancel
[ Crossing > PartTrack Player ] -> [ Crossing > PartTrack > Player ]
[ > PartTrack stationary Player ] -> [ PartTrack Player ]
[ ConnectsL stationary PartTrack Player no FromL ] -> [ ConnectsL left FromR Player ]
[ ConnectsR stationary PartTrack Player no FromR ] -> [ ConnectsR right FromL Player ]
[ ConnectsU stationary PartTrack Player no FromU ] -> [ ConnectsU up FromD Player ]
[ ConnectsD stationary PartTrack Player no FromD ] -> [ ConnectsD down FromU Player ]
[ > PartTrack stationary Player ] -> [ > PartTrack > Player ]
endloop
[ > Player ] -> [ no PartTrack ]
(start train)
[ UTrain ] -> [ up UTrain ]
[ DTrain ] -> [ down DTrain ]
[ LTrain ] -> [ left LTrain ]
[ RTrain ] -> [ right RTrain ]
([ Player ] [ moving Train ] -> [ Player ] [ Train ])
[ Delay ] [ moving Train ] -> [ Delay ] [ Train ]
[ Delayed ] [ moving Train ] -> [ Delayed ] [ Train ]
[ Delay ] [ WorldExitPoint ] -> [ Delay ] [ action WorldExitPoint ]
[ Delayed ] [ WorldExitPoint ] -> [ Delayed ] [ action WorldExitPoint ]
[ > Train | Player ] -> [ Train | Player ]
[ > Train | Solid ] -> cancel
[ > Train | Passenger ] -> cancel
[ > Train | TrainOrCart ] -> cancel
[ > Train | DoorVisible ] -> cancel
[ moving Train ] [ DoorHidden ] -> [ moving Train ] [ DoorVisible ]
(train going through a junction should set the track to make that branch active)
[ Train Junction | Cart JunctionTo ] -> [ action Train Junction | Cart JunctionTo ]
[ action Train Junction | JunctionFrom ] -> [ > Train Junction | JunctionFrom ]
left [ up Train Junction | Cart JunctionTo ] -> [ up UTrain Junction ULTrack | Cart JunctionTo ]
left [ down Train Junction | Cart JunctionTo ] -> [ down DTrain Junction DLTrack | Cart JunctionTo ]
left [ right Train Junction | Cart JunctionTo ] -> [ right RTrain Junction HTrack | Cart JunctionTo ]
right [ up Train Junction | Cart JunctionTo ] -> [ up UTrain Junction URTrack | Cart JunctionTo ]
right [ down Train Junction | Cart JunctionTo ] -> [ down DTrain Junction DRTrack | Cart JunctionTo ]
right [ left Train Junction | Cart JunctionTo ] -> [ left LTrain Junction HTrack | Cart JunctionTo ]
up [ left Train Junction | Cart JunctionTo ] -> [ left LTrain Junction ULTrack | Cart JunctionTo ]
up [ right Train Junction | Cart JunctionTo ] -> [ right RTrain Junction URTrack | Cart JunctionTo ]
up [ down Train Junction | Cart JunctionTo ] -> [ down DTrain Junction VTrack | Cart JunctionTo ]
down [ left Train Junction | Cart JunctionTo ] -> [ left LTrain Junction DLTrack | Cart JunctionTo ]
down [ right Train Junction | Cart JunctionTo ] -> [ right RTrain Junction DRTrack | Cart JunctionTo ]
down [ up Train Junction | Cart JunctionTo ] -> [ up UTrain Junction VTrack | Cart JunctionTo ]
(train leaves world and should keep moving)
[ > Train Track | ] -> [ > Train action Track | ]
[ > Train stationary Track ] -> [ > Train Track WorldExitPoint ]
[ action Track ] -> [ Track ]
[ stationary WorldExitPoint TrainOrCart no PassengerOnCart ] -> [ WorldExitPoint TrainCartGap no PassengerOnCart ] again
(move train)
[ > Train | Wormhole ] [ no Train | Wormhole | ] -> [ TrainCartGap | Wormhole ] [ | Wormhole | action Train ] again
[ > Train | ] -> [ TrainCartGap | action Train ] again
(cart follows train)
startloop
left [ stationary TrainCartGap ConnectsL | stationary Cart ] -> [ > TrainCartGap ConnectsL | Cart ]
right [ stationary TrainCartGap ConnectsR | stationary Cart ] -> [ > TrainCartGap ConnectsR | Cart ]
up [ stationary TrainCartGap ConnectsU | stationary Cart ] -> [ > TrainCartGap ConnectsU | Cart ]
down [ stationary TrainCartGap ConnectsD | stationary Cart ] -> [ > TrainCartGap ConnectsD | Cart ]
left [ stationary TrainCartGap ConnectsL | Wormhole ] [ no TrainCartGap | Wormhole | stationary Cart ] -> [ > TrainCartGap ConnectsL | Wormhole ] [ no TrainCartGap | Wormhole | stationary Cart ]
right [ stationary TrainCartGap ConnectsR | Wormhole ] [ no TrainCartGap | Wormhole | stationary Cart ] -> [ > TrainCartGap ConnectsR | Wormhole ] [ no TrainCartGap | Wormhole | stationary Cart ]
up [ stationary TrainCartGap ConnectsU | Wormhole ] [ no TrainCartGap | Wormhole | stationary Cart ] -> [ > TrainCartGap ConnectsU | Wormhole ] [ no TrainCartGap | Wormhole | stationary Cart ]
down [ stationary TrainCartGap ConnectsD | Wormhole ] [ no TrainCartGap | Wormhole | stationary Cart ] -> [ > TrainCartGap ConnectsD | Wormhole ] [ no TrainCartGap | Wormhole | stationary Cart ]
[ stationary Cart HangOnGuess | < TrainCartGap ] -> [ Cart > HangOnGuess | < TrainCartGap ]
[ HangOn no HangOnTarget | > HangOnGuess ] -> [ HangOn | v HangOnGuess ]
left [ > HangOnGuess ConnectsL | no TrainCartGap ] -> [ right HangOnGuess ConnectsL | ]
right [ > HangOnGuess ConnectsR | no TrainCartGap ] -> [ left HangOnGuess ConnectsR | ]
up [ > HangOnGuess ConnectsU | no TrainCartGap ] -> [ down HangOnGuess ConnectsU | ]
down [ > HangOnGuess ConnectsD | no TrainCartGap ] -> [ up HangOnGuess ConnectsD | ]
[ HangOn no HangOnTarget | ^ HangOnGuess ] -> [ HangOn | HangOnLeft ]
[ HangOn no HangOnTarget | v HangOnGuess ] -> [ HangOn | HangOnRight ]
[ stationary Cart HangOnMarker | < TrainCartGap ] -> [ Cart > HangOnMarker | < TrainCartGap ]
[ stationary HangOn no HangOnTarget | moving HangOnMarker ] -> [ moving HangOn | HangOnMarker ]
[ > HangOn | HangOnLeft ] -> [ ^ HangOn | ^ HangOnLeft ]
[ > HangOn | HangOnRight ] -> [ v HangOn | v HangOnRight ]
[ > HangOn | Collides ] -> [ action HangOn | Collides ]
[ action HangOn | HangOnMarker ] -> [ HangOn | ]
[ > HangOn | no Collides ] -> [ | action HangOn ]
[ action HangOn | TrainCartGap ] -> [ HangOn | TrainCartGap ]
[ > HangOnMarker | Collides ] -> [ action HangOnMarker | Collides ]
[ action HangOnMarker ] [ action HangOn ] -> [] [ HangOn ]
[ action HangOn ] [ > HangOnMarker | no Collides ] -> [] [ > HangOnMarker | HangOn ]
[ stationary Cart HangOnMarker | < TrainCartGap ] -> [ Cart > HangOnMarker | < TrainCartGap ]
[ stationary HangOn no HangOnTarget | moving HangOnMarker ] -> [ moving HangOn | HangOnMarker ]
[ > HangOn | no Collides ] -> [ | HangOn ]
[ stationary Cart PassengerOnCart | < TrainCartGap ] -> [ TrainCartGap | action Cart PassengerOnCart ]
[ stationary Cart | < TrainCartGap ] -> [ TrainCartGap | action Cart ]
([ > TrainCartGap | Wormhole ] [ no TrainCartGap | Wormhole | action TrainOrCart ] -> [ | Wormhole ] [ | Wormhole | action TrainOrCart ])
[ > TrainCartGap | Wormhole ] [ no TrainCartGap | Wormhole | stationary Cart PassengerOnCart ] -> [ action Cart PassengerOnCart | Wormhole ] [ | Wormhole | TrainCartGap ]
[ > TrainCartGap | Wormhole ] [ no TrainCartGap | Wormhole | stationary Cart ] -> [ action Cart | Wormhole ] [ | Wormhole | TrainCartGap ]
[ > TrainCartGap ] -> [ TrainCartGap ]
endloop
[ TrainCartGap ] -> []
(train turns when entering corners)
[ action Train ConnectsL no RTrain no Crossing ] -> [ LTrain ConnectsL ]
[ action Train ConnectsR no LTrain no Crossing ] -> [ RTrain ConnectsR ]
[ action Train ConnectsU no DTrain no Crossing ] -> [ UTrain ConnectsU ]
[ action Train ConnectsD no UTrain no Crossing ] -> [ DTrain ConnectsD ]
(remove delay objects from previous turn)
[ Delay no PassengerWaiting no PassengerOnCart ] -> [] again
[ Delay ] -> [ Delay Delayed ]
(Passengers get on)
late [ HangOn no HangOnTarget | Cart no Passenger ] -> [ HangOn | Cart HangOnGuess ] again
late [ Passenger Delay no Cart no Target | Cart no Passenger | Passenger Delay no Cart no Target ] -> [ Passenger Delayed | Cart | Passenger Delayed ] again
late [ StackPassenger Delay no Cart no Target | Cart StackPassenger | StackPassenger Delay no Cart no Target ] -> [ StackPassenger Delayed | StackPassenger Cart | StackPassenger Delayed ] again
late [ TopAndBottomWaiting Delay no Cart no Target | Cart no PassengerOnCart ] -> [ BottomWaiting Delay | Cart TopOnCart ] again
(late [ TopAndBottomWaiting Delay no Cart no Target | Cart BottomOnCart ] -> [ BottomWaiting Delay | Cart TopAndBottomOnCart ] again)
late [ BottomWaiting Delay no Cart no Target | Cart no PassengerOnCart ] -> [ Delay | Cart BottomOnCart ] again
late [ HumanWaiting Delay no Cart no Target | Cart no PassengerOnCart ] -> [ | Cart HumanOnCart ] again
late [ BluePassengerWaiting Delay no Cart no Target | Cart no PassengerOnCart ] -> [ Delay | Cart BluePassengerOnCart ] again
late [ RedPassengerWaiting Delay no Cart no Target | Cart no PassengerOnCart ] -> [ Delay | Cart RedPassengerOnCart ] again
late [ Slime Delay no Cart no Target | Cart no PassengerOnCart ] -> [ Delay | Cart SlimeOnCart ] again
late [ Slime Delay no Cart no Target | Cart Poop ] -> [ Delay | Cart SlimeOnCart ] again
late [ 1StackPassenger Delay no Cart no Target | Cart 3StackPassenger ] -> [ Delay | Cart 4StackPassenger ] again
late [ 2StackPassenger Delay no Cart no Target | Cart 3StackPassenger ] -> [ 1StackPassenger Delay | Cart 4StackPassenger ] again
late [ 3StackPassenger Delay no Cart no Target | Cart 3StackPassenger ] -> [ 2StackPassenger Delay | Cart 4StackPassenger ] again
late [ 4StackPassenger Delay no Cart no Target | Cart 3StackPassenger ] -> [ 3StackPassenger Delay | Cart 4StackPassenger ] again
late [ 1StackPassenger Delay no Cart no Target | Cart 2StackPassenger ] -> [ Delay | Cart 3StackPassenger ] again
late [ 2StackPassenger Delay no Cart no Target | Cart 2StackPassenger ] -> [ 1StackPassenger Delay | Cart 3StackPassenger ] again
late [ 3StackPassenger Delay no Cart no Target | Cart 2StackPassenger ] -> [ 2StackPassenger Delay | Cart 3StackPassenger ] again
late [ 4StackPassenger Delay no Cart no Target | Cart 2StackPassenger ] -> [ 3StackPassenger Delay | Cart 3StackPassenger ] again
late [ 1StackPassenger Delay no Cart no Target | Cart 1StackPassenger ] -> [ Delay | Cart 2StackPassenger ] again
late [ 2StackPassenger Delay no Cart no Target | Cart 1StackPassenger ] -> [ 1StackPassenger Delay | Cart 2StackPassenger ] again
late [ 3StackPassenger Delay no Cart no Target | Cart 1StackPassenger ] -> [ 2StackPassenger Delay | Cart 2StackPassenger ] again
late [ 4StackPassenger Delay no Cart no Target | Cart 1StackPassenger ] -> [ 3StackPassenger Delay | Cart 2StackPassenger ] again
late [ 1StackPassenger Delay no Cart no Target | Cart no Passenger ] -> [ Delay | Cart 1StackPassenger ] again
late [ 2StackPassenger Delay no Cart no Target | Cart no Passenger ] -> [ 1StackPassenger Delay | Cart 1StackPassenger ] again
late [ 3StackPassenger Delay no Cart no Target | Cart no Passenger ] -> [ 2StackPassenger Delay | Cart 1StackPassenger ] again
late [ 4StackPassenger Delay no Cart no Target | Cart no Passenger ] -> [ 3StackPassenger Delay | Cart 1StackPassenger ] again
(mark passengers to get on next turn)
late [ PassengerWaiting no Cart no Delay no Delayed no Target no HangOn | Cart no PassengerOnCart ] -> [ PassengerWaiting Delay | Cart ] again
late [ StackPassenger no Cart no Delay no Delayed no Target no HangOn | Cart StackPassenger no 4StackPassenger ] -> [ StackPassenger Delay | Cart StackPassenger ] again
late [ Slime no Cart no Delay no Delayed no Target no HangOn | Cart Poop ] -> [ Slime Delay | Cart Poop ] again
(late [ TopAndBottomWaiting no Cart no Delay no Target | Cart BottomOnCart ] -> [ TopAndBottomWaiting Delay | Cart BottomOnCart ] again)
(passengers get off)
late [ PickupBG no PassengerWaiting | HumanOnCart Delay ] -> [ PickupBG HumanWaiting | Delay ]
late [ Cart Delay no PassengerOnCart | ScaryPassengerWaiting ] -> [ Cart | ScaryPassengerWaiting Delay ]
late [ HangOn HangonTarget | Cart HangOnMarker ] -> [ HangOn HangOnTarget | Cart Delay ]
late [ BottomOnCart Delay Cart | no PassengerWaiting TopAndBottomTarget ] -> [ Delay Cart | BottomWaiting TopAndBottomTarget ] again
late [ BluePassengerOnCart Delay Cart | no PassengerWaiting BlueTarget ] -> [ Delay Cart | BluePassengerWaiting BlueTarget ] again
late [ RedPassengerOnCart Delay Cart | no PassengerWaiting RedTarget ] -> [ Delay Cart | RedPassengerWaiting RedTarget ] again
late [ SlimeOnCart Delay Cart | no PassengerWaiting SlimeTarget ] -> [ Delay Cart Poop | Slime SlimeTarget ] again
late [ 1StackPassenger Delay Cart | no Passenger StackTarget ] -> [ Delay Cart | 1StackPassenger StackTarget ] again
late [ 1StackPassenger Delay Cart | 1StackPassenger no 1StackTarget no AnyTarget ] -> [ Delay Cart | 2StackPassenger ] again
late [ 1StackPassenger Delay Cart | 2StackPassenger no 1StackTarget no AnyTarget ] -> [ Delay Cart | 3StackPassenger ] again
late [ 1StackPassenger Delay Cart | 3StackPassenger no 1StackTarget no AnyTarget ] -> [ Delay Cart | 4StackPassenger ] again
late [ 2StackPassenger Delay Cart | no Passenger StackTarget ] -> [ 1StackPassenger Delay Cart | 1StackPassenger StackTarget ] again
late [ 2StackPassenger Delay Cart | 1StackPassenger no 1StackTarget no AnyTarget ] -> [ 1StackPassenger Delay Cart | 2StackPassenger ] again
late [ 2StackPassenger Delay Cart | 2StackPassenger no 1StackTarget no AnyTarget ] -> [ 1StackPassenger Delay Cart | 3StackPassenger ] again
late [ 2StackPassenger Delay Cart | 3StackPassenger no 1StackTarget no AnyTarget ] -> [ 1StackPassenger Delay Cart | 4StackPassenger ] again
late [ 3StackPassenger Delay Cart | no Passenger StackTarget ] -> [ 2StackPassenger Delay Cart | 1StackPassenger StackTarget ] again
late [ 3StackPassenger Delay Cart | 1StackPassenger no 1StackTarget no AnyTarget ] -> [ 2StackPassenger Delay Cart | 2StackPassenger ] again
late [ 3StackPassenger Delay Cart | 2StackPassenger no 1StackTarget no AnyTarget ] -> [ 2StackPassenger Delay Cart | 3StackPassenger ] again
late [ 3StackPassenger Delay Cart | 3StackPassenger no 1StackTarget no AnyTarget ] -> [ 2StackPassenger Delay Cart | 4StackPassenger ] again
late [ 4StackPassenger Delay Cart | no Passenger StackTarget ] -> [ 3StackPassenger Delay Cart | 1StackPassenger StackTarget ] again
late [ 4StackPassenger Delay Cart | 1StackPassenger no 1StackTarget no AnyTarget ] -> [ 3StackPassenger Delay Cart | 2StackPassenger ] again
late [ 4StackPassenger Delay Cart | 2StackPassenger no 1StackTarget no AnyTarget ] -> [ 3StackPassenger Delay Cart | 3StackPassenger ] again
late [ 4StackPassenger Delay Cart | 3StackPassenger no 1StackTarget no AnyTarget ] -> [ 3StackPassenger Delay Cart | 4StackPassenger ] again
late [ BluePassengerOnCart Delay Cart | no PassengerWaiting AnyTarget ] -> [ Delay Cart | BluePassengerWaiting AnyTarget ] again
late [ RedPassengerOnCart Delay Cart | no PassengerWaiting AnyTarget ] -> [ Delay Cart | RedPassengerWaiting AnyTarget ] again
late [ SlimeOnCart Delay Cart | no PassengerWaiting AnyTarget ] -> [ Delay Cart Poop | Slime AnyTarget ] again
late [ 1StackPassenger Delay Cart | no PassengerWaiting AnyTarget ] -> [ Delay Cart | 1StackPassenger AnyTarget ] again
late [ 2StackPassenger Delay Cart | no PassengerWaiting AnyTarget ] -> [ 1StackPassenger Delay Cart | 1StackPassenger AnyTarget ] again
late [ 3StackPassenger Delay Cart | no PassengerWaiting AnyTarget ] -> [ 2StackPassenger Delay Cart | 1StackPassenger AnyTarget ] again
late [ 4StackPassenger Delay Cart | no PassengerWaiting AnyTarget ] -> [ 3StackPassenger Delay Cart | 1StackPassenger AnyTarget ] again
late [ BottomOnCart Delay Cart | no PassengerWaiting AnyTarget ] -> [ Delay Cart | BottomWaiting AnyTarget ] again
late [ TopOnCart Delay Cart | BottomWaiting Target ] -> [ Delay Cart | TopAndBottomWaiting Target ] again
(late [ TopAndBottomOnCart Delay Cart | BottomWaiting Target ] -> [ BottomOnCart Delay Cart | TopAndBottomWaiting Target ] again)
(mark passengers to get off next turn)
late [ ScaryPassengerWaiting | HumanOnCart ] -> [ ScaryPassengerWaiting | HumanOnCart Delay ]
late [ HumanOnCart Delay | PickupBG no PassengerWaiting ] -> [ HumanOnCart | PickupBG Delay ]
late [ HumanOnCart Delay ] -> [ HumanOnCart ]
late [ HumanOnCart | PickupBG Delay ] -> [ HumanOnCart Delay | PickupBG ]
late [ BluePassengerOnCart Cart no Delay | no PassengerWaiting BlueTarget ] -> [ BluePassengerOnCart Cart Delay | BlueTarget ] again
late [ RedPassengerOnCart Cart no Delay | no PassengerWaiting RedTarget ] -> [ RedPassengerOnCart Cart Delay | RedTarget ] again
late [ SlimeOnCart Cart no Delay | no PassengerWaiting SlimeTarget ] -> [ SlimeOnCart Cart Delay | SlimeTarget ] again
late [ BottomOnCart Cart no Delay | no PassengerWaiting TopAndBottomTarget ] -> [ BottomOnCart Cart Delay | TopAndBottomTarget ] again
(late [ TopAndBottomOnCart Cart no Delay | BottomWaiting Target ] -> [ TopAndBottomOnCart Cart Delay | BottomWaiting Target ] again)
late [ TopOnCart Cart no Delay | BottomWaiting Target ] -> [ TopOnCart Cart Delay | BottomWaiting Target ] again
late [ 1StackPassenger Cart no Delay no Delayed | 1StackTarget no Passenger ] -> [ 1StackPassenger Cart Delay | 1StackTarget ] again
late [ 1StackPassenger Cart no Delay no Delayed | 2StackTarget no 2StackPassenger ] -> [ 1StackPassenger Cart Delay | 2StackTarget ] again
late [ 1StackPassenger Cart no Delay no Delayed | 3StackTarget no 3StackPassenger ] -> [ 1StackPassenger Cart Delay | 3StackTarget ] again
late [ 1StackPassenger Cart no Delay no Delayed | 4StackTarget no 4StackPassenger ] -> [ 1StackPassenger Cart Delay | 4StackTarget ] again
late [ 2StackPassenger Cart no Delay no Delayed | 1StackTarget no Passenger ] -> [ 2StackPassenger Cart Delay | 1StackTarget ] again
late [ 2StackPassenger Cart no Delay no Delayed | 2StackTarget no 2StackPassenger ] -> [ 2StackPassenger Cart Delay | 2StackTarget ] again
late [ 2StackPassenger Cart no Delay no Delayed | 3StackTarget no 3StackPassenger ] -> [ 2StackPassenger Cart Delay | 3StackTarget ] again
late [ 2StackPassenger Cart no Delay no Delayed | 4StackTarget no 4StackPassenger ] -> [ 2StackPassenger Cart Delay | 4StackTarget ] again
late [ 3StackPassenger Cart no Delay no Delayed | 1StackTarget no Passenger ] -> [ 3StackPassenger Cart Delay | 1StackTarget ] again
late [ 3StackPassenger Cart no Delay no Delayed | 2StackTarget no 2StackPassenger ] -> [ 3StackPassenger Cart Delay | 2StackTarget ] again
late [ 3StackPassenger Cart no Delay no Delayed | 3StackTarget no 3StackPassenger ] -> [ 3StackPassenger Cart Delay | 3StackTarget ] again
late [ 3StackPassenger Cart no Delay no Delayed | 4StackTarget no 4StackPassenger ] -> [ 3StackPassenger Cart Delay | 4StackTarget ] again
late [ 4StackPassenger Cart no Delay no Delayed | 1StackTarget no Passenger ] -> [ 4StackPassenger Cart Delay | 1StackTarget ] again
late [ 4StackPassenger Cart no Delay no Delayed | 2StackTarget no 2StackPassenger ] -> [ 4StackPassenger Cart Delay | 2StackTarget ] again
late [ 4StackPassenger Cart no Delay no Delayed | 3StackTarget no 3StackPassenger ] -> [ 4StackPassenger Cart Delay | 3StackTarget ] again
late [ 4StackPassenger Cart no Delay no Delayed | 4StackTarget no 4StackPassenger ] -> [ 4StackPassenger Cart Delay | 4StackTarget ] again
late [ PassengerOnCart no Poop Cart no Delay | no PassengerWaiting AnyTarget ] -> [ PassengerOnCart Cart Delay | AnyTarget ] again
(passenger movement cleanup)
late [ Delayed no Delay ] -> [] again
late [ Delay Delayed ] -> [ Delayed ] again
(Train leaves world - trigger first level warning)
([ stationary WorldExitPoint Train ] [ Tutorial ] [ Passenger no Target ] -> message You have to take all the passengers to the blue station)
([ stationary WorldExitPoint Train ] -> [ WorldExitPoint ] again
[ WorldExitPoint Cart ] -> [ WorldExitPoint ] again
[ WorldExitPoint PassengerOnCart ] -> [ WorldExitPoint ] again)
==============
WINCONDITIONS
==============
No train
No cart
all passenger on target
no BottomWaiting
=======
LEVELS
=======
#~#####i#
#d#####i#
.↓.......
.........
.........
...*.@...
.........
...%%%...
.........
..%oh!%..
.........
...%%%...
.........
##........##
##.*.....←l~
##......h.##
--._......##
##....*...##
##....._..--
##........##
(one car levels)
##........##
##........##
##.@......##
~r→.......--
##......!.##
##........##
##........##
##...*@...##
##.......←l~
##...!o...##
--........##
##...@*...##
##........--
##...o!...##
message Thanks for playing!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment