title IceCrates
author Tyler Glaiel
homepage twitter.com/tylerglaiel
run_rules_on_level_start true
noaction

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

Background
DarkBlue White LightBlue
22112
21122
11222
12221
22211




Wall_0000
DarkBlue Gray DarkGray DarkGray Gray
10001
00000
00000
00000
30003

Wall_0001
DarkBlue Gray DarkGray DarkGray Gray
11111
00000
00000
00000
30003

Wall_0010
DarkBlue Gray DarkGray DarkGray Gray
10002
00002
00002
00002
30002

Wall_0011
DarkBlue Gray DarkGray DarkGray Gray
11111
00002
00002
00002
30002

Wall_0100
DarkBlue Gray DarkGray DarkGray Gray
10001
00000
00000
00000
33333

Wall_0101
DarkBlue Gray DarkGray DarkGray Gray
11111
00000
00000
00000
33333

Wall_0110
DarkBlue Gray DarkGray DarkGray Gray
10002
00002
00002
00002
33333

Wall_0111
DarkBlue Gray DarkGray DarkGray Gray
11111
00002
00002
00002
33333

Wall_1000
DarkBlue Gray DarkGray DarkGray Gray
40001
40000
40000
40000
40003

Wall_1001
DarkBlue Gray DarkGray DarkGray Gray
11111
40000
40000
40000
40003

Wall_1010
DarkBlue Gray DarkGray DarkGray Gray
40002
40002
40002
40002
40002

Wall_1011
DarkBlue Gray DarkGray DarkGray Gray
11111
40002
40002
40002
40002

Wall_1100
DarkBlue Gray DarkGray DarkGray Gray
40001
40000
40000
40000
33333

Wall_1101
DarkBlue Gray DarkGray DarkGray Gray
11111
40000
40000
40000
33333

Wall_1110
DarkBlue Gray DarkGray DarkGray Gray
40002
40002
40002
40002
33333

Wall_1111
DarkBlue Gray DarkGray DarkGray Gray
11111
40002
40002
40002
33333



PlayerStill
Red Orange DarkGrey Gray Black
.000.
01110
04140
01210
.333.

PlayerL
Red Orange DarkGrey Gray Black
.000.
04110
01410
02110
.333.

PlayerR
Red Orange DarkGrey Gray Black
.000.
01140
01410
01120
.333.

PlayerU
Red Orange DarkGrey Gray Black
.000.
04140
01110
01210
.333.

PlayerD
Red Orange DarkGrey Gray Black
.000.
01110
01110
04240
.333.


Crate
Brown Yellow Orange
11111
10002
10002
10002
22222


Water1
Blue LightBlue
00000
01100
10011
00000
01100

Water2
Blue LightBlue
00000
00110
11001
00000
00110

Water3
Blue LightBlue
00000
00011
11100
00000
00011

Water4
Blue LightBlue
00000
10001
01110
00000
10001

Water5
Blue LightBlue
00000
11000
00111
00000
11000

Water6
Blue LightBlue
00000
01100
10011
00000
01100

FilledWater
LightBrown LightBlue White
11111
10002
10002
10002
22222

Goal
Black Green DarkGreen
..12.
.112.
1112.
...2.
...2.



StillCrate
Orange



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

Wall = Wall_0000 or Wall_0001 or Wall_0010 or Wall_0011 or Wall_0100 or Wall_0101 or Wall_0110 or Wall_0111 or Wall_1000 or Wall_1001 or Wall_1010 or Wall_1011 or Wall_1100 or Wall_1101 or Wall_1110 or Wall_1111

Water = Water1 or Water2 or Water3 or Water4 or Water5 or Water6

. = Background
# = Wall_1111
P = PlayerStill
* = Crate
W = Water1
G = Goal
(@ = Crate and Target
O = Target)

Player = PlayerStill or PlayerL or PlayerR or PlayerU or PlayerD
Obstacle = Wall or StillCrate or Water

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

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

Background
FilledWater
Goal
(Target)
Player, Wall, Crate, StillCrate, Water

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

(     0001

1000         0010

      0100
)

(make pretty walls)
Right [Wall | Wall_1111 | Wall] -> [Wall | Wall_0101 | Wall]
Right [Wall_1111 | Wall] -> [Wall_1101 | Wall]
Right [Wall | Wall_1111] -> [Wall | Wall_0111]


