Code edit (9 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Timeout.tick error: Error: Invalid color format. Expected 0xRRGGBB format, received: undefined' in or related to this line: 'tween(tileGraphics, {' Line Number: 358 โช๐ก Consider importing and using the following plugins: @upit/tween.v1, @upit/storage.v1, @upit/tween.v1
Code edit (6 edits merged)
Please save this source code
User prompt
play bgMusic in loop
Code edit (1 edits merged)
Please save this source code
User prompt
create a new confetti class. use line asset. call it in playFinalAnimation
Code edit (1 edits merged)
Please save this source code
User prompt
add random tint to confettis
Code edit (4 edits merged)
Please save this source code
Code edit (18 edits merged)
Please save this source code
User prompt
in start fadeOut, add a delay in the foreach loop of 100*index for each letter
User prompt
in start fadeOut, add a LK.setTimeout in the foreach loop of 100*index for each letter
Code edit (4 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -2346,9 +2346,9 @@
//<Write imports for supported plugins here>
/***********************************************************************************************/
/****************************************** GLOBAL VARIABLES ***********************************/
/***********************************************************************************************/
-var debug = true;
+var debug = false;
var resetProgress = false;
var isPlaying = false;
var GAME_STATE = {
INIT: 'INIT',
@@ -2406,8 +2406,10 @@
8: 0xFFFF00,
// Yellow
9: 0xFF0000,
// Red
+ 10: 0x9d23ff,
+ // Red
"default": 0xFFFFFF // Default color to prevent undefined errors
};
var operationsSlots = {
0: {
@@ -2455,41 +2457,41 @@
"operations": ["-1", "-2", "+1", "+1"]
},
4: {
"tiles": [["", "", 2, 2, 2, ""], ["", "", 2, 1, 1, 2], ["", 2, 1, 2, 1, 2], ["", "", 2, 1, 1, 2], ["", "", 2, 2, 2, ""], ["", "", "", "", "", ""], ["", "", 2, 2, "", ""], ["", "", 2, 1, 2, ""], [1, 1, 2, 2, "", ""]],
- "operations": ["-1", "-1", "+1", "-1", "-1"]
+ "operations": ["-1", "-1", "-1", "-1", "+1"]
},
5: {
"tiles": [["", "", 3, 3, "", ""], ["", "", 3, 2, 3, ""], ["", 3, 2, 2, 3, ""], ["", 3, 2, 2, 2, 3], [3, 2, 2, 2, 2, 3], ["", "", "", 3, "", ""], ["", "", 3, 3, "", ""], ["", 1, 1, 1, 1, 1], ["", 1, 1, 1, 1, ""]],
- "operations": ["+1", "-2", "-1"]
+ "operations": ["-2", "-1", "+1"]
},
6: {
"tiles": [["", "", 1, "", ""], ["", "", 1, 1, ""], ["", 2, 2, 2, ""], ["", 2, 2, 2, 2], [3, 3, 3, 3, 3], ["", 2, 2, 2, 2], ["", 2, 2, 2, ""], ["", "", 1, 1, ""], ["", "", 1, "", ""]],
- "operations": ['+1', '+1', '-1', '-2']
+ "operations": ['-2', '-1', '+1', '+1']
},
7: {
"tiles": [[2, "", "", "", "", 1], ["", 2, "", "", "", 3], [2, "", 2, 3, "", 3], ["", 2, 2, "", 3, 3], ["", 2, "", "", 3, ""], ["", "", 1, "", 1, ""], ["", "", 1, 1, "", ""], ["", "", "", 1, "", ""], ["", "", "", "", "", ""]],
"operations": ["-2", "-1", "+1"]
},
8: {
"tiles": [["", 3, 1, 2, 1, "", ""], ["", 3, 1, 2, 1, "", ""], [3, 1, 2, 1, "", "", ""], ["", "", "", "", 1, 1, ""], [3, 3, 3, 1, 1, 1, 1], ["", 3, 3, 1, 1, 2, ""], ["", 3, 1, 1, 2, 2, ""], ["", "", 1, 1, 2, 2, ""], ["", "", 1, 2, 2, "", ""]],
- "operations": ["-2", "+2", "-1", "-1", "-1"]
+ "operations": ["-2", "-1", "-1", "-1", "+2"]
},
9: {
"tiles": [["", "", "", "", "", "", ""], ["", 1, 3, 3, 3, 3, 1], [1, 1, 3, 3, 3, 1, 1], ["", 3, 3, 3, 3, 3, 3], [3, 2, 3, 2, 3, 2, 3], ["", 3, 3, 3, 3, 3, 3], [1, 1, 3, 3, 3, 1, 1], ["", 1, 3, 3, 3, 3, 1], ["", "", "", "", "", "", ""]],
- "operations": ["-2", "+1", "-2"]
+ "operations": ["-2", "-2", "+1"]
},
10: {
"tiles": [[1, 2, 1, 1, 1, 1, 1], ["", 3, 3, 3, 3, 2, 1], [1, 2, 1, 1, 1, 1, 1], ["", 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], ["", 1, 1, 1, 2, 2, 1], [1, 2, 3, 3, 2, 1, 1], ["", 1, 1, 1, 2, 2, 1], [1, 3, 3, 1, 3, 3, 3], ["", 1, 3, 1, 3, 2, 3], [1, 1, 1, 3, 3, 3, 1]],
- "operations": ["+1", "+2", "-2", "-2"]
+ "operations": ["-2", "-2", "+1", "+2"]
},
11: {
"tiles": [[3, 3, 2, 3, 3, 4, 3], ["", 3, 2, 3, 3, 3, 3], [3, 2, 3, 3, 3, 4, 3], ["", 3, 2, 3, 3, 3, 3], [3, 2, 2, 2, 1, 2, 2], ["", 3, 2, 3, 3, 3, 3], [3, 2, 3, 3, 3, 4, 3], ["", 3, 2, 3, 3, 3, 3], [3, 3, 2, 3, 3, 4, 3]],
"operations": ["-2", "-1", "-1", "-1", "+2", "+2"]
},
12: {
"tiles": [["", 2, 2, 2, 2, 2, ""], ["", 2, 1, 1, 1, 1, 2], [2, 1, 3, 3, 3, 1, 2], ["", 1, 3, 2, 2, 3, 1], [2, 1, 3, 1, 3, 1, 2], ["", 1, 3, 2, 2, 3, 1], [2, 1, 3, 3, 3, 1, 2], ["", 2, 1, 1, 1, 1, 2], ["", 2, 2, 2, 2, 2, ""]],
- "operations": ["-2", "-1", "-1", "+1"]
+ "operations": ["-1", "-1", "-1", "+1"]
},
13: {
"tiles": [["", "", 3, 3, "", "", ""], ["", "", 3, 4, 3, "", ""], ["", "", 3, 3, "", "", ""], ["", "", "", "", 2, 2, ""], ["", "", "", 2, 3, 2, ""], ["", "", "", "", 2, 2, ""], ["", "", 1, 1, "", "", ""], ["", "", 1, 2, 1, "", ""], ["", "", 1, 1, "", "", ""]],
"operations": ["-2", "-2", "-1", "-1", "+1"]
@@ -2523,13 +2525,13 @@
"operations": ["-1", "-1", "-1", "-1", "+2"]
},
21: {
"tiles": [["", "", "", "", "", "", ""], ["", "", 1, 1, 2, 2, 3], ["", 1, 1, 2, 2, 3, 3], ["", 1, 1, 2, 2, 3, 3], ["", "", 2, "", "", 3, ""], ["", "", "", 2, "", "", ""], ["", 3, "", 2, "", "", ""], ["", 3, 3, 2, 2, 1, 1], [3, 3, 2, 2, 1, 1, ""], ["", 3, 2, 2, 1, 1, ""], ["", "", "", "", "", "", ""]],
- "operations": ["+2", "+1", "-3", "-1"]
+ "operations": ["-3", "-1", "+2"]
},
22: {
"tiles": [["", "", "", "", "", "", ""], ["", 4, "", 4, "", 4, ""], ["", 4, 4, 4, 4, "", ""], ["", 1, 4, 1, 4, 1, ""], ["", 1, 1, 1, 1, 2, ""], ["", 2, 1, 2, 1, 2, 1], [2, "", 2, "", 2, "", 2], ["", 3, 1, 3, 1, 3, 1], ["", 3, 3, 3, 3, 3, 3], ["", "", 3, "", 3, "", 3], ["", "", "", "", "", "", ""]],
- "operations": ["-2", "-2", "-1", "-1", "+1", "+1"]
+ "operations": ["-2", "-2", "-1", "-1", "+1"]
},
23: {
"tiles": [["", "", "", "", "", "", ""], ["", "", "", 4, 4, "", ""], ["", "", 4, "", 4, "", ""], ["", "", 4, 2, 1, 4, ""], ["", 4, "", 3, "", 4, ""], ["", 4, 2, "", "", 3, 4], [4, "", 2, "", 3, "", 4], ["", 4, "", 1, 1, "", 4], ["", 4, 1, "", 1, 4, ""], ["", "", 4, 4, 4, 4, ""], ["", "", "", "", "", "", ""]],
"operations": ["-2", "-1", "-1", "+1", "+1", "+1"]
@@ -2547,9 +2549,9 @@
"operations": ["-2", "-1", "-1", "+1", "+2"]
},
27: {
"tiles": [["", "", "", "", "", "", ""], ["", "", "", 1, 1, 3, ""], ["", "", 1, 1, 3, 3, ""], ["", "", 1, 1, 3, 3, 3], ["", 2, 2, 2, 3, 3, 1], ["", 2, 2, 2, 4, 3, 1], [2, 2, 2, 4, 4, 1, ""], ["", "", 1, 3, 3, 1, ""], ["", "", 1, 3, 1, "", ""], ["", "", "", 1, 1, "", ""], ["", "", "", 1, "", "", ""]],
- "operations": ["-2", "-1", "+2", "-1"]
+ "operations": ["-2", "-1", "-1", "+2"]
},
28: {
"tiles": [["", 2, 2, 2, 2, 2, ""], ["", 2, 3, 4, 4, 3, 2], [2, 2, 2, 2, 2, 2, 2], ["", 2, 3, 1, 1, 3, 2], [2, 2, 2, 2, 2, 2, 2], ["", 2, 3, 1, 1, 3, 2], [2, 2, 2, 2, 2, 2, 2], ["", 2, 3, 4, 4, 3, 2], [2, 2, 2, 2, 2, 2, 2], ["", 2, 2, 2, 2, 2, 2], ["", "", "", "", "", "", ""]],
"operations": ["-2", "-1", "-1", "+2"]
@@ -2558,10 +2560,10 @@
"tiles": [["", 3, 4, "", 3, 3, ""], ["", 1, 3, 4, "", 3, 2], [1, 1, 4, "", 3, 2, 2], ["", 1, 3, 4, "", 3, 2], [3, 3, 4, "", 3, 3, 3], ["", 3, 3, 4, 3, 3, 3], [3, 3, 4, "", 3, 3, 3], ["", 2, 3, 4, "", 3, 1], [2, 2, 3, "", 3, 1, 1], ["", 2, 3, 4, "", 3, 1], ["", 3, 4, "", 3, 3, ""]],
"operations": ["-3", "-1", "-1", "-1", "-1"]
},
30: {
- "tiles": [["", "", "", 4, "", "", ""], ["", 2, 2, 4, 4, 3, 3], [1, 2, 4, 4, 4, 3, 1], ["", 1, 2, 4, 4, 3, 1], [1, 2, 4, 1, 4, 3, 1], ["", 4, 4, 1, 1, 4, 4], [4, 4, 1, 4, 1, 4, 4], ["", 1, 3, 4, 4, 2, 1], [1, 3, 2, 4, 3, 2, 1], ["", 1, 3, 2, 3, 2, 1], ["", 1, 3, 1, 2, 1, ""]],
- "operations": ["-1", "-2", "+1", "-3", "ร2"]
+ "tiles": [["", "", "", 4, "", "", ""], ["", 3, 3, 4, 4, 3, 3], [1, 3, 4, 4, 4, 3, 1], ["", 1, 3, 4, 4, 3, 1], [1, 3, 4, 1, 4, 3, 1], ["", 4, 4, 1, 1, 4, 4], [4, 4, 1, 4, 1, 4, 4], ["", 1, 3, 4, 4, 2, 1], [1, 3, 2, 4, 3, 2, 1], ["", 1, 3, 2, 3, 2, 1], ["", 1, 3, 1, 2, 1, ""]],
+ "operations": ["-2", "-1", "-1", "+1", "ร2"]
}
};
/***********************************************************************************************/
/***************************************** GAME INITIALISATION *********************************/
tick
Sound effect
tileEntrance
Sound effect
tileRemove
Sound effect
operationSelect
Sound effect
operationCancel
Sound effect
tileChangeValue
Sound effect
resetSound
Sound effect
levelFailed
Sound effect
menuLevelSelect
Sound effect
menuCellEnter
Sound effect
applause
Sound effect
bgMusic
Music
tada
Sound effect