title chaos wizard
author mark wonnacott
homepage http://twitter.com/ragzouken

youtube JDIj3zPwEvw

(run_rules_on_level_start)

realtime_interval 0.2

========
OBJECTS
========

Space
black darkblue
00010
00000
00000
01000
00000

Background
darkblue darkgreen
00000
01000
00010
00001
00100

Wall
black darkbrown darkblue
01112
21212
02121
20021
00010

Indestructible
darkgreen grey darkgrey
01112
21212
02121
20021
00010

Red
red lightred darkred
..0..
.010.
22110
.220.
..2..

Blue
blue lightblue purple
..0..
.010.
22110
.220.
..2..

Green
green lightgreen darkgreen
..0..
.010.
22110
.220.
..2..

Stone
grey lightgrey darkgrey
..0..
.010.
22110
.220.
..2..

Charge
red darkred
1.0.1
..0..
00000
..0..
1.0.1

Prism
white lightblue grey
..0..
.000.
00000
.000.
..0..


MoveUp
white

MoveDown
white

MoveLeft
white

MoveRight
white

Expand
white

Inhibit
white

Hold
blue lightblue
.1.1.
1.0.1
.0.0.
1.0.1
.1.1.

Burn
red orange yellow white
.010.
01210
12321
01210
.010.

Player
black darkgrey yellow
..1..
.111.
.212.
00100
00000

Rival
black darkgrey red
..1..
.111.
.212.
00100
00000

Goal
black
0.0.0
.0.0.
0.0.0
.0.0.
0.0.0

=======
LEGEND
=======
, = Space
. = Background
+ = Prism
# = Wall
X = Indestructible
@ = Player and Inhibit
R = Red
G = Green
B = Blue
S = Stone
? = Goal
$ = Charge
% = Rival

3 = Space and Blue
£ = Space and Charge

Wizard = Player or Rival

Gem = Red or Blue or Green or Stone

Movement = MoveUp or MoveDown or MoveLeft or MoveRight or Expand
Mediator = Hold or Burn

Moveable = Wizard or Gem
Destructable = Wizard or Gem or Wall

=======
SOUNDS
=======

(sfx0 76693900 (prism))
sfx1 68148303 (cast)
sfx2 24680901 (fall)

Burn destroy 17088108

================
COLLISIONLAYERS
================

MoveUp, MoveDown, MoveLeft, MoveRight, Expand, Inhibit
Background
Space
Charge, Goal
Wizard, Gem, Stone, Wall, Prism, Indestructible
Hold, Burn

======
RULES
======

[ Inhibit ] [ moving Player ] -> [ ] [ Player ]
[ Inhibit ] -> cancel

[ moving Player Hold ] -> [ Player Hold ]

(rival ai)
[ Rival no Goal | Goal ] -> [ > Rival | Goal ]

(objects fall into pits when not held)
late [ Moveable no Hold Space ] -> [ Space ] sfx2

[ parallel Wizard | Gem ] -> [ parallel Wizard | parallel Gem ]

[ > Gem | Charge ] -> [ Gem | Charge ]
[ > Gem | Gem ] -> [ > Gem | > Gem ]

[ action Wizard Charge ] -> [ Wizard ]
[ Charge ] [ action Wizard ] -> [ ] [ Wizard Charge ]

[ action Wizard ] -> [ Wizard Charge ]


(spells recipes)
[ Blue | Charge no Wizard ] -> [ | > Hold ] sfx1
[ Red  | Charge no Wizard ] -> [ | > Burn ] sfx1

[ Blue | Green | Charge no Wizard ] -> [ Blue | Blue | Blue ] sfx1
[ Red  | Green | Charge no Wizard ] -> [ Red  | Red  | Red  ] sfx1

[ Green | Charge no Wizard ] -> [ Red | Blue ] sfx1

[ Stone | Charge no Wizard ] -> [ Prism | ] sfx1
[ Prism | Charge no Wizard ] -> [ Stone | ] sfx1

(prism expands a spell)
[ stationary Player ] [ Mediator Prism ] -> [ Player ] [ Expand Mediator Prism ] sfx0

(shortcut to create directional mediators)
[    up Mediator ] -> [ Mediator MoveUp    ]
[  down Mediator ] -> [ Mediator MoveDown  ]
[  left Mediator ] -> [ Mediator MoveLeft  ]
[ right Mediator ] -> [ Mediator MoveRight ]