Down [Wall | Wall_1111 | Wall] -> [Wall | Wall_1010 | Wall]
Down [Wall_1111 | Wall] -> [Wall_1011 | Wall]
Down [Wall | Wall_1111] -> [Wall | Wall_1110]


Down [Wall | Wall_0101 | Wall] -> [Wall | Wall_0000 | Wall]
Down [Wall_0101 | Wall] -> [Wall_0001 | Wall]
Down [Wall | Wall_0101] -> [Wall | Wall_0100]


Down [Wall | Wall_1101 | Wall] -> [Wall | Wall_1000 | Wall]
Down [Wall_1101 | Wall] -> [Wall_1001 | Wall]
Down [Wall | Wall_1101] -> [Wall | Wall_1100]


Down [Wall | Wall_0111 | Wall] -> [Wall | Wall_0010 | Wall]
Down [Wall_0111 | Wall] -> [Wall_0011 | Wall]
Down [Wall | Wall_0111] -> [Wall | Wall_0110]


(animate water)
[Water5]->[Water6]
[Water4]->[Water5]
[Water3]->[Water4]
[Water2]->[Water3]
[Water1]->[Water2]

[Water6]->[Water1]


(game logic)

[ LEFT  PlayerStill ] -> [ PlayerL ]
LEFT [ PlayerL | Crate ] -> [ PlayerL | LEFT Crate ] again
LEFT [ > Crate | Crate ] -> [ > Crate | > Crate ] again
LEFT [ > Crate | Water ] -> [ | FilledWater]
LEFT [ > Crate | Obstacle ] -> [StillCrate | Obstacle]
LEFT [ PlayerL | Obstacle ] -> [ PlayerStill | Obstacle ]
[ PlayerL ] -> [ LEFT PlayerL ] again

[ RIGHT  PlayerStill ] -> [ PlayerR ]
RIGHT [ PlayerR | Crate ] -> [ PlayerR | RIGHT Crate ] again
RIGHT [ > Crate | Crate ] -> [ > Crate | > Crate ] again
RIGHT [ > Crate | Water ] -> [ | FilledWater]
RIGHT[ > Crate | Obstacle ] -> [StillCrate | Obstacle]
RIGHT [ PlayerR | Obstacle ] -> [ PlayerStill | Obstacle ]
[ PlayerR ] -> [ RIGHT PlayerR ] again

[ UP  PlayerStill ] -> [ PlayerU ]
UP [ PlayerU | Crate ] -> [ PlayerU | UP Crate ] again
UP [ > Crate | Crate ] -> [ > Crate | > Crate ] again
UP [ > Crate | Water ] -> [ | FilledWater]
UP [ > Crate | Obstacle ] -> [StillCrate | Obstacle]
UP [ PlayerU | Obstacle ] -> [ PlayerStill | Obstacle ]
[ PlayerU ] -> [ UP PlayerU ] again

[ DOWN  PlayerStill ] -> [ PlayerD ]
DOWN [ PlayerD | Crate ] -> [ PlayerD | DOWN Crate ] again
DOWN [ > Crate | Crate ] -> [ > Crate | > Crate ] again
DOWN [ > Crate | Water ] -> [ | FilledWater]
DOWN [ > Crate | Obstacle ] -> [StillCrate | Obstacle]
DOWN [ PlayerD | Obstacle ] -> [ PlayerStill | Obstacle ]
[ PlayerD ] -> [ DOWN PlayerD ] again

[StillCrate]->[Crate]


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

Some PlayerStill on Goal

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



message Level 1: Get to the Goal

#######
#g.#..#
#.....#
#.....#
#.#.p.#
###...#
#######

message Level 2: You must land ON the goal

#########
#########
#...g...#
#.......#
#....#p.#
#.......#
#....#..#
##....#.#
#########

message Level 3: Push Crates

#########
####.####
#.......#
#..#...g#
##......#
#...*.###
#.....###
###....p#
..##....#
...######


message Level 4: Fill the Water Hole

###########
#.........#
####......#
#g..W..p..#
####...#..#
#..#***.#.#
#..#......#
#........##
##...##..##
###########

message Level 5

#############
#......#....#
#...........#
#........p..#
##....w.....#
#..**wgw....#
#.....w....##
#.....*.....#
#.....*.....#
#...........#
#....#......#
#############

message Level 6

##############.
#...###......#.
#.#...#....####
#.#...w..**...#
#.....#.......#
#####w#......##
.##..........#.
.##..........#.
###.*........#.
.###.g....p..#.
.#.##........#.
##..##.......#.
.#############.

message You are win congratulations
