Created
September 4, 2021 02:37
-
-
Save octoConnors/dc664996e0b6fd59c436308b23cf3270 to your computer and use it in GitHub Desktop.
Gran's Game but BETTER (PuzzleScript Script)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Play this game by pasting the script in http://www.puzzlescript.net/editor.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
title Cauldron Game | |
author Connorses | |
homepage www.puzzlescript.net | |
run_rules_on_level_start | |
======== | |
OBJECTS | |
======== | |
bg1 | |
#4e3f2b #3b342a | |
10000 | |
10000 | |
10000 | |
10000 | |
11111 | |
bg2 | |
#4e3f2b #3b342a | |
11111 | |
11111 | |
11111 | |
11111 | |
11111 | |
WallR | |
black #3b342a | |
10000 | |
10000 | |
10000 | |
10000 | |
10000 | |
WallU | |
black #3b342a | |
00000 | |
00000 | |
00000 | |
00000 | |
11111 | |
Player | |
white | |
0.... | |
..... | |
..... | |
0.... | |
00..0 | |
pR | |
white | |
0.... | |
..... | |
..... | |
0.... | |
0.... | |
pU | |
white | |
..... | |
..... | |
..... | |
..... | |
00..0 | |
pUR | |
white | |
..... | |
..... | |
..... | |
..... | |
0.... | |
goal | |
darkgrey black | |
11111 | |
00000 | |
00000 | |
00000 | |
00000 | |
red | |
red | |
...00 | |
.00.0 | |
.000. | |
..00. | |
..... | |
grn | |
green | |
.0... | |
.0000 | |
..0.0 | |
..000 | |
..... | |
blu | |
blue | |
....0 | |
..000 | |
.0.00 | |
..00. | |
..... | |
wht | |
lightgrey | |
..0.. | |
.0.00 | |
..00. | |
..0.0 | |
..... | |
init | |
pink | |
fill | |
white | |
boil | |
red | |
..... | |
..... | |
0.0.0 | |
.0.0. | |
00000 | |
full | |
lightgray | |
...00 | |
...00 | |
...00 | |
...00 | |
...00 | |
triggerBoil | |
pink | |
..... | |
..... | |
..... | |
00000 | |
00000 | |
boilSpawn | |
blue | |
00000 | |
00000 | |
..... | |
..... | |
..... | |
connected | |
lightbrown | |
stopped | |
transparent | |
continueBoil | |
red | |
00... | |
00... | |
00... | |
00... | |
00... | |
======= | |
LEGEND | |
======= | |
. = bg1 and init | |
, = bg2 and init | |
P = Player and bg2 and init | |
- = goal | |
~ = goal and boilSpawn | |
! = goal and full | |
r = red | |
g = grn | |
b = blu | |
w = wht | |
/ = wallR | |
_ = wallU | |
Background = bg1 or bg2 | |
piece = red or grn or blu or wht | |
decor = pU or pR or pUR | |
Wall = WallU or WallR | |
======= | |
SOUNDS | |
======= | |
================ | |
COLLISIONLAYERS | |
================ | |
Background | |
goal | |
stopped, connected | |
wall, red, grn, blu, wht, wallR, wallU | |
fill | |
Player | |
decor | |
init, full | |
boil, triggerBoil | |
boilSpawn | |
continueBoil | |
====== | |
RULES | |
====== | |
(if boiling is happending, don't allow moves) | |
[> player] [boil full] -> [player] [boil full] | |
[action player] [boil full] -> [player] [boil full] | |
(continueBoil tests if there's no more falling pieces) | |
[continueBoil]->[ ] | |
(drop pieces into boiling cauldron as rigid groups of colors) | |
[boil full] [red|red] -> [boil full] [red connected|red connected] | |
down [red connected|piece no red] -> [red stopped|piece no red] | |
[red stopped|red connected] -> [red stopped|red stopped] | |
[boil full] [grn|grn] -> [boil full] [grn connected|grn connected] | |
down [grn connected|piece no grn] -> [grn stopped|piece no grn] | |
[grn stopped|grn connected] -> [grn stopped|grn stopped] | |
[boil full] [blu|blu] -> [boil full] [blu connected|blu connected] | |
down [blu connected|piece no blu] -> [blu stopped|piece no blu] | |
[blu stopped|blu connected] -> [blu stopped|blu stopped] | |
[boil full] [wht|wht] -> [boil full] [wht connected|wht connected] | |
down [wht connected|piece no wht] -> [wht stopped|piece no wht] | |
[wht stopped|wht connected] -> [wht stopped|wht stopped] | |
[piece connected goal] -> [ goal] | |
[piece connected] -> [down piece down connected] again | |
(end boiling if no more connected pieces are falling) | |
[connected] [full boil] -> [connected] [full boil continueBoil] | |
[full boil no continueBoil] [Background no goal no Wall no piece] -> [full boil] [Background random piece] | |
[full boil no continueBoil] [stopped] -> [full boil] [ ] | |
[full boil no continueBoil] [boil] -> [full boil] [ ] | |
[full boil no continueBoil] -> [full] | |
(stop player going oob) | |
[> player|Wall] -> [Player|Wall] | |
[> player|Goal] -> [Player|Goal] | |
(initializes the board) | |
[init] -> [random piece] | |
(start/cancel a move) | |
[action player no fill piece] -> [player fill piece] | |
[action player fill] -> [player] | |
(Only swap pieces of different color) | |
[> player fill|piece] -> [> player fill triggerBoil|piece] again | |
[> player fill red|grn] -> [grn|red player] | |
[> player fill red|blu] -> [blu|red player] | |
[> player fill red|wht] -> [wht|red player] | |
[> player fill grn|red] -> [red|grn player] | |
[> player fill grn|blu] -> [blu|grn player] | |
[> player fill grn|wht] -> [wht|grn player] | |
[> player fill blu|wht] -> [wht|blu player] | |
[> player fill blu|grn] -> [grn|blu player] | |
[> player fill blu|red] -> [red|blu player] | |
[> player fill wht|grn] -> [grn|wht player] | |
[> player fill wht|blu] -> [blu|wht player] | |
[> player fill wht|red] -> [red|wht player] | |
[> player fill triggerBoil|piece] -> [player|piece] | |
(if pieces were swapped, progress boiling) | |
[triggerBoil] [boilSpawn no boil] -> [ ] [boilSpawn boil] | |
right [triggerBoil] [boil|no boil] -> [ ] [boil|boil] | |
late [decor] -> [] | |
late up [player| ] -> [player| pU] | |
late right [player| ] -> [player| pR] | |
late right [pU | ] -> [pU |pUR] | |
============== | |
WINCONDITIONS | |
============== | |
======= | |
LEVELS | |
======= | |
_______/ | |
,.,.,.,/ | |
.,.,.,./ | |
,.,.,.,/ | |
.,.p.,./ | |
,.,.,.,/ | |
.,.,.,./ | |
,.,.,.,/ | |
~-----!/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment