title Vines
author Stefan Peeters

realtime_interval .1

zoomscreen 11x9

(verbose_logging)
run_rules_on_level_start
noaction

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

Background 
#404040

Target
transparent

VineUpEnd
Green darkgreen
.....
..1..
.10..
..1..
..01.

VineLeftEnd
Green darkgreen
.....
...0.
..111
.....
.....

VineRightEnd
Green darkgreen
.....
.0...
011..
.....
.....

VineLeftUp
Green darkgreen
..1..
.10..
..011
..1..
.....

VineRightUp
Green darkgreen
..1..
..1..
1101.
.1...
.....

VineUpUp
Green darkgreen
.11..
..01.
..1..
.10..
..1..

VineUpLeft
Green darkgreen
.....
.1...
101..
..01.
..1..

VineUpRight
Green darkgreen
.....
...1.
..101
.10.0
..1..

Ladder
lightbrown brown
0...0
0...0
01110
0...0
01110

Platform
BROWN
00000
.....
.....
.....
.....

Wall
#4d2700 #663300 #804100
00000
11111
22222
00000
11111

Glass
White LightBlue
00010
1...0
0...1
0...0
00101

Player 
Red Brown Blue
.000.
.111.
12021
.222.
.2.2.

Box
BROWN darkbrown lightBrown
00000
02110
01210
01120
00000

Dirt
Brown

lightSource
transparent

LightRight
yellow
00000
.0000
..000
...00
....0

LightRightDown
yellow
0....
00...
000..
0000.
00000

LightLeft
yellow
00000
0000.
000..
00...
0....

LightLeftDown
yellow
....0
...00
..000
.0000
00000

Pot
brown
00000
00000
.000.
.000.
.000.

Check
transparent

=======
LEGEND
=======

. = Background
| = VineUpEnd
H = Ladder
T = Ladder and Platform
_ = platform
W = Wall
D = Dirt
B = Box
P = Player
O = Target
G = Glass
L = lightSource
E = Glass and LightSource
U = Pot
C = Check

VineEnd = VineLeftEnd or VineRightEnd or VineUpEnd
Vine = VineEnd or VineLeftUp or VineRightUp or VineUpUp or VineUpLeft or VineUpRight

Light = LightRight or LightRightDown or LightLeft or LightLeftDown
LightBlocker = Box or Wall
VineBlocker = Box or Wall or Glass or Vine

PushAble = Box
Climable = Vine or Ladder
FallAble = Box
Floor = Wall or Platform or Player or Box

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

Box move 67547707
Player move horizontal 5015507
player move vertical 54490507

Sfx0 85068307

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

Background
LightSource
LightRight
LightRightDown
LightLeft
LightLeftDown
Target
Vine
Ladder
Platform
Check
Player,Box, Wall, Glass, Dirt, Pot

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

[Player Check] -> [Player] checkpoint

(Movement)
[up Player no Climable] -> [Player]
up [> Player Climable no Floor|no Climable] -> [Player Climable|]
down [> Player|Floor no Climable] -> [Player|Floor]

horizontal [> Player | PushAble] -> [> Player|> PushAble]

(Gravity)
down [stationary Player no Climable | no Floor] -> [> Player|]
down [stationary FallAble | no Floor] -> [> FallAble|]
late down [Player no Climable | no Floor] -> again
late down [FallAble | no Floor] -> again

(Light creation)
late right [LightSource no LightBlocker no LightRightDown]  -> [LightSource LightRightDown]
+ late right [LightRight|no LightRightDown no LightBlocker] -> [LightRight|LightRightDown] again
+ late down  [LightRightDown|no LightRight no LightBlocker] -> [LightRightDown|LightRight] again
+ late left  [LightLeft|no LightLeftDown no LightBlocker]   -> [LightLeft|LightLeftDown] again
+ late down  [LightLeftDown|no LightLeft no LightBlocker]   -> [LightLeftDown|LightLeft] again

(Light removal)
late right [LightBlocker Light] -> [LightBlocker]
+ late right [no LightRight|LightRightDown no lightSource] -> [|]
+ late down  [no LightRightDown|LightRight] -> [|]
+ late left  [no LightLeft|LightLeftDown] -> [|]
+ late down  [no LightLeftDown|LightLeft] -> [|]

(Vine growth)

up [VineEnd|Light no VineBlocker] -> [> VineEnd|Light] again Sfx0
horizontal [stationary VineUpEnd|Light no VineBlocker] -> [> VineUpEnd|Light] again Sfx0

up [> VineUpEnd|]    -> [VineUpUp   | VineUpEnd]
up [> VineLeftEnd|]  -> [VineLeftUp | VineUpEnd]
up [> VineRightEnd|] -> [VineRightUp| VineUpEnd]

right [> VineUpEnd|] -> [VineUpRight| VineRightEnd]
left  [> VineUpEnd|] -> [VineUpLeft | VineLeftEnd]

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

All Player on Target

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

lllllllllll
l..........
l..........
l..........
l..........
l..........
l..........
looo.......
l...ooooooo
l...______w
w.........g
e..b......g
e_________g
e..b......g
e__gt.....w
e...h.....w
e...h.w__ww
e...h.g...g
e...h.g..|g
e...h....uw
e.b.h.wwwww
w.b.h.....w
ww__t.....g
ww..h.....g
e...h.....g
e.c.h.....w
e_________w
e.........w
e.b......|w
e.____twwdw
e..gc.h.www
w..g___.www
w___.....ww
ww........w
www..b....w
www_t_____w
wwwwh.|.p.w
wwwwwddddww

Message "Finally, out of the factory"