(apply movement to mediators)
[ stationary Player ] [ Mediator MoveUp    ] -> [ Player ] [    up Mediator    up MoveUp    ]
[ stationary Player ] [ Mediator MoveDown  ] -> [ Player ] [  down Mediator  down MoveDown  ]
[ stationary Player ] [ Mediator MoveLeft  ] -> [ Player ] [  left Mediator  left MoveLeft  ]
[ stationary Player ] [ Mediator MoveRight ] -> [ Player ] [ right Mediator right MoveRight ]

(expand multiplies the spell in all directions)
     up [ Mediator Expand | no Movement no Wall ] -> [ Mediator Expand | Mediator MoveUp    ]
+  down [ Mediator Expand | no Movement no Wall ] -> [ Mediator Expand | Mediator MoveDown  ]
+  left [ Mediator Expand | no Movement no Wall ] -> [ Mediator Expand | Mediator MoveLeft  ]
+ right [ Mediator Expand | no Movement no Wall ] -> [ Mediator Expand | Mediator MoveRight ]

[ stationary Player ] [ > Mediator > Movement | Prism ] -> [ Player ] [ > Mediator Movement | Prism ]
[ stationary Player ] [ Mediator Expand ] -> [ Player ] [ ]

(teleport fizzles on dirt and wall)
[ Hold Wall ] -> [ Wall ]
[ Hold Indestructible ] -> [ Indestructible ]

(fireball destroys dirt, fizzles on wall)
[ Burn Destructable   ] -> [ ]
[ Burn Indestructible ] -> [ Indestructible ]

(spells cancel out)
[ stationary Player ] [ > Mediator Movement | Mediator Movement ] -> [ Player ] [ | ]

(clean up spell-less move commands)
[ stationary Player ] [ Movement no Mediator ] -> [ Player ] [ ]

(teleport moves objects)
[ > Hold Moveable ] -> [ > Hold > Moveable ]

(spells end on goal)
[ > Mediator Movement | Goal ] -> [ | Goal ]

(rival leaves level)
[ Rival Goal ] -> [ Goal ]

==============
WINCONDITIONS
==============

some Player on Goal
no Rival

=======
LEVELS
=======

message you are a chaos wizard - heir of an ancient sigil - a sigil with the power to free magick from its mineral slumber

message cast spells by placing your sigil next to mana ores. escape this tomb

(rival wizard, introduce teleport, teach pulling)
x##xxxxxxx##x
xxxxxbbbxxxxx
x,,xx...xx,,x
,,,,#...#,,,,
,,,,#...#,,,,
,,,,#...#,,,,
,,,,#...#,,,,
,,,,#.@.#,,,,
,,,,#...#,,,,
,,,,#...#,,,,
,,,,#...#,,,,
,,,,#$$$#,,,,
x,,xxbbbxx,,x
xxxxx.%.xxxxx
x##xx???xx##x

(move demo, teach teleport)
x,,xxxxxxx,,x
xxxxx...xxxxx
x##xx.@.xx##x
####x...x####
##xxx...xxx##
##xb......x##
##x.x...x.x##
##x...b.b.x##
##x...$...x##
##x.x.%.x.x##
##x,,.....x##
##x,,,,,..x##
##x,x,,,xbx##
##x,,..,,,x##
##xxx...xxx##
####x???x####

(teach that mana can be teleported)
##xxxxxx#####
##x.....x####
##x.@...,x###
##.....,,,x##
##....,,...x#
#.b##x,b...x#
#.####x..b.x#
#..###.$.$.x#
##.....b.%.x#
#######x.,,x#
#######x,,,x#
#######x,,,x#
#######x,..x#
#######x???x#

(introduce fireball, teach fireball)
###xxxxxxx###
###xx...xx###
###xx.@.xx###
###xx...xx###
###xx...xx###
###xx...xx###
#rr#x...xx###
rrrr..$.xx###
rr####R.xx###
r#######xx###
r#######xx###
######..xx###
###xx...xx###
###xx.%.xx###
###xx???xx###

(puzzle: teleport, fireball, teleporting mana)
###############
#####xxxxx#####
#xxxxxbrbxxxxx#
#x,,,,...,,,,x#
#x,....@....,x#
#x,.,,...,,.,x#
#x,.,,,,,,,.,x#
#xr..,x#x,..bx#
#xr..,#.#,..rx#
#xr$.,x#x,.$bx#
#x,,,,,,,,,,,x#
#x,.,,rrr,,.,x#
#x,.........,x#
#x,,,,$$$,,,,x#
#xxx#.bbbxxxxx#
#####x.%.x#####
#####x???x#####

(introduce & teach pre-sigil)
###xxxxxxx###
###xx...xx###
###x..@..x###
##x.....##x##
#x.r....###x#
#x$#r#x..##x#
#x###x.b.$bx#
#x###x$x..,x#
#x.##x%x..,x#
#x..#,...,,x#
#x...,,,,,,x#
##x...,,,,x##
###x....,x###
###xx...xx###
###xx???xx###

(puzzle: fireball, pre-sigil)
#################
#####xxxxxxx#####
#xxxxxx...xxxxxx#
#xr...x.@.xr###x#
#xr.....#...###x#
#xrr..x...x..##x#
#xxxx..,,,.#xxxx#
####x.x,,,x.x####
####x..,,,.#x####
####x.x,,,x#x####
####x..,,,.#x####
####x.x,,,x.x####
####x..,,,.#x####
####xx#$.$.xx####
#####xxr%rxx#####
#####xx???xx#####

(introduce split, teach split)
###xxxxxxx###
###xx...xx###
###xx.@.xx###
###xx...xx###
###xx...xx###
###xx.g.xx###
####x...xx###
#####...xx###
#######.xx###
########xx###
######,,xx###
#####,,,xx###
####x,..xx###
###xx.%.xx###
###xx???xx###

(puzzle: teleport, fireball, split)
#######xxxxx#
#xxxxxxx...x#
#x###b...@.x#
#x####r$...x#
#x##r$...,.##
#x#.gxx.,,,,#
#x...x##,,,,#
#x###x##,,,,#
#xg##x##,,,,#
#x...xxx,,,.#
#x.......,,.#
#x.....###,b#
#x....###.#x#
#xxxxxxx.%.x#
#######x???x#

(introduce multiply, teach multiply)
x###xxxxx###x
xx#xx...xx#xx
,x#x.@...x#x,
xxxxx...xxxxx
xbg$x.$#x$grx
xbg$x.r#x$grx
xxxxx$##xxxxx
,x#x.r...x#x,
xxxxx##.xxxxx
xbg$###...grx
xbg$x..,x.,,x
xxxxx.,,xxxxx
,x#x.,,,.x#x,
xx#xx,,%xx#xx
x###x???x###x

(puzzle: fireball, teleport mana, multiply)
####xxxxxxx####
####xx...xx####
###xxx.@.xxx###
###x.xr.rx.x###
###x...r...x###
xxxx.......xxxx
x..x,.$$$.,x.rx
x.g.,.rrr.,...x
x.#...x#x.....x
x...,#####,...x
xb.x,##.##,x..x
xxxx#...#..xxxx
###x.##..##x###
###x.x.%#x#x###
###xxx???xxx###

(puzzle: fireball, teleport, teleport mana, split, multiply)
####xxxxxxx####
####xx.@.xx####
#####r...g#####
####r.,,,.#####
####r.,,,.#g###
####..,,,..####
###b.....$.#g##
###....,,r..###
###...,,,,..###
####.$,,,,,,###
####$r,,,#...##
####r,,###....#
###,,,####....#
####xx#%#xx.r##
####xx???xx####

(introduce amplification, teach amplification)
###xxxxxxx###
#xxxx...xxxx#
#xrxx.@.xx,x#
#x.........x#
#x,,.xxxxxgx#
#x+,#x###x.x#
#x,,.xxxxx.x#
#x.r..#...rx#
#xgxxxxx.,,x#
#x#x###x#,+x#
#x#xxxxx.,,x#
#x.###....$x#
#x,xx...xxbx#
#xxxx.%.xxxx#
###xx???xx###

(amplified teleport)
,,xxxxxxx,,
,#xx...xx#,
,#xx.@.xx#,
#+.,$b.,.+#
,..#...,..#
,,,#,,###,#
,..#...#..#
#+.,.+r£.+#
#..,##.,..,
,,,,,,,,,,,
,.#,##.,..#
#x.,.x.,.+#
##xx...xx##
#,xx.%.xx,#
,,xx???xx#,

(puzzle: fireball, amplified fireball)
###xxxxxxx###
#xxxx...xxxx#
#xrxx.@.xxrx#
#xr.......rx#
#x..##.#...x#
#x..,,,,,##x#
#x#.,,,,#.#x#
#x###,+,###x#
#x..#,,,##.x#
#x..,,,,,##x#
#x.######..x#
#x.#####...x#
#xrxx#.#xxrx#
#xxxx.%.xxxx#
###xx???xx###

(puzzle: fireball, split, amplified teleport)
###xxxxxxx###
#xxxx...xxxx#
#xbxx.@.xx.x#
#x..x...x...#
#x...,.,...,#
#x...,.,...,#
#x..,...,..,#
#x.#...r.#.##
#x.x,,,,,x.x#
#xgx+,+,+x.x#
#x#xxx,xxx.x#
#x##..$...#x#
#x#xx.r.xx#x#
#xxxx.%.xxxx#
###xx???xx###

