title Drop Swap
author Aaron Steed
homepage www.robotacid.com

key_repeat_interval 0.23
again_interval 0.05
noaction
noundo
background_color Black
text_color Grey
run_rules_on_level_start

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

Background
Black

Player
#ffffff #000000 #626263 #3c3b3c 
.222.
21112
23132
20102
.222.

DeadPlayer
#ffffff #000000 #626263 #3c3b3c 
.222.
21112
21112
23132
.222.

BaseWall
#222222 #333333 #444444 #ffffff 
11110
12220
12200
12000
00000

APill
#ff0000 #ff7374 #ff0000 #ff0000 
.111.
11110
11010
11100
.000.

BPill
#00de00 #cffa92 #ff0000 #ff0000 
.111.
10010
10110
11100
.000.

CPill
#7a35fc #b56bfd #ff0000 #ff0000 
.111.
10110
11010
11100
.000.

DPill
#0094fc #79b5fd #ff0000 #ff0000 
.111.
10100
11010
10100
.000.

EPill
#d1c200 #fff919 #ffffff #ff0000 
.111.
10010
10010
11110
.000.

FPill
#ff33b1 #ff76d2 #ff0000 #ff0000 
.111.
10100
11110
10110
.000.

AllPill
#eeee66 #ffffff #ffffcc #ffffff
.112.
11112
11012
21120
.220.

NoPill
#ffffff #000000 #ffde85 #ff0000 
.000.
00000
21012
.000.
..2..

Bomb
#6e6e6e #000000 #ff0000 #fcf26b 
.020.
02320
01210
01110
.000.

GemPill
#ffffff #000000 #626263 #3c3b3c 
..0..
.002.
00022
.223.
..2..

Count
#ffffff #000000 #5a595a #ff0000 
.....
.000.
.000.
.000.
.....

Marked
#ffffff #000000
.....
..1..
.101.
..1..
.....

CountTray
#333333

GemTray
#333333

StartGem
red

Collect
White

Debris1
#ffffff #0739f5 #1f0f42 #ffffff
.0.0.
00.00
..0..
00.00
.0.0.

Debris2
#ffffff #0739f5 #1f0f42 #ffffff 
.....
.0.0.
..0..
.0.0.
.....

Empty
Black

OldPos
Black

StartCount
Black

DropWall1
#222222 #333333 #444444 #ffffff
11110
12220
12200
12200
12200

DropWall2
#222222 #333333 #444444 #ffffff 
11110
12220
12200
12200
12200

DropWall3
#222222 #333333 #444444 #ffffff 
11110
12220
12200
12200
12200

DropWall4
#222222 #333333 #444444 #ffffff 
11110
12220
12200
12200
12200

DropMarker
Blue

Init
Purple

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

. = Background
@ = Player
p = DeadPlayer
# = BaseWall
a = APill
b = BPill
c = CPill
d = DPill
e = EPill
f = FPill
n = NoPill
x = AllPill
u = Count and CountTray
w = Count and CountTray and StartCount
g = GemPill
q = GemTray
o = GemTray and StartGem
i = Init
j = DropWall1
k = DropWall2
l = DropWall3
m = DropWall4


MatchPill = APill or BPill or CPill or DPill or EPill or FPill or AllPill
Pill = MatchPill or NoPill or GemPill or Bomb
Debris = Debris1 or Debris2
AMatch = APill or AllPill
BMatch = BPill or AllPill
CMatch = CPill or AllPill
DMatch = DPill or AllPill
EMatch = EPill or AllPill
FMatch = FPill or AllPill
Wall = BaseWall or DropWall1 or DropWall2 or DropWall3 or DropWall4
Item = Pill or Debris or Wall or Player
Heavy = Pill or Player
Dropping = Marked or DropMarker
DropMix1 = APill or BPill or CPill or DPill or EPill
DropMix2 = APill or BPill or CPill or DPill or EPill or GemPill
DropMix3 = APill or BPill or CPill or DPill or EPill or NoPill
DropMix4 = APill or BPill or CPill or DPill or EPill or FPill or GemPill
DropMix5 = APill or BPill or CPill or DPill or EPill or FPill
DropWallMarked = DropWall1 or DropWall3

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

