(
level ideas
push battery horizontally
have to assemble and then disassemble a circuit, in order to complete it
add a piece to a circut, then break the circuit from another point
level that starts with a closed circuit
level with very dangerous + block
)
title LED Challenge
author Stephen Lavelle
homepage www.increpare.com

run_rules_on_level_start
color_palette famicom


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

Background .
darkgreen green
00000
00000
00100
00000
00000


Player
Black brown grey Blue
.111.
.111.
22222
13331
.3.3.


Player_Dead
darkgrey darkgrey darkgrey darkgrey
.111.
.111.
22222
.333.
.3.3.

Wall #
black

Red_Off R
black DarkRed
.....
..1..
.101.
.101.
.101.

Red_On T
pink red
.....
..1..
.101.
.101.
.101.


Green_Off G
black Green
.....
..1..
.101.
.101.
.101.

Green_On H
Green LightGreen
.....
..1..
.101.
.101.
.101.


Blue_Off B
black DarkBlue
.....
..1..
.101.
.101.
.101.

Blue_On N
Blue LightBlue
.....
..1..
.101.
.101.
.101.

Battery_H C
Grey lightgrey
.000.
.010.
01110
.010.
.000.

Battery_V O
Grey lightgrey
..0..
00100
01110
00100
..0..


cable_h q
grey
.....
.....
00000
.....
.....

cable_v e
grey
..0..
..0..
..0..
..0..
..0..

cable_ul w
grey
..0..
..0..
000..
.....
.....

cable_ur d
grey
..0..
..0..
..000
.....
.....

cable_dr s
grey
.....
.....
..000
..0..
..0..

cable_dl a
grey
.....
.....
000..
..0..
..0..


cable_omni z
grey
..0..
..0..
00000
..0..
..0..

cable_dlr i
grey
.....
.....
00000
..0..
..0..

cable_ulr k
grey
..0..
..0..
00000
.....
.....

cable_udr j
grey
..0..
..0..
..000
..0..
..0..

cable_udl l
grey
..0..
..0..
000..
..0..
..0..


light
black

light_up
yellow
.000.
.000.
.000.
.....
.....

light_down
yellow
.....
.....
.000.
.000.
.000.

light_Left
yellow
.....
000..
000..
000..
.....

light_right
yellow
.....
..000
..000
..000
.....

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

P = Player
Unlit = Blue_Off or Green_Off or Red_Off
Lit = Blue_On or Green_On or Red_On
Cable = Cable_h or Cable_v or Cable_dr or Cable_dl or Cable_ul or Cable_ur or Cable_UL or Cable_UR or Cable_UDR or Cable_ULR or Cable_UDL or Cable_DLR or Cable_Omni
Battery = Battery_H or Battery_V
Item = Unlit or Lit or Battery or Cable
Cable_Up = Cable_V or Cable_UL or Cable_UR or Battery_V or Cable_UDR or Cable_ULR or Cable_UDL or Cable_Omni or  Player
Cable_Down = Cable_V or Cable_DL or Cable_DR or Battery_V or Cable_UDR or Cable_UDL or Cable_DLR or Cable_Omni or Player
Cable_Left = Cable_H or Cable_UL or Cable_DL or Battery_H  or Cable_ULR or Cable_UDL or Cable_DLR or Cable_Omni or Player
Cable_Right = Cable_H or Cable_UR or Cable_DR or Battery_H or Cable_UDR or Cable_ULR or Cable_DLR or Cable_Omni or Player
LightEffect = Light_Up or Light_Down or Light_Left or Light_Right
Object = Player or Item
Player_Dying = Player and Light

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

EndLevel 39731502
EndGame 20540505
Player Move 6330907
Player_Dead Create 44233902

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

Background
Light
Light_Up
Light_Down
Light_Left
Light_Right
Player, Player_Dead, Wall, Item

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

(init stage)
[ Light ] -> [ ]
[ LightEffect no Player] -> [ ]
[ Red_On ] -> [ Red_Off ]
[ Green_On ] -> [ Green_Off ]
[ Blue_On ] -> [ Blue_Off ]

(movement)
[ >  Object | Object ] -> [  > Object | > Object ]

(do circuits)
startLoop
late [ Battery ] -> [ Light Battery ]

late left [ Player | Light_Right ] -> [ Light Player | Light_Right ]
late right [ Player | Light_Left ] -> [ Light Player | Light_Left ]
late up [ Player | Light_Down ] -> [ Light Player | Light_Down ]
late down [ Player | Light_Up ] -> [ Light Player | Light_Up ]

late up [ Player_Dead | Light_Down ] -> [ Light Player_Dead | Light_Down  ]
late down [ Player_Dead | Light_up ] -> [ Light Player_Dead | Light_up  ]

late left [ Cable_Left | Light_Right ] -> [ Light Cable_Left | Light_Right ]
late right [ Cable_Right | Light_Left ] -> [ Light Cable_Right | Light_Left ]
late up [ Cable_Up | Light_Down ] -> [ Light Cable_Up | Light_Down ]
late down [ Cable_Down | Light_Up ] -> [ Light Cable_Down | Light_Up ]

late down [ Red_Off | Light_Up ] -> [ Red_On | Light_Up ]
late down [ Green_Off | Light_Up ] -> [ Green_On | Light_Up ]
late down [ Blue_Off | Light_Up ] -> [ Blue_On | Light_Up ]

late [ Light Cable_Up ] -> [ Light Light_Up Cable_Up ]
late [ Light Cable_Down ] -> [ Light Light_Down Cable_Down ]
late [ Light Cable_Left ] -> [ Light Light_Left Cable_Left ]
late [ Light Cable_Right ] -> [ Light Light_Right Cable_Right ]
endLoop

late [ Player Light ] -> again
late [ Player_Dead Light ] -> again
late [ Player LightEffect ] -> [ Player_Dead LightEffect ]   again
late [ Player_Dead Light ] -> [ Player_Dead ]

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

No Unlit
No Player_Dead

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

message Level 1 of 4

......
.r.g..
..o.p.
.w.d..
......

message Level 2 of 4

.....##.....
.....##.w.d.
..c.........
...p....r.g.
.....##.....

message Level 3 of 4

.......
..rgb..
..wkd..
...o...
.....p.
.......

message Level 4 of 4

...........
...ccccc...
.d.crcgc.w.
...ccccc...
..........p

(
message Level 5 of 3

.......
.bgrgb.
rdzczwr
dqw.dqw
.......
)

message Congratulations