(puzzle: fireball, sigil-first, split, multiply, amplified teleport)
###xxxxxxx###
#xxxx...xxxx#
#x#xx.@.xx.x#
#x........gx#
#xgx..x..x.x#
#x.x.....x.x#
#x,,x...x,,x#
#x+,..,..,+x#
#x,,x$.$x,,x#
#x.x.r.r.x.x#
#x.x.#x#.x.x#
#x...###...x#
#x.xx#.#xx.x#
#xxxx.%.xxxx#
###xx???xx###

(introduce mobile amplify, teach mobile amplify)
(puzzle: teleport, amplified teleport)
###xxxxxxxx,,
#xxxx...xxx,,
#x.xx.@.xx,,,
#xbbs...,,,,#
#xx.,,.,,,+##
#xx.,,.,,,,,#
#xx,,x.x,,,,,
#x,,,r$,,,+##
#xx,,x,x,,,##
#xx.,,,,,,,,#
#xx.,##,,,,,,
#x....##,,,,,
#x.xx..#xx,,,
#xxxx.%.xxx,,
###xx???xxx,,

(puzzle: teleport, fireball, mobile amplify)
#################
#####xxxxxxx#####
#xxxxxx.@.xxxxxx#
#x.bbx.+++.x+.+x#
#x...x.....x.xrx#
#x#.....b....x$x#
#x..$x..$..x.x.x#
#x..rx.....x+.+x#
#xx$xx#.%..xxxxx#
#x#r..##.....##x#
#x#...#,,,.###.x#
#x##...,,,.#.##x#
#x##...,,,.##.bx#
#xxxxxx...xxxxxx#
#####xx...xx#####
#####xx???xx#####

message i cannot allow you to proceed

(gauntlet i: fireball dodging)
,,xxxxxxxxx,,
,,xxx...xxx,,
,,,xx.@.xx,,,
x,,,,...,,,,,
+.,,,.b.,,,,x
..x,,.$.,,,.+
+.+.,.%.,,x..
...x,...,.+.+
+.+.,...,x...
$.x,,...,.+.+
rx,,,...,,x.$
x,,,,...,,,xr
,,,,,...,,,,x
,,,xx...xx,,,
,,xxx...xxx,,
,,xxx???xxx,,

message your power waxes and thus mine wanes

(gauntlet ii: impending fireball doom)
####xxxxx####
#xxxxbbbxxxx#
#x.,..@..,.x#
#x.,.....,.x#
#x.,.....,.x#
#x.,#####,.x#
#x,#######,x#
#x,#######,x#
#x,#######,x#
#x,#######,x#
#x,#######,x#
#x,#######,x#
#x,#######,x#
#x,#######,x#
#x,#######,x#
#x,#######,x#
#x,#######,x#
#x,,#####,,x#
#x,,,,,,,,,x#
#x,x+++++x,x#
#x.xxx$xxx.x#
#x....r....x#
#xxxx.%.xxxx#
####x???x####

(message it seems you cannot be stopped

(gauntlet iii: interference pattern)
#######xxxxx#######
###xxxxx...xxxxx###
###x...s.@.s...x###
###x...s...s...x###
#xxx,,,,sbs,,,,xxx#
#x+,,,,,...,,,,,,x#
#x+,,,,,$r.,,,,,,x#
#x+,,,,,...,,,,,,x#
#x+,,,,,$$$,,,,,,x#
#xxx,,,,bbb,,,,xxx#
###x...$...$...x###
###x...r...r...x###
###xxxxx.%.xxxxx###
#######x???x#######)

message there isn't enough mana in the cosmos to stop fate
message ...but you shall not leave whilst i live

(boss)
,,x###xxxxx###x,,
,,xrrrxb.bxrrrx,,
,,,.....@.....,,,
,,,,,,,...,,,,,,,
,,,,,,,,,,,,,,,,,
,+x,,,,,,,,,,,x+,
+x+,,,,,£3,,,,+x+
x+%,,,,,,,,,,,.+x
,,,,,,x,x,x,,,,,,
,,,,,,,???,,,,,,,
,,,,,,x???x,,,,,,
,,,,,,,???,,,,,,,
,,,,,,x,x,x,,,,,,
x+.,,,,3£,,,,,.+x
+x+,,,,,,,,,,,+x+
,+x,,,,,,,,,,,x+,
,,,,,,,,,,,,,,,,,

message all of this has happened before, and all of this will happen again, my son