sfx0 54236904 (illegal)
sfx1 5160507 (swap)
sfx2 19008103 (allpill)
sfx3 50665503 (crush 3)
sfx4 80820507 (land)
sfx5 2030908 (blast)
sfx6 3032303 (bomb)
sfx7 83704102 (dead)
sfx8 7194508 (gem collect)
EndLevel 16709508 (win)

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


Collect, StartCount, StartGem
Background
OldPos, CountTray, GemTray
Player, Wall, Pill, Empty, Count, DeadPlayer, Bomb, Init
Debris, Marked, DropMarker

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

(init)
[ DropWall1 ] [ Init ] -> [ DropWall1 ] [ random DropMix1 Marked ]
[ DropWall2 ] [ Init ] -> [ DropWall2 ] [ random DropMix1 ]
[ DropWall3 ] [ Init ] -> [ DropWall3 ] [ random DropMix1 Marked ]
[ DropWall4 ] [ Init ] -> [ DropWall4 ] [ random DropMix5 ]

(debris clean up)
[ Debris2 ] -> [ Empty ] again
[ Debris1 ] -> [ Debris2 ] again

(player - pill swapping)
[ > Player | Pill ] -> [ Pill OldPos | Player ] sfx1
[ Player Marked | OldPos ] -> [ Player | OldPos Marked ]

(blocked move)
[ > Player | No Pill ] -> [ Player | ] sfx0

(pill combos)
[ AMatch | AMatch | AMatch ] -> [ AMatch Collect | AMatch Collect | AMatch Collect ]
[ BMatch | BMatch | BMatch ] -> [ BMatch Collect | BMatch Collect | BMatch Collect ]
[ CMatch | CMatch | CMatch ] -> [ CMatch Collect | CMatch Collect | CMatch Collect ]
[ DMatch | DMatch | DMatch ] -> [ DMatch Collect | DMatch Collect | DMatch Collect ]
[ EMatch | EMatch | EMatch ] -> [ EMatch Collect | EMatch Collect | EMatch Collect ]
[ FMatch | FMatch | FMatch ] -> [ FMatch Collect | FMatch Collect | FMatch Collect ]
[ NoPill | NoPill | NoPill ] -> [ NoPill Collect | NoPill Collect | NoPill Collect ]

(bomb activate)
[ OldPos Bomb ] -> sfx5
up [ OldPos Bomb | Pill ] -> [ OldPos Bomb | Pill > Collect ]
right [ OldPos Bomb | Pill ] -> [ OldPos Bomb | Pill > Collect ]
down [ OldPos Bomb | Pill ] -> [ OldPos Bomb | Pill > Collect ]
left [ OldPos Bomb | Pill ] -> [ OldPos Bomb | Pill > Collect ]
[ OldPos Bomb ] -> [ OldPos Empty ]

(blast)
up [ Pill > Collect | Pill ] -> [ Pill Collect | Pill > Collect ]
right [ Pill > Collect | Pill ] -> [ Pill Collect | Pill > Collect ]
down [ Pill > Collect | Pill ] -> [ Pill Collect | Pill > Collect ]
left [ Pill > Collect | Pill ] -> [ Pill Collect | Pill > Collect ]
[ > Collect ] -> [ Collect ]
[ GemPill Collect ] -> [ GemPill ]

(reward matches)
(junction)
Right [ Collect | Collect ] -> [ > Collect | > Collect ]
Down [ Collect | Collect ] -> [ > Collect | > Collect ]
[ Down Collect | Right Collect ] [ Collect OldPos ] -> [ Collect | Collect ] [ Bomb OldPos ] sfx6
(4: create AllPill)
[ MatchPill Collect | MatchPill Collect | MatchPill Collect | MatchPill Collect ] [ Collect OldPos ] -> [ MatchPill Collect | MatchPill Collect | MatchPill Collect | MatchPill Collect ] [ AllPill OldPos ] sfx2

