globals:
var candy=0;
var stone=0;
var jumptimer=0;
display: 16 16 32 22 1024 704
gametitle: Crush the Candy King
gamedesc:
Get all the candy
and raze all the buildings.
Use cursor keys or A/D to move.
Press space to jump.
tilemap: candyking-tiles.png
empty: .
cell: - 0 - false
cell: # 1 - false
cell: / 2 - false
cell: \ 2 r false
cell: % 3 - false
cell: X 4 - false
cell: Y 4 - false
cell: @ 5 - false
cell: A 6 - false
cell: C 7 - false
cell: * 8 - false
cell: M 9 l true
cell: ^ 10 - false
group: W #%XY
rule: boulderfall1
. . . . . .
. * . . - .
. - . . * .
transform: mirx
rule: boulderfall2
. . . . . .
. * . . - .
. - . . * .
conddir: L
outdir:
- - -
- - -
- L -
transform: mirx
priority: 2
rule: boulderslider
. . . . . .
. * - . - .
. \ - . . *
outdir:
- - -
- - -
- - R
priority: 2
rule: boulderslidel
. . . . . .
- * . . - .
- / . * . .
outdir:
- - -
- - -
L - -
priority: 2
rule: boulderroll
. * - . - *
conddir: R
outdir:
- - -
- - R
- - -
transform: mirx
rule: playermove
. . . . . .
. @ - . - @
. W*C^ . . . .
condfunc: playerdir("right")
transform: mirx
rule: playerslider
. . . . . .
. @ - . - .
. \ - . . @
priority: 2
rule: playerslider
. . . . . .
- @ . . - .
- / . @ . .
priority: 2
rule: playerget
. @ C . - @
condfunc: playerdir("right")
transform: rot4
outfunc: candy--;
rule: playerget2
. . . . . .
. @ . . - .
. C . . @ .
outfunc: candy--;
rule: playerpush_boul
@ * - - @ *
condfunc: playerdir("right")
outdir:
- - -
- - R
- - -
transform: mirx
anim: no
rule: playerpush_rubble
@ Y - - @ Y
condfunc: playerdir("right")
transform: mirx
anim: no
rule: playerliftstart
. . . . . .
. @ ^ . - A
. . . . . .
condfunc: playerdir("right")
transform: mirx
rule: playerlift
. ^ . . A .
. A . . ^ .
. . . . . .
rule: playerliftend
. - . . @ .
. A . . ^ .
. . . . . .
rule: playerfall
. . . . . .
. @ . . - .
. - . . @ .
priority: 3
rule: playerjump
. - . . . .
. @ . . . .
. W*C^ . . . .
condfunc: keypress(" ") && jumptimer<=0
delay: 1
outfunc: jumptimer = 6*3;
priority: 4
rule: playerjumpup
. - . . @ .
. @ . . - .
. . . . . .
condfunc: jumptimer>=3*3
priority: 6
rule: playerjumpupceil
. . . . . .
. @ . . . .
. . . . . .
condfunc: jumptimer>=3*3
priority: 4
rule: playerjumpupceillr
. . . . . .
. @ - . - @
. . . . . .
condfunc: jumptimer>=3*3 && playerdir("right")
transform: mirx
priority: 5
rule: playerjumpuplr
. - - . . @
. @ - . - .
. . . . . .
condfunc: jumptimer>=3*3 && playerdir("right")
transform: mirx
priority: 7
rule: playerjumpdown
. . . . . .
. @ . . - .
. - . . @ .
condfunc: jumptimer > 0 && jumptimer<3*3
priority: 6
rule: playerjumpdownlr
. . . . . .
. @ - . - .
. - - . . @
condfunc: jumptimer > 0 && jumptimer<3*3 && playerdir("right")
transform: mirx
priority: 7
rule: bouldercrush
. * % . - X
conddir: R
transform: mirx
outfunc: stone--;
rule: bouldercrushmonster
. * M . C -
conddir: R
transform: rot4
delay: 1
priority: 9
rule: collapse1
. . . . . .
. % . . X .
. X . . . .
outfunc: stone--;
rule: collapse2
. . . . . .
X % . . X .
. !%# . . . .
transform: mirx
outfunc: stone--;
rule: collapse3
. X . . Y .
rule: collapse3
. . . . . .
. Y . . - .
. - . . Y .
rule: collapse4
. . . . . .
. Y - . - .
. Y - . . Y
transform: mirx
rule: monsterm1
. . . . . .
. M - . - M
. W^ W^ . . .
outdir:
- - -
- - R
- - -
transform: mirx
delay: 5
rule: monsterm2
. . . . . .
. M - . - M
. W^ W^ . . .
conddir: R
outdir:
- - -
- - R
- - -
priority: 2
transform: mirx
delay: 5
rule: playerdie
@ M . M - .
delay: 1
priority: 9
transform: mirx
outfunc: lose();
rule: candyfall
. . . . . .
. C . . - .
. - . . C .
rule: playergetcandy
. @ C . - @
transform: mirx
condfunc: playerdir("right")
outfunc: candy--;
level: #
--------------------------------
--------------------------------
C-------------------------------
CC-M------------M---------------
##########################------
--------------------------------
----------------------------####
-*-----------*------------------
##-#####-################---*---
---%---%--#----------------###^#
---%---%--#---------------#---^-
###########--------------#----^-
----------#----C--------#-C---^-
----------#----%-------#--%---^-
-----M---C#----%------#---%---^-
^--########-*--%----------%---^-
^---------###--%----------%---^-
^---------####################^-
^C---M------------------------^-
#########---------------------^-
-@----------------------------^-
################################
title: Introduction
desc:
Avoid the monsters.
Push the red bombs to destroy buildings.
init:
candy=7;
stone=12;
jumptimer=0;
tick:
if (jumptimer > 0) jumptimer--;
win:
candy==0 && stone==0
level: #
------------@-------------------
----------%%%---%%%-------------
----------%--CCC--%-------------
----------%--CCC--%-------------
--------%%%%%%%%%%%%%-----------
--------%-----%-----%-----------
--------%-----%-----%-----------
-----%%%%%%%%%%%%%%%%%%%--------
-----%-----------------%--------
--*--%-----------------%-*------
#############################---
--------------------------------
--------------------------------
-----*--------------------------
----%%%-%%%---------------------
----%-----%-------------*-------
----%-*---%-----------%-%%------
-%-%%%%%%-%%%%-------%%--%%-----
-%-----%-----%------%%----%%----
-%-----%-----%-----%%------%%---
-%--*--%-----%-*---%--------%-*-
################################
title: Demolition
desc:
Only a direct hit with a bomb
will destroy a standing wall.
init:
candy=6;
stone=99;
jumptimer=0;
tick:
if (jumptimer > 0) jumptimer--;
win:
candy==0 && stone==0
level: #
--------------------------------
@-*-----*-*-----*----*--*----*--
#####-######-######-#######-####
--------------------------------
--------M-----------------------
-----######-----------M---------
-------------------#######------
-------------M------------------
----------#######---------------
-------M------------------------
----#######---------------------
--------------------M-----------
-----------------######---------
--M-----------M-----------------
#####-------#####---------M-----
--------M-------------##########
-------#####--------------------
--------------------------------
-----------------M--------------
--------------########----------
--------------------------------
################################
title: Bowling
desc:
Roll a bomb into a monster to kill it.
Killing a monster will yield candy.
init:
candy=7;
stone=0;
jumptimer=0;
tick:
if (jumptimer > 0) jumptimer--;
win:
candy==0 && stone==0
level: #
--------------------------------
^#\-----------------------------
^##\----------------*---*-------
^--------M---------###-###-###-^
^--/#######\-------------------^
^-/#########\-----\---\---\---/^
^------#----------#\---------/#^
^\-----#----/#\----#\--/-------^
^#\----#---/###\-----------/\--^
^C---M-#C----M---C#--/---------^
^#################--/#\------/-^
^-----M------------###----\----^
###################----/----\--^
----------------#----------/#-##
----------------#--*------------
-*---------M---C#-^##\-----/##^-
###----##########-^###\---/###^-
-M-----*------C---^-C-#\-/#-C-^-
######^#\-----%---^-%-------%-^-
------^##\----%---^-%-------%-^-
-@----^-------%---^-%-------%-^-
################################
title: Snakes and ladders
desc:
You cannot jump or move when on a slide.
Kill monsters when possible to get extra candy.
init:
candy=9;
stone=9;
jumptimer=0;
tick:
if (jumptimer > 0) jumptimer--;
win:
candy==0 && stone==0
level: #
--------------------------------
---CCCCCCCCC-CC--CC-CCCCCCCCC---
---%%%%%%%%%%%%--%%%%%%%%%%%%---
---%------------------------%---
---%------------------------%---
---%------------------------%---
---%------------%%%%----%%%%%---
---%------------%-----------%---
---%-------*----%-----------%---
---%-*---%%%%---%--------*--%---
---%%%%%%%%-----%-###########---
---%-----*---####---------------
---%---%%%%%%---------------%---
---%---%%%%%%---------------%---
---%---%%%%%%---------------%---
---%--------%---*-----------%---
---%-##############---%%%%%%%---
---%------------------------%---
---%---------%%%--%%%%%%----%---
---%---------%%%-----%------%---
---%--*-*-@---%---*--%------%---
################################
title: Get out alive
desc:
You are inside the king's castle.
Blow it up, but don't get buried by debris.
init:
candy=22;
stone=121;
jumptimer=0;
tick:
if (jumptimer > 0) jumptimer--;
win:
candy==0 && stone==0