Skip to content

Instantly share code, notes, and snippets.

@mmistele mmistele/readme.txt
Created Dec 28, 2018

Embed
What would you like to do?
Basilisk Isles (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
title Basilisk Isles
author Matt Mistele
homepage www.puzzlescript.net
(Credit to Alan Hazelden for the reflecting-across-mirrors code [modified for direction-facingness] and Trevor Newton for snake movement)
(realtime_interval 0.5)
========
OBJECTS
========
Background
(#f2edbb)
#333333
Hole
red yellow
00000
01000
00000
00010
00000
Goal
Brown Yellow
.000.
00000
00010
00000
00000
Target
DarkBlue
.000.
0...0
0.0.0
0...0
.000.
Wall
black gray green
00000
00000
00000
00000
00000
RPlayer
black #22ffff
.111.
11101
11111
11101
.111.
UPlayer
black #22ffff
.111.
10101
11111
11111
.111.
LPlayer
black #22ffff
.111.
10111
11111
10111
.111.
DPlayer
black #22ffff
.111.
11111
11111
10101
.111.
RPlayerPetrified
#666666 gray
.111.
11101
11111
11101
.111.
UPlayerPetrified
#666666 gray
.111.
10101
11111
11111
.111.
LPlayerPetrified
#666666 gray
.111.
10111
11111
10111
.111.
DPlayerPetrified
#666666 gray
.111.
11111
11111
10101
.111.
RPlayerReflection
gray #aaeeff
.111.
11101
11111
11101
.111.
UPlayerReflection
gray #aaeeff
.111.
10101
11111
11111
.111.
LPlayerReflection
gray #aaeeff
.111.
10111
11111
10111
.111.
DPlayerReflection
gray #aaeeff
.111.
11111
11111
10101
.111.
RPlayerPetrifiedReflection
#cccccc white
.111.
11101
11111
11101
.111.
UPlayerPetrifiedReflection
#cccccc white
.111.
10101
11111
11111
.111.
LPlayerPetrifiedReflection
#cccccc white
.111.
10111
11111
10111
.111.
DPlayerPetrifiedReflection
#cccccc white
.111.
11111
11111
10101
.111.
Corpse
red blue gray
.....
.002.
02100
.000.
.....
(Corpse
red blue gray black
.....
.111.
11111
03130
.000.)
RSnakeHead
#f4de08 green
.1111
1101.
111..
1111.
.1111
USnakeHead
#f4de08 green
11.11
10101
11111
11111
.111.
LSnakeHead
#f4de08 green white
1111.
.1011
.1111
.1011
1111.
DSnakeHead
#f4de08 green
.111.
11111
11111
10101
11.11
RSnakeHeadGlare
red green
.1111
1101.
111..
1111.
.1111
USnakeHeadGlare
red green
11.11
10101
11111
11111
.111.
LSnakeHeadGlare
yellow green white
1111.
.1011
.1111
.1011
1111.
DSnakeHeadGlare
red green
.111.
11111
11111
10101
11.11
BodyHorizontal
Green LightGreen
.....
00100
00100
00100
.....
BodyVertical
Green LightGreen
.000.
.000.
.111.
.000.
.000.
(BodyBend_1
Green LightGreen
.....
..000
.0111
.0100
.010.)
BodyBend_1
Green LightGreen
.....
..000
.0100
.0010
.000.
BodyBend_2
Green LightGreen
.....
000..
0010.
0100.
.000.
BodyBend_3
Green LightGreen
.000.
.0010
.0100
..000
.....
BodyBend_4
Green LightGreen
.000.
0100.
0010.
000..
.....
Tail_1
Green LightGreen
.....
000..
0000.
000..
.....
Tail_2
Green LightGreen
.....
..000
.0000
..000
.....
Tail_3
Green LightGreen
.000.
.000.
.000.
..0..
.....
Tail_4
Green LightGreen
.....
..0..
.000.
.000.
.000.
TowardsUp
RED
..0..
.000.
0.0.0
..0..
..0..
TowardsLeft
RED
..0..
.0...
00000
.0...
..0..
TowardsRight
RED
..0..
...0.
00000
...0.
..0..
TowardsDown
RED
..0..
..0..
0.0.0
.000.
..0..
(From Mirror Isles)
MirrorUL
#909090 #4e5159 #4e5159
....0
...01
..011
.0111
01112
MirrorUR
#909090 #4e5159 #4e5159
0....
10...
110..
1110.
21110
MirrorDL
#909090 #4e5159 #4e5159
01112
.0111
..011
...01
....0
MirrorDR
#909090 #4e5159 #4e5159
21110
1110.
110..
10...
0....
LOS
Orange
.....
.....
..0..
.....
.....
c00
transparent
c01
transparent
c02
transparent
c03
transparent
c04
transparent
c05
transparent
c06
transparent
c07
transparent
c08
transparent
c09
transparent
ImageWillFaceLeft
transparent
ImageWillFaceUp
transparent
ImageWillFaceRight
transparent
ImageWillFaceDown
transparent
HasReflection
transparent
West
transparent
East
transparent
North
transparent
South
transparent
NormalCrate
Orange
CrateInHole
Brown
PetrifiedInHole
#505080 red black
10001
00000
00000
00000
10001
ReflectableCrate
Orange Yellow
00000
01110
01010
01110
00000
CrateReflection
#cccccc #ffffff
00000
01110
01010
01110
00000
Darkness
black
Light
Yellow
LSnakeGaze
Red
.....
00000
.....
00000
.....
RSnakeGaze
Red
.....
00000
.....
00000
.....
USnakeGaze
Red
.0.0.
.0.0.
.0.0.
.0.0.
.0.0.
DSnakeGaze
Red
.0.0.
.0.0.
.0.0.
.0.0.
.0.0.
IndirectMarker
gray
....0
.....
.....
.....
.....
CantMove
red
0...0
.0.0.
..0..
.0.0.
0...0
AlreadyRotatedMarker
transparent
GazeCanPass
transparent
PlayerStillAlive
transparent
=======
LEGEND
=======
. = Background
# = Wall
P = RPlayer
* = NormalCrate
@ = NormalCrate and Target
O = Target
G = Goal
9 = LSnakeHead and TowardsLeft
4 = RSnakeHead and TowardsRight
7 = USnakeHead and TowardsUp
3 = DSnakeHead and TowardsDown
< = BodyHorizontal and TowardsLeft
> = BodyHorizontal and TowardsRight
^ = BodyVertical and TowardsUp
v = BodyVertical and TowardsDown
(L = Tail and TowardsLeft
R = Tail and TowardsRight)
U = Tail_3 and TowardsUp
C = Tail_2 and TowardsRight
D = Tail_1 and TowardsLeft
n = Tail_4 and TowardsDown
/ = MirrorUL
\ = MirrorUR
` = MirrorDL
' = MirrorDR
_ = Hole
SnakeTail = Tail_1 or Tail_2 or Tail_3 or Tail_4
SnakeBodyBends = BodyBend_1 or BodyBend_2 or BodyBend_3 or BodyBend_4
SnakeBodyPart = BodyHorizontal or BodyVertical or BodyBend_1 or BodyBend_2 or BodyBend_3 or BodyBend_4
SnakeHead = USnakeHead or RSnakeHead or LSnakeHead or DSnakeHead or USnakeHeadGlare or RSnakeHeadGlare or LSnakeHeadGlare or DSnakeHeadGlare
SnakePart = SnakeHead or SnakeBodyPart or SnakeTail
Marker = TowardsLeft or TowardsRight or TowardsUp or TowardsDown or AlreadyRotatedMarker or IndirectMarker (Todo: split up?)
Mirror = MirrorUL or MirrorUR or MirrorDL or MirrorDR
Crate = NormalCrate or ReflectableCrate
StoneReflection = DPlayerPetrifiedReflection or RPlayerPetrifiedReflection or UPlayerPetrifiedReflection or LPlayerPetrifiedReflection
PetrifiedPlayer = DPlayerPetrified or UPlayerPetrified or LPlayerPetrified or RPlayerPetrified
ImageDirectionMarker = ImageWillFaceLeft or ImageWillFaceUp or ImageWillFaceRight or ImageWillFaceDown
Player = LPlayer or RPlayer or DPlayer or UPlayer
Gaze = LSnakeGaze or RSnakeGaze or USnakeGaze or DSnakeGaze
Obstacle = Crate or Wall
Solid = Player or Wall or Crate or Mirror or SnakePart or PetrifiedPlayer
Pullable = Mirror or Crate or PetrifiedPlayer
Pushable = Pullable or PetrifiedPlayer
Reflectable = Player or ReflectableCrate or PetrifiedPlayer
LightBlocker = Solid (Crate or Wall or Mirror)
Reflection = RPlayerReflection or LPlayerReflection or UPlayerReflection or DPlayerReflection
Counter = c00 or c01 or c02 or c03 or c04 or c05 or c06 or c07 or c08 or c09
DirectionCounter = North or South or East or West
=======
SOUNDS
=======
sfx0 14980502 (13841708) (death by glare)
sfx1 86637902 (petrification)
sfx5 31662307 (pushing)
================
COLLISIONLAYERS
================
PlayerStillAlive
Marker (TODO: rename or consolidate)
ImageDirectionMarker
Background
Target, Goal, Hole, CrateInHole, PetrifiedInHole
HasReflection
Corpse
Solid, LOS
Counter
DirectionCounter
Darkness, Light, Gaze
GazeCanPass
Reflection, CrateReflection, StoneReflection
CantMove
======
RULES
======
(TODO: cancel action (or at least, Snake's movement) if nothing to reflect)
[PlayerStillAlive] -> []
[Goal][Player] -> [Goal PlayerStillAlive][Player]
[Goal no PlayerStillAlive] -> restart
[CantMove] -> []
([Corpse] -> restart)
(Snake lured to where character currently is)
[Stationary SnakeHead|...|Player] -> [> SnakeHead | ... | Player]
[> SnakeHead | SnakePart] -> [SnakeHead | SnakePart]
[ right SnakeHead ] -> [ right RSnakeHead]
[ up SnakeHead ] -> [ up USnakeHead]
[ left SnakeHead ] -> [ left LSnakeHead]
[ down SnakeHead ] -> [ down DSnakeHead]
(Prevent teleport)
[ action Player ] [ Reflection Hole ] -> [ action Player ] [ CantMove Hole ]
[ CantMove ] [ action Player ] -> [ CantMove ] [ Player ] again
(Swap places)
([ action Player HasReflection ] [ Reflection ] -> [ action Player HasReflection ] [ Reflection Player ])
(16 combos? yikes...)
[ action RPlayer HasReflection ] [ RPlayerReflection ] -> [ action RPlayer HasReflection ] [ RPlayerReflection RPlayer ]
[ action RPlayer HasReflection ] [ DPlayerReflection ] -> [ action RPlayer HasReflection ] [ DPlayerReflection DPlayer ]
[ action RPlayer HasReflection ] [ UPlayerReflection ] -> [ action RPlayer HasReflection ] [ uPlayerReflection UPlayer ]
[ action RPlayer HasReflection ] [ LPlayerReflection ] -> [ action RPlayer HasReflection ] [ LPlayerReflection LPlayer ]
[ action LPlayer HasReflection ] [ RPlayerReflection ] -> [ action LPlayer HasReflection ] [ RPlayerReflection RPlayer ]
[ action LPlayer HasReflection ] [ DPlayerReflection ] -> [ action LPlayer HasReflection ] [ DPlayerReflection DPlayer ]
[ action LPlayer HasReflection ] [ UPlayerReflection ] -> [ action LPlayer HasReflection ] [ UPlayerReflection UPlayer ]
[ action LPlayer HasReflection ] [ LPlayerReflection ] -> [ action LPlayer HasReflection ] [ LPlayerReflection LPlayer ]
[ action UPlayer HasReflection ] [ RPlayerReflection ] -> [ action UPlayer HasReflection ] [ RPlayerReflection RPlayer ]
[ action UPlayer HasReflection ] [ DPlayerReflection ] -> [ action UPlayer HasReflection ] [ DPlayerReflection DPlayer ]
[ action UPlayer HasReflection ] [ UPlayerReflection ] -> [ action UPlayer HasReflection ] [ uPlayerReflection UPlayer ]
[ action UPlayer HasReflection ] [ LPlayerReflection ] -> [ action UPlayer HasReflection ] [ LPlayerReflection LPlayer ]
[ action DPlayer HasReflection ] [ RPlayerReflection ] -> [ action DPlayer HasReflection ] [ RPlayerReflection RPlayer ]
[ action DPlayer HasReflection ] [ DPlayerReflection ] -> [ action DPlayer HasReflection ] [ DPlayerReflection DPlayer ]
[ action DPlayer HasReflection ] [ UPlayerReflection ] -> [ action DPlayer HasReflection ] [ uPlayerReflection UPlayer ]
[ action DPlayer HasReflection ] [ LPlayerReflection ] -> [ action DPlayer HasReflection ] [ LPlayerReflection LPlayer ]
[ Reflection Player ] -> [ Player ] sfx2
[ action Player ] [ CrateReflection ] -> [ action Player ] [ ReflectableCrate ] sfx2
[ action Player ] [ ReflectableCrate HasReflection ] -> [ action Player ] []
[ action Player ] [ DPlayerPetrifiedReflection ] -> [ action Player ] [ DPlayerPetrified ] sfx2
[ action Player ] [ LPlayerPetrifiedReflection ] -> [ action Player ] [ LPlayerPetrified ] sfx2
[ action Player ] [ RPlayerPetrifiedReflection ] -> [ action Player ] [ RPlayerPetrified ] sfx2
[ action Player ] [ UPlayerPetrifiedReflection ] -> [ action Player ] [ UPlayerPetrified ] sfx2
[ action Player ] [ PetrifiedPlayer HasReflection ] -> [ action Player ] []
[ action Player HasReflection ] -> [ ] (TODO: put proper reflection here)
(Clear state)
[ LOS ] -> []
[ HasReflection ] -> []
[ Reflection ] -> []
[ CrateReflection ] -> []
[ StoneReflection ] -> []
[ action Player ] -> [ Player ]
[ moving Player ] -> [ moving Player HasReflection ] (testing killing)
(Player movement & pulling)
[ right Player ] -> [ right RPlayer]
[ up Player ] -> [ up UPlayer]
[ left Player ] -> [ left LPlayer]
[ down Player ] -> [ down DPlayer]
[ Pullable | > Player | ] -> [ > Pullable | > Player | ] (sfx1)
(no Hole no Solid)
([ > Player | Crate | > Player ] -> [ > Player | > Crate | > Player ] (sfx1)
[ > Player | Mirror | > Player ] -> [ > Player | > Mirror | > Player ] (sfx1))
[> Player | Hole ] -> [ Player | Hole ] (sfx4)
[ > Player | no Solid ] -> [ | Player ]
+ [ > Pullable | no Solid] -> [ | Pullable]
[ > Player ] -> [ Player ] (sfx4)
[ Player Hole ] -> [ Hole ]
[ Mirror Hole ] -> cancel
[ NormalCrate Hole ] -> [ CrateInHole ] sfx3
[ ReflectableCrate Hole ] -> [ CrateInHole ] sfx3
[ PetrifiedPlayer Hole ] -> [ PetrifiedInHole ] sfx3
[ Player ] [ HasReflection ] -> [ Player ] []
[ HasReflection ] -> cancel (all players dead)
(Snake movement)
[> SnakeHead | Pushable ] -> [> SnakeHead | > Pushable]
([> SnakeHead | > Pushable | Pushable] -> [> SnakeHead | > Pushable | > Pushable])
left [ > SnakeHead Marker | No Obstacle | ] -> [ > SnakeHead TowardsLeft | TowardsLeft | SFX5]
left [ > SnakeHead Marker | Pushable | No Obstacle ] -> [ > SnakeHead TowardsLeft | TowardsLeft > Pushable | SFX5]
right [ > SnakeHead Marker | No Obstacle | ] -> [ > SnakeHead TowardsRight | TowardsRight | SFX5]
right [ > SnakeHead Marker | Pushable | No Obstacle ] -> [ > SnakeHead TowardsRight | TowardsRight > Pushable | SFX5]
up [ > SnakeHead Marker | No Obstacle | ] -> [ > SnakeHead TowardsUp | TowardsUp | SFX5]
up [ > SnakeHead Marker | Pushable | No Obstacle ] -> [ > SnakeHead TowardsUp | TowardsUp > Pushable | SFX5]
down [ > SnakeHead Marker | No Obstacle | ] -> [ > SnakeHead TowardsDown | TowardsDown | SFX5]
down [ > SnakeHead Marker | Pushable | No Obstacle ] -> [ > SnakeHead TowardsDown | TowardsDown > Pushable | SFX5]
(Todo: move this to snake part)
[ > Mirror | Hole ] -> [ Mirror | Hole ] (sfx4)
[ > Pushable | no Solid ] -> [ | Pushable ]
+ [ > SnakePart | no Solid ] -> [ | SnakePart] (sfx0)
(May need to make all the late things not-late anymore, so 'tail that was just there' doesn't block reflections)
startloop
left [ SnakeBodyPart TowardsLeft | No SnakePart TowardsLeft ] -> [ TowardsLeft | BodyHorizontal TowardsLeft]
left [ SnakeBodyPart TowardsLeft | No SnakePart TowardsUp ] -> [ TowardsLeft | BodyBend_3 TowardsUp]
left [ SnakeBodyPart TowardsLeft | No SnakePart TowardsDown ] -> [ TowardsLeft | BodyBend_1 TowardsDown]
right [ SnakeBodyPart TowardsRight | No SnakePart TowardsRight] -> [ TowardsRight | BodyHorizontal TowardsRight]
right [ SnakeBodyPart TowardsRight | No SnakePart TowardsUp] -> [ TowardsRight | BodyBend_4 TowardsUp]
right [ SnakeBodyPart TowardsRight | No SnakePart TowardsDown] -> [ TowardsRight | BodyBend_2 TowardsDown ]
up [ SnakeBodyPart TowardsUp | No SnakePart TowardsUp] -> [ TowardsUp | BodyVertical TowardsUp]
up [ SnakeBodyPart TowardsUp | No SnakePart TowardsLeft] -> [ TowardsUp | BodyBend_2 TowardsLeft]
up [ SnakeBodyPart TowardsUp | No SnakePart TowardsRight] -> [ TowardsUp | BodyBend_1 TowardsRight]
down [ SnakeBodyPart TowardsDown | No SnakePart TowardsDown] -> [ TowardsDown | BodyVertical TowardsDown]
down [ SnakeBodyPart TowardsDown | No SnakePart TowardsLeft] -> [ TowardsDown | BodyBend_4 TowardsLeft]
down [ SnakeBodyPart TowardsDown | No SnakePart TowardsRight] -> [ TowardsDown | BodyBend_3 TowardsRight]
endloop
left [ SnakeTail TowardsLeft | No SnakePart ] -> [ | Tail_1 ]
right [ SnakeTail TowardsRight | No SnakePart ] -> [ | Tail_2 ]
up [ SnakeTail TowardsUp | No SnakePart ] -> [ | Tail_3 ]
down [ SnakeTail TowardsDown | No SnakePart ] -> [ | Tail_4 ]
[SnakeTail TowardsRight] -> [Tail_2 TowardsRight]
[SnakeTail TowardsDown] -> [Tail_4 TowardsDown]
[SnakeTail TowardsUp] -> [Tail_3 TowardsUp]
[SnakeTail TowardsLeft] -> [Tail_1 TowardsLeft]
([LSnakeHead] -> [left LSnakeHead]
[RSnakeHead] -> [right RSnakeHead]
[USnakeHead] -> [up USnakeHead]
[DSnakeHead] -> [down DSnakeHead])
[LSnakeHead] -> [LSnakeHead GazeCanPass LSnakeGaze]
[USnakeHead] -> [USnakeHead GazeCanPass USnakeGaze]
[RSnakeHead] -> [RSnakeHead GazeCanPass RSnakeGaze]
[DSnakeHead] -> [DSnakeHead GazeCanPass DSnakeGaze]
[no LightBlocker] -> [GazeCanPass]
(Propagating gaze forward)
(late left [LSnakeGaze no LightBlocker | no LSnakeGaze no Mirror] -> [LSnakeGaze | LSnakeGaze]
+ late up [USnakeGaze no LightBlocker | no USnakeGaze no Mirror] -> [USnakeGaze | USnakeGaze]
+ late right [RSnakeGaze no LightBlocker| no RSnakeGaze no Mirror] -> [RSnakeGaze | RSnakeGaze]
+ late down [DSnakeGaze no LightBlocker | no DSnakeGaze no Mirror] -> [DSnakeGaze | DSnakeGaze])
startloop
left [LSnakeGaze GazeCanPass | no LSnakeGaze no Mirror] -> [LSnakeGaze GazeCanPass | LSnakeGaze]
up [USnakeGaze GazeCanPass | no USnakeGaze no Mirror] -> [USnakeGaze GazeCanPass | USnakeGaze]
right [RSnakeGaze GazeCanPass| no RSnakeGaze no Mirror] -> [RSnakeGaze GazeCanPass | RSnakeGaze]
down [DSnakeGaze GazeCanPass | no DSnakeGaze no Mirror] -> [DSnakeGaze GazeCanPass | DSnakeGaze]
left [LSnakeGaze IndirectMarker | LSnakeGaze no IndirectMarker] -> [LSnakeGaze IndirectMarker | LSnakeGaze IndirectMarker]
up [USnakeGaze IndirectMarker | USnakeGaze no IndirectMarker] -> [USnakeGaze IndirectMarker | USnakeGaze IndirectMarker]
down [DSnakeGaze IndirectMarker | DSnakeGaze no IndirectMarker] -> [DSnakeGaze IndirectMarker | DSnakeGaze IndirectMarker]
right [RSnakeGaze IndirectMarker | RSnakeGaze no IndirectMarker] -> [RSnakeGaze IndirectMarker | RSnakeGaze IndirectMarker]
(Split into the 4 gaze cases to ensure it doesn't go back toward the source.)
(Reflecting gaze)
left [LSnakeGaze GazeCanPass | MirrorUR] -> [LSnakeGaze GazeCanPass | MirrorUR USnakeGaze GazeCanPass IndirectMarker]
down [DSnakeGaze GazeCanPass | MirrorUR] -> [DSnakeGaze GazeCanPass | MirrorUR RSnakeGaze GazeCanPass IndirectMarker]
left [LSnakeGaze GazeCanPass | MirrorDR] -> [LSnakeGaze GazeCanPass | MirrorDR DSnakeGaze GazeCanPass IndirectMarker]
up [USnakeGaze GazeCanPass | MirrorDR] -> [USnakeGaze GazeCanPass | MirrorDR RSnakeGaze GazeCanPass IndirectMarker]
right [RSnakeGaze GazeCanPass | MirrorUL] -> [RSnakeGaze GazeCanPass | MirrorUL USnakeGaze GazeCanPass IndirectMarker]
down [DSnakeGaze GazeCanPass | MirrorUL] -> [DSnakeGaze GazeCanPass | MirrorUL LSnakeGaze GazeCanPass IndirectMarker]
right [RSnakeGaze GazeCanPass | MirrorDL] -> [RSnakeGaze GazeCanPass | MirrorDL DSnakeGaze GazeCanPass IndirectMarker]
up [USnakeGaze GazeCanPass | MirrorDL] -> [USnakeGaze GazeCanPass | MirrorDL LSnakeGaze GazeCanPass IndirectMarker]
endloop
[LSnakeGaze RPlayer no IndirectMarker] -> [Corpse sfx0]
[RSnakeGaze LPlayer no IndirectMarker] -> [Corpse sfx0]
[DSnakeGaze UPlayer no IndirectMarker] -> [Corpse sfx0]
[USnakeGaze DPlayer no IndirectMarker] -> [Corpse sfx0]
[LSnakeGaze RPlayer IndirectMarker] -> [RPlayerPetrified sfx1]
[RSnakeGaze LPlayer IndirectMarker] -> [LPlayerPetrified sfx1]
[DSnakeGaze UPlayer IndirectMarker] -> [UPlayerPetrified sfx1]
[USnakeGaze DPlayer IndirectMarker] -> [DPlayerPetrified sfx1]
(late [Corpse|LSnakeGaze|...|LSnakeHead] -> [Corpse|LSnakeGaze|...|LSnakeHeadGlare])
late [IndirectMarker] -> []
late [Gaze] -> []
[GazeCanPass] -> []
(Once all moves have happened, make reflections for next round. Assumes player has already moved, essentially, without using "late" in order to use counter movement directions for info storage etc.)
startloop
random [ Reflectable no DirectionCounter ] -> [ action Reflectable North left c00 ]
+ [ Reflectable North ] -> [ action Reflectable East right c00 ]
+ [ Reflectable East ] -> [ action Reflectable South up c00 ]
+ [ Reflectable South ] -> [ action Reflectable West down c00 ]
([> Player | | ] -> [> Player | | Wall])
[> c00 LPlayer] -> [> c00 ImageWillFaceLeft LPlayer]
[> c00 RPlayer] -> [> c00 ImageWillFaceRight RPlayer]
[> c00 UPlayer] -> [> c00 ImageWillFaceUp UPlayer]
[> c00 DPlayer] -> [> c00 ImageWillFaceDown DPlayer]
[> c00 LPlayerPetrified] -> [> c00 ImageWillFaceLeft LPlayerPetrified]
[> c00 RPlayerPetrified] -> [> c00 ImageWillFaceRight RPlayerPetrified]
[> c00 UPlayerPetrified] -> [> c00 ImageWillFaceUp UPlayerPetrified]
[> c00 DPlayerPetrified] -> [> c00 ImageWillFaceDown DPlayerPetrified]
[> c00 Reflectable no ImageDirectionMarker] -> [> c00 Reflectable ImageWillFaceLeft] (temporary hack for crates)
[ > c00 ImageDirectionMarker | no Solid ] -> [ | > c01 ImageDirectionMarker LOS ]
[ > c01 ImageDirectionMarker | no Solid ] -> [ | > c02 ImageDirectionMarker LOS ]
[ > c02 ImageDirectionMarker | no Solid ] -> [ | > c03 ImageDirectionMarker LOS ]
[ > c03 ImageDirectionMarker | no Solid ] -> [ | > c04 ImageDirectionMarker LOS ]
[ > c04 ImageDirectionMarker | no Solid ] -> [ | > c05 ImageDirectionMarker LOS ]
[ > c05 ImageDirectionMarker | no Solid ] -> [ | > c06 ImageDirectionMarker LOS ]
[ > c06 ImageDirectionMarker | no Solid ] -> [ | > c07 ImageDirectionMarker LOS ]
[ > c07 ImageDirectionMarker | no Solid ] -> [ | > c08 ImageDirectionMarker LOS ]
[ > c08 ImageDirectionMarker | no Solid ] -> [ | > c09 ImageDirectionMarker LOS ]
[ > Counter | Solid no Mirror ] -> [ | Solid ]
left [ > Counter ImageWillFaceLeft | MirrorUR ] -> [ | MirrorUR up Counter ImageWillFaceUp]
+ left [ > Counter ImageWillFaceUp | MirrorUR ] -> [ | MirrorUR up Counter ImageWillFaceLeft]
+ left [ > Counter ImageWillFaceDown | MirrorUR ] -> [ | MirrorUR up Counter ImageWillFaceRight]
+ left [ > Counter ImageWillFaceRight | MirrorUR ] -> [ | MirrorUR up Counter ImageWillFaceDown]
+ left [ > Counter ImageWillFaceLeft | MirrorDR ] -> [ | MirrorDR down Counter ImageWillFaceDown]
+ left [ > Counter ImageWillFaceUp | MirrorDR ] -> [ | MirrorDR down Counter ImageWillFaceRight]
+ left [ > Counter ImageWillFaceDown | MirrorDR ] -> [ | MirrorDR down Counter ImageWillFaceLeft]
+ left [ > Counter ImageWillFaceRight | MirrorDR ] -> [ | MirrorDR down Counter ImageWillFaceUp]
+ right [ > Counter ImageWillFaceLeft | MirrorUL ] -> [ | MirrorUL up Counter ImageWillFaceDown]
+ right [ > Counter ImageWillFaceUp | MirrorUL ] -> [ | MirrorUL up Counter ImageWillFaceRight]
+ right [ > Counter ImageWillFaceDown | MirrorUL ] -> [ | MirrorUL up Counter ImageWillFaceLeft]
+ right [ > Counter ImageWillFaceRight | MirrorUL ] -> [ | MirrorUL up Counter ImageWillFaceUp]
+ right [ > Counter ImageWillFaceLeft | MirrorDL ] -> [ | MirrorDL down Counter ImageWillFaceUp]
+ right [ > Counter ImageWillFaceUp | MirrorDL ] -> [ | MirrorDL down Counter ImageWillFaceLeft]
+ right [ > Counter ImageWillFaceDown | MirrorDL ] -> [ | MirrorDL down Counter ImageWillFaceRight]
+ right [ > Counter ImageWillFaceRight | MirrorDL ] -> [ | MirrorDL down Counter ImageWillFaceDown]
+ up [ > Counter ImageWillFaceLeft | MirrorDL ] -> [ | MirrorDL left Counter ImageWillFaceUp]
+ up [ > Counter ImageWillFaceUp | MirrorDL ] -> [ | MirrorDL left Counter ImageWillFaceLeft]
+ up [ > Counter ImageWillFaceDown | MirrorDL ] -> [ | MirrorDL left Counter ImageWillFaceRight]
+ up [ > Counter ImageWillFaceRight | MirrorDL ] -> [ | MirrorDL left Counter ImageWillFaceDown]
+ up [ > Counter ImageWillFaceLeft | MirrorDR ] -> [ | MirrorDR right Counter ImageWillFaceDown]
+ up [ > Counter ImageWillFaceUp | MirrorDR ] -> [ | MirrorDR right Counter ImageWillFaceRight]
+ up [ > Counter ImageWillFaceDown | MirrorDR ] -> [ | MirrorDR right Counter ImageWillFaceLeft]
+ up [ > Counter ImageWillFaceRight | MirrorDR ] -> [ | MirrorDR right Counter ImageWillFaceUp]
+ down [ > Counter ImageWillFaceLeft | MirrorUL ] -> [ | MirrorUL left Counter ImageWillFaceDown]
+ down [ > Counter ImageWillFaceUp | MirrorUL ] -> [ | MirrorUL left Counter ImageWillFaceRight]
+ down [ > Counter ImageWillFaceDown | MirrorUL ] -> [ | MirrorUL left Counter ImageWillFaceLeft]
+ down [ > Counter ImageWillFaceRight | MirrorUL ] -> [ | MirrorUL left Counter ImageWillFaceUp]
+ down [ > Counter ImageWillFaceLeft | MirrorUR ] -> [ | MirrorUR right Counter ImageWillFaceUp]
+ down [ > Counter ImageWillFaceUp | MirrorUR ] -> [ | MirrorUR right Counter ImageWillFaceLeft]
+ down [ > Counter ImageWillFaceDown | MirrorUR ] -> [ | MirrorUR right Counter ImageWillFaceRight]
+ down [ > Counter ImageWillFaceRight | MirrorUR ] -> [ | MirrorUR right Counter ImageWillFaceDown]
(TODO: downward-facing mirrors, after checking it works)
+ [ > c09 ImageDirectionMarker | no Solid ] -> [ | > c08 ImageDirectionMarker LOS ]
+ [ > c08 ImageDirectionMarker | no Solid ] -> [ | > c07 ImageDirectionMarker LOS ]
+ [ > c07 ImageDirectionMarker | no Solid ] -> [ | > c06 ImageDirectionMarker LOS ]
+ [ > c06 ImageDirectionMarker | no Solid ] -> [ | > c05 ImageDirectionMarker LOS ]
+ [ > c05 ImageDirectionMarker | no Solid ] -> [ | > c04 ImageDirectionMarker LOS ]
+ [ > c04 ImageDirectionMarker | no Solid ] -> [ | > c03 ImageDirectionMarker LOS ]
+ [ > c03 ImageDirectionMarker | no Solid ] -> [ | > c02 ImageDirectionMarker LOS ]
+ [ > c02 ImageDirectionMarker | no Solid ] -> [ | > c01 ImageDirectionMarker LOS ]
+ [ > c01 ImageDirectionMarker | no Solid ] -> [ | > c00 ImageDirectionMarker LOS ]
(Test this out with clones - could be issue if multiple run in the same pass.)
[ > c00 ImageWillFaceLeft | no Solid no CantMove ] [ action Player ] -> [ | LPlayerReflection ] [ Player HasReflection ]
[ > c00 ImageWillFaceRight | no Solid no CantMove ] [ action Player ] -> [ | RPlayerReflection ] [ Player HasReflection ]
[ > c00 ImageWillFaceUp | no Solid no CantMove ] [ action Player ] -> [ | UPlayerReflection ] [ Player HasReflection ]
[ > c00 ImageWillFaceDown | no Solid no CantMove ] [ action Player ] -> [ | DPlayerReflection ] [ Player HasReflection ]
[ > c00 ImageWillFaceLeft | no Solid no CantMove ] [ action PetrifiedPlayer ] -> [ | LPlayerPetrifiedReflection ] [ PetrifiedPlayer HasReflection ]
[ > c00 ImageWillFaceRight | no Solid no CantMove ] [ action PetrifiedPlayer ] -> [ | RPlayerPetrifiedReflection ] [ PetrifiedPlayer HasReflection ]
[ > c00 ImageWillFaceUp | no Solid no CantMove ] [ action PetrifiedPlayer ] -> [ | UPlayerPetrifiedReflection ] [ PetrifiedPlayer HasReflection ]
[ > c00 ImageWillFaceDown | no Solid no CantMove ] [ action PetrifiedPlayer ] -> [ | DPlayerPetrifiedReflection ] [ PetrifiedPlayer HasReflection ]
[ > c00 | no Solid no CantMove ] [ action ReflectableCrate ] -> [ | CrateReflection ] [ ReflectableCrate HasReflection ]
[ Counter ] -> []
[ action Reflectable ] [ stationary LOS ] -> [ action Reflectable ] []
[ LOS ] -> [ action LOS ]
[ action Reflectable ] -> [ Reflectable ]
endloop
[ DirectionCounter ] -> []
[ AlreadyRotatedMarker ] -> []
==============
WINCONDITIONS
==============
All Player on Goal
All Goal on Player
=======
LEVELS
=======
(#############
#..p........#
#..*######..#
#....*g.9<<D#
#..*######..#
#...........#
#...........#
#...........#
#############)
############
g.___......#
##___......#
##___..9<<d#
##.........#
##..p......#
##\../.....#
############
(#############
#...........#
#..*######..#
#.....G.9#..#
#..*######..#
#...........#
#..p........#
#...........#
#############)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.