(count moves)
(subtract on move)
random right [ OldPos ] [ Count | No Count ] -> [ OldPos ] [ | ]
(fill on Debris)
[ Collect ] [ CountTray ] -> [ Collect ] [ CountTray Count ]

(dead?)
[ DeadPlayer ] -> cancel
[ No Count StartCount CountTray ] [ Player ] -> [ No Count StartCount CountTray ] [ DeadPlayer ] sfx7
[ Player | NoPill Collect ] -> [ DeadPlayer | NoPill ]
[ DeadPlayer ] [ CountTray Count ] -> [ DeadPlayer ] [ CountTray ] sfx7

(destroy matched)
[ APill Collect ] -> [ Debris1 ] sfx3 again
[ BPill Collect ] -> [ Debris1 ] sfx3 again
[ CPill Collect ] -> [ Debris1 ] sfx3 again
[ DPill Collect ] -> [ Debris1 ] sfx3 again
[ EPill Collect ] -> [ Debris1 ] sfx3 again
[ FPill Collect ] -> [ Debris1 ] sfx3 again
[ AllPill Collect ] -> [ Debris1 ] sfx3 again
[ Player ] [ NoPill Collect ] -> [ Player ] [ Debris1 ] sfx3 again

(destroy NoPills)
down [ NoPill | Wall ] -> [ Debris1 | Wall ] again

(collect gems)
down [ GemPill | Wall ] -> [ GemPill Collect | Wall ]
[ GemPill Collect ] [ StartGem No GemPill ] -> [ Debris1 ] [ StartGem GemPill ] again sfx8
right [ GemPill Collect ] [ GemPill GemTray | No GemPill GemTray ] -> [ Debris1 ] [ GemPill GemTray | GemPill GemTray ] again sfx8

(drop)
[ Heavy No Dropping ] -> [ Heavy DropMarker ]
down [ Heavy Dropping | Empty ] -> [ Empty | Heavy Dropping ]
[ DropMarker ] -> [ ]
down [ DropWall1 | Empty ] -> [ DropWall1 | random DropMix1 ] again
down [ DropWall2 | Empty ] -> [ DropWall2 | random DropMix2 ] again
down [ DropWall3 | Empty ] -> [ DropWall3 | random DropMix3 ] again
down [ DropWall4 | Empty ] -> [ DropWall4 | random DropMix4 ] again

(gem drop win)
right [ GemPill GemTray | Wall ] -> win

[ OldPos ] -> [ ]

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

No Marked
Some DropWallMarked

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

message collect orbs by matching 3
message match 3 to restore move-energy
message level 1: collect all marked orbs

wuuuuu#
#jjjjj#
#iiiii#
#iiiii#
#iiiii#
#iiiii#
#ii@ii#
#######

message level 2: collect all marked orbs

wuuuuuu#
#jjjjjj#
#iiiiii#
#iiiiii#
#iiiiii#
#iiiiii#
#iiiiii#
#iiiiii#
#iii@ii#
########

message collect gray gems by getting them to the bottom
message level 3: collect 8 gems

oqqqqqqq#
wuuuuuuu#
#kkkkkkk#
#iiiiiii#
#iiiiiii#
#iiiiiii#
#iiiiiii#
#iiiiiii#
#iiiiiii#
#iiiiiii#
#iii@iii#
#########

message if you are next to 3 matching skulls you die
message skulls can be destroyed by getting them to the bottom
message level 4: collect all marked orbs

wuuuuuu#
#llllll#
#iiiiii#
#iiiiii#
#iiiiii#
#iiiiii#
#iiiiii#
#iiiiii#
#iii@ii#
########

message level 5: collect 7 gems

oqqqqqqq#
wuuuuuuu#
#mmmmmmm#
#iiiiiii#
#iiiiiii#
#iiiiiii#
#iiiiiii#
#iiiiiii#
#iiiiiii#
#iiiiiii#
#iii@iii#
#########

message thanks for playing

