Skip to content

Instantly share code, notes, and snippets.

@jcmiller11
Created January 3, 2020 13:47
Show Gist options
  • Select an option

  • Save jcmiller11/c745d2049c2cb5723675cc58ab5c6689 to your computer and use it in GitHub Desktop.

Select an option

Save jcmiller11/c745d2049c2cb5723675cc58ab5c6689 to your computer and use it in GitHub Desktop.
Tornado Tamer (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
title Tornado Tamer
author Mark Foster
homepage www.kramff.com
realtime_interval 0.1
========
OBJECTS
========
Background
#832607
00000
00000
00000
00000
00000
GoalArea
#33AA33
00000
00000
00000
00000
00000
ThinLeaves
#832607 #760F00 #F3AA4C #D04A01
..3..
.21.3
....2
1.3..
..1..
DenseLeaves
#832607 #760F00 #F3AA4C #D04A01 #E4750A
.1.4.
..132
13421
.2314
.1.3.
Wall
#B6693F #A17E62 #845539
11111
20100
00000
01020
22212
Player
#153D8E #24158C #895858 #BDBCC1 #111111
..111
.111.
14141
04040
.0.0.
Casting
#BDBCC1
..0..
.....
0...0
.....
..0..
Cone
#111111 #EE4400
.....
..1..
..1..
.111.
.000.
TornadoUp
#BDBCC1
00000
00000
.000.
.000.
..0..
TornadoDown
#BDBCC1
00000
.000.
..0..
..0..
..0..
TornadoLeft
#BDBCC1
00000
.000.
.00..
.0...
0....
TornadoRight
#BDBCC1
00000
.000.
..00.
...0.
....0
TornadoStill
#BDBCC1
00000
00000
.000.
..0..
..0..
TornadoSplitVert
#BDBCC1
00000
00000
.000.
..0..
..0..
TornadoSplitHoriz
#BDBCC1
00000
00000
.000.
..0..
..0..
AnimTornado1
#838790 #515151
1...0
.0...
...1.
0....
..1.0
AnimTornado2
#838790 #515151
01...
..0..
....1
.0...
0..1.
AnimTornado3
#838790 #515151
.01..
...0.
1....
..0..
.0..1
AnimTornado4
#838790 #515151
..01.
....0
.1...
...0.
1.0..
AnimTornado5
#838790 #515151
...01
0....
..1..
....0
.1.0.
AnimTornado1Temp
BLACK
.....
.....
.....
.....
.....
AnimTornado2Temp
BLACK
.....
.....
.....
.....
.....
AnimTornado3Temp
BLACK
.....
.....
.....
.....
.....
AnimTornado4Temp
BLACK
.....
.....
.....
.....
.....
AnimTornado5Temp
BLACK
.....
.....
.....
.....
.....
=======
LEGEND
=======
. = Background
~ = DenseLeaves
` = ThinLeaves
X = GoalArea
# = Wall
P = Player
@ = Cone
u = TornadoUp
d = TornadoDown
r = TornadoRight
l = TornadoLeft
Leaves = DenseLeaves or ThinLeaves
Tornado = TornadoUp or TornadoDown or TornadoLeft or TornadoRight or TornadoSplitVert or TornadoSplitHoriz or TornadoStill
AnimTornado = AnimTornado1 or AnimTornado2 or AnimTornado3 or AnimTornado4 or AnimTornado5
AnimTornadoTemp = AnimTornado1Temp or AnimTornado2Temp or AnimTornado3Temp or AnimTornado4Temp or AnimTornado5Temp
=======
SOUNDS
=======
================
COLLISIONLAYERS
================
Background
GoalArea
Cone
DenseLeaves ThinLeaves
Player, Wall, Tornado
Casting
AnimTornado, AnimTornadoTemp
======
RULES
======
(Tornadoes move)
UP [stationary Player] [ TornadoUp ] -> [stationary Player] [ UP TornadoUp ]
DOWN [stationary Player] [ TornadoDown ] -> [stationary Player] [ DOWN TornadoDown ]
LEFT [stationary Player] [ TornadoLeft ] -> [stationary Player] [ LEFT TornadoLeft ]
RIGHT [stationary Player] [ TornadoRight ] -> [stationary Player] [ RIGHT TornadoRight ]
(Toggle cast mode)
[ Action Player No Casting ] -> [ Player Casting ]
[ Action Player Casting ] -> [ Player ]
(Place a tornado in 4 directions)
UP [ > Player Casting | No Wall No Tornado] -> [ Player | TornadoUp ]
DOWN [ > Player Casting | No Wall No Tornado] -> [ Player | TornadoDown ]
LEFT [ > Player Casting | No Wall No Tornado] -> [ Player | TornadoLeft ]
RIGHT [ > Player Casting | No Wall No Tornado] -> [ Player | TornadoRight ]
(Fail to cast)
[ > Player Casting | Wall ] -> [ Player | Wall ]
[ > Player Casting | Tornado ] -> [ Player | Tornado]
(Tornado hitting a wall becomes TornadoStill)
[ > Tornado | Wall] -> [ TornadoStill | Wall]
(Split Tornados become two tornados, if able)
RIGHT [ No Wall | TornadoSplitHoriz | No Wall ] -> [ TornadoLeft | | TornadoRight ]
DOWN [ No Wall | TornadoSplitVert | No Wall ] -> [ TornadoUp | | TornadoDown ]
(Wall on left side)
RIGHT [ Wall | TornadoSplitHoriz | No Wall ] -> [ Wall | | TornadoRight ]
DOWN [ Wall | TornadoSplitVert | No Wall ] -> [ Wall | | TornadoDown ]
(Wall on right side)
RIGHT [ No Wall | TornadoSplitHoriz | Wall ] -> [ TornadoLeft | | Wall ]
DOWN [ No Wall | TornadoSplitVert | Wall ] -> [ TornadoUp | | Wall ]
(Wall on both sides)
RIGHT [ Wall | TornadoSplitHoriz | Wall ] -> [ Wall | | Wall ]
DOWN [ Wall | TornadoSplitVert | Wall ] -> [ Wall | | Wall ]
(Moving Tornado hitting a TornadoStill causes a split)
HORIZONTAL [ > Tornado | TornadoStill] -> [ | TornadoSplitVert]
VERTICAL [ > Tornado | TornadoStill] -> [ | TornadoSplitHoriz]
(Player removes still tornados when walking onto them)
[ > Player | TornadoStill] -> [ | Player ]
(Tornados push leaves, as long as there isn't a wall behind them)
([ > Tornado | Leaves | No Wall ] -> [ > Tornado | > Leaves | ])
[ > Tornado Leaves | No Wall] -> [ > Tornado > Leaves | No Wall]
(Cones stop player movement)
[ > Player | Cone ] -> [ Player | Cone ]
(Animation - Not needed for game logic)
[ AnimTornado5 ] -> [ AnimTornado1Temp ]
[ AnimTornado4 ] -> [ AnimTornado5Temp ]
[ AnimTornado3 ] -> [ AnimTornado4Temp ]
[ AnimTornado2 ] -> [ AnimTornado3Temp ]
[ AnimTornado1 ] -> [ AnimTornado2Temp ]
late [ AnimTornado5Temp ] -> [ AnimTornado5 ]
late [ AnimTornado4Temp ] -> [ AnimTornado4 ]
late [ AnimTornado3Temp ] -> [ AnimTornado3 ]
late [ AnimTornado2Temp ] -> [ AnimTornado2 ]
late [ AnimTornado1Temp ] -> [ AnimTornado1 ]
late [AnimTornado no Tornado] -> []
late [Tornado no AnimTornado] -> [Tornado AnimTornado1]
==============
WINCONDITIONS
==============
All Leaves on GoalArea
=======
LEVELS
=======
message Oh no! Gotta clean up these leaves. I'll use my Tornado Spell.
###########
#....`...X#
#...~....X#
#P....~..X#
#......`.X#
#....~...X#
###########
message I refuse to walk on these cones. Again, I'll use my Tornado Spell.
######
#....#
#.@P.#
#.@@@#
#.@~X#
#.@.X#
######
message Who keeps leaving these cones out?? Anyways, gotta use the Tornado Spell.
#######
#X~.~X#
#.....#
###.###
#.....#
#@@@@@#
#..P..#
#######
message Ack, I can't see what's going on past this wall! Whatever, I'll just more Tornado Spells.
#########
#......X#
#.......#
#.~....X#
#######.#
#.....#~#
#.P...#.#
#.....@.#
#########
message I don't remember having a room like this in my house! Let's just use some Tornado Spell.
###########
#.@@...P..#
#.##......#
#..#.#.#.##
#~.#..#X~.#
#X.#....#.#
###########
message What a mess! Looks like it's time for the Tornado Spell.
##############
#XXXXXXXXXXXX#
#X...@~.~..`X#
#X`~.`...~`@X#
#X@.@~`P@.~.X#
#XXXXXXXXXXXX#
##############
message Finally! Took care of those leaves.
message Now to clean up those tornados...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment