User prompt
Every time you click a random fart noise will appear.
User prompt
Sometimes when you click, a random fart noise will appear.
User prompt
Make the random website thing happen very often.
User prompt
Sometimes when you click it takes you to a random website, but make it all appropriate.
User prompt
Sometimes when you click a random text appears on the screen.
User prompt
Sometimes when you click, it brings up an Italian brain rot.
User prompt
Sometimes when it plays, tongue, tongue, tongue, so hold please, when, sometimes when you click.
User prompt
sometimes when you click and the sound dum dum dum dum dum dum dum the whole place
User prompt
But make the songs appropriate, like no swear words or anything bad.
User prompt
And sometimes when you click, a random song will happen.
User prompt
Sometimes when you click it puts you on GeoGuessr and then you have to guess the code to go back onto the game. But if you leave it's fine and then it'll just put you back on the game.
User prompt
Every time, sometimes you click, a really annoying sound will appear, and they get it off the internet, random, horrible sounds like pffft
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'size')' in or related to this line: 'numberCallText.style.size = 400;' Line Number: 604
User prompt
Every time a number appears, you put it in a different language.
User prompt
Game over! Get rid of the game over so it doesn't happen again.
User prompt
Add a world time clock sometimes when you click.
User prompt
I don't want to clock a play every time, nearly every time you click.
User prompt
Remove the World Clock calendar!
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'alpha')' in or related to this line: 'worldClockContainer.alpha = 0.25;' Line Number: 982
User prompt
Sometimes when you click, a world clock will appear that shows every time in every country.
User prompt
And a calendar that has the time of every country in the corner.
User prompt
In this game, every 9-10 years, a sign will appear on the screen, a golden one, it says how old are you now, you're probably 600, and that'll appear every 9-100 years, or 10-100.
User prompt
You can bump into things every time that it happens.
User prompt
Randomly, makes the game turn into a maze, that you have to win to continue playing.
User prompt
Make the text say, click, something will happen.
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); var storage = LK.import("@upit/storage.v1"); /**** * Classes ****/ // AI Robot: Simple animated character that moves left and right var AIRobot = Container.expand(function () { var self = Container.call(this); // Attach a robot body (use aiIndicator image as the robot's head/body) var robotBody = self.attachAsset('aiIndicator', { anchorX: 0.5, anchorY: 0.5 }); // Add two "eyes" using small ellipses var leftEye = self.attachAsset('freeSpace', { width: 24, height: 24, color: 0xffffff, anchorX: 0.5, anchorY: 0.5 }); var rightEye = self.attachAsset('freeSpace', { width: 24, height: 24, color: 0xffffff, anchorX: 0.5, anchorY: 0.5 }); leftEye.x = -36; leftEye.y = -20; rightEye.x = 36; rightEye.y = -20; // Animation state self.direction = 1; // 1: right, -1: left self.speed = 6 + Math.random() * 4; // px per frame self.minX = 200; self.maxX = 2048 - 200; // For eye animation self.eyeTick = 0; // Initial position self.x = 2048 * 3 / 4; self.y = 2732 - 180; // Update method for movement and eye animation self.update = function () { // Move left/right self.x += self.direction * self.speed; if (self.x > self.maxX) { self.x = self.maxX; self.direction = -1; } if (self.x < self.minX) { self.x = self.minX; self.direction = 1; } // Animate eyes (look in direction of movement) self.eyeTick++; var eyeOffset = 4 * self.direction + Math.sin(self.eyeTick / 10) * 2; leftEye.x = -36 + eyeOffset; rightEye.x = 36 + eyeOffset; }; return self; }); // BingoCell: Represents a single cell on the bingo card var BingoCell = Container.expand(function () { var self = Container.call(this); // Properties self.number = 0; self.marked = false; // Create cell background var cellBg = self.attachAsset('bingoCellBg', { width: cellSize, height: cellSize, anchorX: 0.5, anchorY: 0.5 }); // Number text var numberText = new Text2('', { size: Math.floor(cellSize * 0.45), fill: 0xffffff }); numberText.anchor.set(0.5, 0.5); self.addChild(numberText); // Mark overlay (hidden by default) var markOverlay = self.attachAsset('bingoMark', { width: cellSize * 0.7, height: cellSize * 0.7, anchorX: 0.5, anchorY: 0.5 }); markOverlay.alpha = 0; self.markOverlay = markOverlay; // Set number and update text self.setNumber = function (num) { self.number = num; numberText.setText(num > 0 ? num : ''); }; // Mark/unmark cell self.setMarked = function (val) { self.marked = val; if (val) { tween(markOverlay, { alpha: 0.8 }, { duration: 200, easing: tween.easeOut }); numberText.setText(self.number); numberText.setStyle({ fill: 0x000000 }); } else { tween(markOverlay, { alpha: 0 }, { duration: 200, easing: tween.easeOut }); numberText.setStyle({ fill: 0xffffff }); } }; // Touch event self.down = function (x, y, obj) { // Play click sound on any cell tap LK.getSound('Click').play(); if (self.marked) return; if (game.state !== 'playing') return; var p = self.playerIndex !== undefined ? self.playerIndex : 0; if (self.number === game.currentNumber && p === currentPlayer) { self.setMarked(true); LK.effects.flashObject(self, 0xff6600, 200); // Streak logic if (typeof streak !== "undefined") { streak[p]++; streakText[p].setText("Streak: " + streak[p]); if (streak[p] > 1) { // Bonus: add 1s per streak above 1 timeLeft[p] += 1000; tween(streakText[p], { scaleX: 1.3, scaleY: 1.3 }, { duration: 100, yoyo: true, repeat: 1, easing: tween.easeOut }); } } game.checkWin(); } else { if (typeof streak !== "undefined") { streak[p] = 0; streakText[p].setText(""); } LK.effects.flashObject(self, 0x8b0000, 200); } }; // Example: Trigger action when cell crosses X = 1000 from left to right if (self.lastX !== undefined && self.lastX <= 1000 && self.x > 1000) { // Place your action here, e.g. console.log("Cell crossed X=1000!"); } // Always update lastX at the end self.lastX = self.x; // Example: Trigger action when cell crosses Y = 800 from above to below if (self.lastY !== undefined && self.lastY <= 800 && self.y > 800) { // Place your action here, e.g. console.log("Cell crossed Y=800!"); } // Always update lastY at the end self.lastY = self.y; // Example: Trigger action when cell crosses X=1000 and Y=800 at the same frame if (self.lastY !== undefined && self.lastY <= 800 && self.y > 800 && self.lastX !== undefined && self.lastX <= 1000 && self.x > 1000) { // Place your action here, e.g. console.log("Cell arrived at (1000,800)!"); } // Always update lastX and lastY at the end self.lastX = self.x; self.lastY = self.y; return self; }); // CalledNumberBall: Shows a called number as a round ball var CalledNumberBall = Container.expand(function () { var self = Container.call(this); // Ball background var ball = self.attachAsset('bingoBall', { anchorX: 0.5, anchorY: 0.5 }); // Number text var numberText = new Text2('', { size: 60, fill: 0x000000 }); numberText.anchor.set(0.5, 0.5); numberText.x = 0; numberText.y = 0; self.addChild(numberText); self.setNumber = function (num) { numberText.setText(num); }; return self; }); // MazeMode: Simple maze mini-game overlay var MazeMode = Container.expand(function () { var self = Container.call(this); // Maze config var mazeCols = 7; var mazeRows = 9; var cellW = Math.floor(2048 / mazeCols); var cellH = Math.floor(1800 / mazeRows); var offsetX = Math.floor((2048 - mazeCols * cellW) / 2); var offsetY = 400; // Maze grid: 0 = open, 1 = wall self.grid = []; // Generate a simple random maze (DFS backtracker) function generateMaze(cols, rows) { var grid = []; for (var y = 0; y < rows; y++) { var row = []; for (var x = 0; x < cols; x++) row.push(1); grid.push(row); } function carve(x, y) { grid[y][x] = 0; var dirs = [[0, 1], [1, 0], [0, -1], [-1, 0]]; for (var i = 0; i < 4; i++) { var j = Math.floor(Math.random() * 4); var tmp = dirs[i]; dirs[i] = dirs[j]; dirs[j] = tmp; } for (var d = 0; d < 4; d++) { var nx = x + dirs[d][0] * 2, ny = y + dirs[d][1] * 2; if (nx >= 0 && nx < cols && ny >= 0 && ny < rows && grid[ny][nx] === 1) { grid[y + dirs[d][1]][x + dirs[d][0]] = 0; carve(nx, ny); } } } carve(1, 1); grid[1][1] = 0; // Start grid[rows - 2][cols - 2] = 0; // End return grid; } self.grid = generateMaze(mazeCols, mazeRows); // Draw maze self.cells = []; for (var y = 0; y < mazeRows; y++) { for (var x = 0; x < mazeCols; x++) { if (self.grid[y][x] === 1) { var wall = LK.getAsset('calledNumbersBg', { width: cellW - 8, height: cellH - 8, anchorX: 0, anchorY: 0, x: offsetX + x * cellW + 4, y: offsetY + y * cellH + 4 }); self.addChild(wall); self.cells.push(wall); } } } // Start and end var startX = 1, startY = 1; var endX = mazeCols - 2, endY = mazeRows - 2; var startCell = LK.getAsset('freeSpace', { width: cellW - 12, height: cellH - 12, anchorX: 0, anchorY: 0, x: offsetX + startX * cellW + 6, y: offsetY + startY * cellH + 6 }); startCell.alpha = 0.7; self.addChild(startCell); var endCell = LK.getAsset('winHighlight', { width: cellW - 12, height: cellH - 12, anchorX: 0, anchorY: 0, x: offsetX + endX * cellW + 6, y: offsetY + endY * cellH + 6 }); endCell.alpha = 0.7; self.addChild(endCell); // Player self.playerX = startX; self.playerY = startY; self.player = LK.getAsset('aiIndicator', { width: cellW - 24, height: cellH - 24, anchorX: 0, anchorY: 0, x: offsetX + self.playerX * cellW + 12, y: offsetY + self.playerY * cellH + 12 }); self.addChild(self.player); // Touch controls: swipe or tap to move self.touchStartX = null; self.touchStartY = null; self.touching = false; // Helper: move player if possible self.tryMove = function (dx, dy) { var nx = self.playerX + dx, ny = self.playerY + dy; if (nx >= 0 && nx < mazeCols && ny >= 0 && ny < mazeRows && self.grid[ny][nx] === 0) { self.playerX = nx; self.playerY = ny; self.player.x = offsetX + self.playerX * cellW + 12; self.player.y = offsetY + self.playerY * cellH + 12; // Win check if (self.playerX === endX && self.playerY === endY) { if (typeof self.onWin === "function") self.onWin(); } } }; // Touch events self.down = function (x, y, obj) { self.touchStartX = x; self.touchStartY = y; self.touching = true; }; self.up = function (x, y, obj) { if (!self.touching) return; var dx = x - self.touchStartX; var dy = y - self.touchStartY; if (Math.abs(dx) > Math.abs(dy)) { if (dx > 40) self.tryMove(1, 0);else if (dx < -40) self.tryMove(-1, 0); } else { if (dy > 40) self.tryMove(0, 1);else if (dy < -40) self.tryMove(0, -1); } self.touching = false; }; // Also allow tap on adjacent cell self.move = function (x, y, obj) {}; // Overlay text var mazeText = new Text2('Maze! Reach the yellow cell!', { size: 90, fill: 0xffd700 }); mazeText.anchor.set(0.5, 1); mazeText.x = 2048 / 2; mazeText.y = offsetY - 30; self.addChild(mazeText); // Win callback (set externally) self.onWin = null; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x181a1b }); /**** * Game Code ****/ // --- Added ses41 to ses75 sound assets (IDs to be filled by asset loader) --- // Save the current game state (called numbers, card numbers, marked cells, time left, streaks) // All bingo card and bingo cell logic removed as requested. // Bingo ball (yellow ellipse) // Bingo cell background (cyan box) // Mark overlay (beige box, used for marking cells) // Hint button background (green box, used for hint power-up) // Free space overlay (distinct color for center cell) // Win highlight overlay (gold ellipse for winning line) // Reveal Row button removed // Freeze Timer button and logic removed // Ses assets for ses1 to ses40 var gridSize = 5; // 5x5 bingo // Adjust cellSize and card positions for two-player mode to fit both cards on screen var cellSize = 180; // px, reduced to fit two cards side by side var cardPadding = 30; var cardWidth = gridSize * cellSize; var cardHeight = gridSize * cellSize; var cardStartX = 2048 / 4 - cardWidth / 2; // Player 1 card center at 1/4 width, Player 2 at 3/4 width var cardStartY = 500; // Lowered to fit both cards and UI var callIntervalStart = 4000; // ms (4 seconds initial call speed) var callIntervalMin = 1200; // ms (slower minimum speed) var callIntervalStep = 60; // ms, decrease per call (slower speedup) var gameDuration = 225000; // ms (3 min 45 sec) var numbersRange = 75; // 1-75 // Remove all bingo logic and display random numbers on screen repeatedly // Create a big number text in the center var numberCallText = new Text2('', { size: 400, fill: 0xff073a }); numberCallText.anchor.set(0.5, 0.5); numberCallText.x = 2048 / 2; numberCallText.y = 2732 / 2; game.addChild(numberCallText); // Add a warning text in the center, above the number var warningText = new Text2('click, something will happen.', { size: 120, fill: 0xff0000 }); warningText.anchor.set(0.5, 1); warningText.x = 2048 / 2; warningText.y = 2732 / 2 - 260; game.addChild(warningText); // Function to show a random number and play its sound function showRandomNumber() { var num = 1 + Math.floor(Math.random() * 75); numberCallText.setText(num); // Play ses1-ses75 sound if available var soundId = 'ses' + num; var sound = LK.getSound(soundId); if (sound) sound.play(); // Animate the number numberCallText.scale.x = 0.7; numberCallText.scale.y = 0.7; tween(numberCallText.scale, { x: 1, y: 1 }, { duration: 200, easing: tween.easeOut }); } // Call a new number every 2 seconds LK.setInterval(showRandomNumber, 2000); // Show the first number immediately showRandomNumber(); // --- Jump Scare Overlay and Logic --- var jumpScareOverlay = LK.getAsset('flashOverlay', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2, alpha: 0 }); game.addChild(jumpScareOverlay); // Optionally, you can add a scary text var jumpScareText = new Text2('!', { size: 600, fill: 0xff0000 }); jumpScareText.anchor.set(0.5, 0.5); jumpScareText.x = 2048 / 2; jumpScareText.y = 2732 / 2; jumpScareText.alpha = 0; game.addChild(jumpScareText); function triggerJumpScare() { // Flash overlay and text in jumpScareOverlay.alpha = 0.92; jumpScareText.alpha = 1; // Animate out after 600ms LK.setTimeout(function () { tween(jumpScareOverlay, { alpha: 0 }, { duration: 400, easing: tween.easeOut }); tween(jumpScareText, { alpha: 0 }, { duration: 400, easing: tween.easeOut }); }, 600); } // --- Second Jump Scare Overlay (Question Mark) and Logic --- var jumpScareOverlay2 = LK.getAsset('flashOverlay', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2, alpha: 0 }); game.addChild(jumpScareOverlay2); var jumpScareText2 = new Text2('?', { size: 600, fill: 0x00aaff }); jumpScareText2.anchor.set(0.5, 0.5); jumpScareText2.x = 2048 / 2; jumpScareText2.y = 2732 / 2; jumpScareText2.alpha = 0; game.addChild(jumpScareText2); function triggerJumpScare2() { // Flash overlay and text in jumpScareOverlay2.alpha = 0.92; jumpScareText2.alpha = 1; // Animate out after 600ms LK.setTimeout(function () { tween(jumpScareOverlay2, { alpha: 0 }, { duration: 400, easing: tween.easeOut }); tween(jumpScareText2, { alpha: 0 }, { duration: 400, easing: tween.easeOut }); }, 600); } // Schedule the question mark jump scare every 3 seconds LK.setInterval(triggerJumpScare2, 3000); // Schedule both click sound and jump scare every 9 seconds, in sync function triggerClickAndJumpScare() { // Play click sound var clickSound = LK.getSound('Click'); if (clickSound) clickSound.play(); // Trigger jump scare triggerJumpScare(); } // Call every 9 seconds (9000 ms) LK.setInterval(triggerClickAndJumpScare, 9000); // Optionally, trigger immediately at start triggerClickAndJumpScare(); // --- Random Event on Click: Zombie Attack, Door Close, Golden Zombie, Zombie --- // Helper overlays and logic for events var eventOverlay = LK.getAsset('flashOverlay', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2, alpha: 0 }); game.addChild(eventOverlay); var eventText = new Text2('', { size: 400, fill: 0x00ff00 }); eventText.anchor.set(0.5, 0.5); eventText.x = 2048 / 2; eventText.y = 2732 / 2; eventText.alpha = 0; game.addChild(eventText); // Golden zombie overlay var goldenZombieOverlay = LK.getAsset('flashOverlay', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2, alpha: 0 }); game.addChild(goldenZombieOverlay); var goldenZombieText = new Text2('GOLDEN ZOMBIE!', { size: 180, fill: 0xffd700 }); goldenZombieText.anchor.set(0.5, 0.5); goldenZombieText.x = 2048 / 2; goldenZombieText.y = 2732 / 2; goldenZombieText.alpha = 0; game.addChild(goldenZombieText); // Golden zombie picture overlay var goldenZombiePicOverlay = LK.getAsset('flashOverlay', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2, alpha: 0 }); game.addChild(goldenZombiePicOverlay); // Use a placeholder image for golden zombie picture (replace with real asset id if available) var goldenZombiePic = LK.getAsset('aiIndicator', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2, scaleX: 2.2, scaleY: 2.2, alpha: 0 }); game.addChild(goldenZombiePic); // Zombie overlay var zombieOverlay = LK.getAsset('flashOverlay', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2, alpha: 0 }); game.addChild(zombieOverlay); var zombieText = new Text2('ZOMBIE!', { size: 220, fill: 0x00ff00 }); zombieText.anchor.set(0.5, 0.5); zombieText.x = 2048 / 2; zombieText.y = 2732 / 2; zombieText.alpha = 0; game.addChild(zombieText); // Door close overlay var doorOverlay = LK.getAsset('flashOverlay', { anchorX: 0.5, anchorY: 0.5, x: 2048 / 2, y: 2732 / 2, alpha: 0 }); game.addChild(doorOverlay); var doorText = new Text2('DOOR CLOSES!', { size: 220, fill: 0x888888 }); doorText.anchor.set(0.5, 0.5); doorText.x = 2048 / 2; doorText.y = 2732 / 2; doorText.alpha = 0; game.addChild(doorText); // Helper: show overlay + text, fade out after ms, then optional callback function showEventOverlay(overlay, textObj, color, text, textColor, duration, cb) { overlay.alpha = 0.92; textObj.setText(text); textObj.fill = textColor; textObj.alpha = 1; LK.setTimeout(function () { tween(overlay, { alpha: 0 }, { duration: 400, easing: tween.easeOut }); tween(textObj, { alpha: 0 }, { duration: 400, easing: tween.easeOut }); if (cb) LK.setTimeout(cb, 400); }, duration); } // Helper: show golden zombie, then zombie function showGoldenZombieThenZombie() { goldenZombieOverlay.alpha = 0.92; goldenZombieText.alpha = 1; LK.setTimeout(function () { tween(goldenZombieOverlay, { alpha: 0 }, { duration: 400, easing: tween.easeOut }); tween(goldenZombieText, { alpha: 0 }, { duration: 400, easing: tween.easeOut }); // After golden zombie, show zombie LK.setTimeout(function () { zombieOverlay.alpha = 0.92; zombieText.alpha = 1; LK.setTimeout(function () { tween(zombieOverlay, { alpha: 0 }, { duration: 400, easing: tween.easeOut }); tween(zombieText, { alpha: 0 }, { duration: 400, easing: tween.easeOut }); }, 700); }, 400); }, 900); } // Helper: show golden zombie picture, then zombie function showGoldenZombiePicThenZombie() { goldenZombiePicOverlay.alpha = 0.92; goldenZombiePic.alpha = 1; LK.setTimeout(function () { tween(goldenZombiePicOverlay, { alpha: 0 }, { duration: 400, easing: tween.easeOut }); tween(goldenZombiePic, { alpha: 0 }, { duration: 400, easing: tween.easeOut }); // After golden zombie picture, show zombie LK.setTimeout(function () { zombieOverlay.alpha = 0.92; zombieText.alpha = 1; LK.setTimeout(function () { tween(zombieOverlay, { alpha: 0 }, { duration: 400, easing: tween.easeOut }); tween(zombieText, { alpha: 0 }, { duration: 400, easing: tween.easeOut }); }, 700); }, 400); }, 900); } // Main random event handler var mazeActive = false; var mazeInstance = null; var pausedIntervals = []; function pauseAllIntervals() { // Pause all intervals by clearing them and storing their ids if (typeof window !== "undefined") return; // Defensive: not in browser // Not needed in LK, as intervals are not global, but we can set a flag if needed } function resumeAllIntervals() { // No-op for now, as LK intervals are not globally tracked } function handleRandomEvent() { // 1 in 6 chance to trigger maze mode if (!mazeActive && Math.random() < 0.17) { mazeActive = true; // Hide main UI numberCallText.alpha = 0.1; warningText.alpha = 0.1; jumpScareOverlay.alpha = 0; jumpScareText.alpha = 0; jumpScareOverlay2.alpha = 0; jumpScareText2.alpha = 0; eventOverlay.alpha = 0; eventText.alpha = 0; goldenZombieOverlay.alpha = 0; goldenZombieText.alpha = 0; goldenZombiePicOverlay.alpha = 0; goldenZombiePic.alpha = 0; zombieOverlay.alpha = 0; zombieText.alpha = 0; doorOverlay.alpha = 0; doorText.alpha = 0; // Create maze instance mazeInstance = new MazeMode(); mazeInstance.x = 0; mazeInstance.y = 0; mazeInstance.alpha = 1; game.addChild(mazeInstance); // Block main game input game.down = null; // Maze win callback mazeInstance.onWin = function () { // Remove maze, restore UI, resume game if (mazeInstance) { mazeInstance.destroy(); mazeInstance = null; } numberCallText.alpha = 1; warningText.alpha = 1; mazeActive = false; // Restore click handler game.down = function (x, y, obj) { handleRandomEvent(); }; }; // Forward touch events to maze game.down = function (x, y, obj) { if (mazeInstance && mazeInstance.down) mazeInstance.down(x, y, obj); }; game.up = function (x, y, obj) { if (mazeInstance && mazeInstance.up) mazeInstance.up(x, y, obj); }; game.move = function (x, y, obj) { if (mazeInstance && mazeInstance.move) mazeInstance.move(x, y, obj); }; return; } var eventType = Math.floor(Math.random() * 5); if (eventType === 0) { // Zombie attack showEventOverlay(eventOverlay, eventText, 0x00ff00, 'ZOMBIE ATTACK!', 0x00ff00, 900); } else if (eventType === 1) { // Door closes, then game over showEventOverlay(doorOverlay, doorText, 0x888888, 'DOOR CLOSES!', 0x888888, 900, function () { LK.showGameOver(); }); } else if (eventType === 2) { // Golden zombie, then zombie showGoldenZombieThenZombie(); } else if (eventType === 3) { // Golden zombie picture, then zombie showGoldenZombiePicThenZombie(); } else { // Zombie showEventOverlay(zombieOverlay, zombieText, 0x00ff00, 'ZOMBIE!', 0x00ff00, 900); } } // Listen for click/tap on the game area game.down = function (x, y, obj) { handleRandomEvent(); }; // --- Animated background color pulse for visual appeal --- var bgPulseColors = [0x181a1b, // near-black 0x23272a, // dark gray 0x222326, // blackish blue 0x181a1b, // repeat for smooth loop 0x23272a]; // Blackish/dark palette var bgPulseIndex = 0; var bgPulseDuration = 3000; function pulseBackground() { var fromColor = bgPulseColors[bgPulseIndex]; var toColor = bgPulseColors[(bgPulseIndex + 1) % bgPulseColors.length]; var t = { v: 0 }; tween(t, { v: 1 }, { duration: bgPulseDuration, easing: tween.easeInOut, onUpdate: function onUpdate() { // Interpolate color var r1 = fromColor >> 16 & 0xff, g1 = fromColor >> 8 & 0xff, b1 = fromColor & 0xff; var r2 = toColor >> 16 & 0xff, g2 = toColor >> 8 & 0xff, b2 = toColor & 0xff; var r = Math.round(r1 + (r2 - r1) * t.v); var g = Math.round(g1 + (g2 - g1) * t.v); var b = Math.round(b1 + (b2 - b1) * t.v); var color = r << 16 | g << 8 | b; game.setBackgroundColor(color); }, onComplete: function onComplete() { bgPulseIndex = (bgPulseIndex + 1) % bgPulseColors.length; pulseBackground(); } }); } pulseBackground();
===================================================================
--- original.js
+++ change.js
@@ -203,8 +203,158 @@
numberText.setText(num);
};
return self;
});
+// MazeMode: Simple maze mini-game overlay
+var MazeMode = Container.expand(function () {
+ var self = Container.call(this);
+ // Maze config
+ var mazeCols = 7;
+ var mazeRows = 9;
+ var cellW = Math.floor(2048 / mazeCols);
+ var cellH = Math.floor(1800 / mazeRows);
+ var offsetX = Math.floor((2048 - mazeCols * cellW) / 2);
+ var offsetY = 400;
+ // Maze grid: 0 = open, 1 = wall
+ self.grid = [];
+ // Generate a simple random maze (DFS backtracker)
+ function generateMaze(cols, rows) {
+ var grid = [];
+ for (var y = 0; y < rows; y++) {
+ var row = [];
+ for (var x = 0; x < cols; x++) row.push(1);
+ grid.push(row);
+ }
+ function carve(x, y) {
+ grid[y][x] = 0;
+ var dirs = [[0, 1], [1, 0], [0, -1], [-1, 0]];
+ for (var i = 0; i < 4; i++) {
+ var j = Math.floor(Math.random() * 4);
+ var tmp = dirs[i];
+ dirs[i] = dirs[j];
+ dirs[j] = tmp;
+ }
+ for (var d = 0; d < 4; d++) {
+ var nx = x + dirs[d][0] * 2,
+ ny = y + dirs[d][1] * 2;
+ if (nx >= 0 && nx < cols && ny >= 0 && ny < rows && grid[ny][nx] === 1) {
+ grid[y + dirs[d][1]][x + dirs[d][0]] = 0;
+ carve(nx, ny);
+ }
+ }
+ }
+ carve(1, 1);
+ grid[1][1] = 0; // Start
+ grid[rows - 2][cols - 2] = 0; // End
+ return grid;
+ }
+ self.grid = generateMaze(mazeCols, mazeRows);
+ // Draw maze
+ self.cells = [];
+ for (var y = 0; y < mazeRows; y++) {
+ for (var x = 0; x < mazeCols; x++) {
+ if (self.grid[y][x] === 1) {
+ var wall = LK.getAsset('calledNumbersBg', {
+ width: cellW - 8,
+ height: cellH - 8,
+ anchorX: 0,
+ anchorY: 0,
+ x: offsetX + x * cellW + 4,
+ y: offsetY + y * cellH + 4
+ });
+ self.addChild(wall);
+ self.cells.push(wall);
+ }
+ }
+ }
+ // Start and end
+ var startX = 1,
+ startY = 1;
+ var endX = mazeCols - 2,
+ endY = mazeRows - 2;
+ var startCell = LK.getAsset('freeSpace', {
+ width: cellW - 12,
+ height: cellH - 12,
+ anchorX: 0,
+ anchorY: 0,
+ x: offsetX + startX * cellW + 6,
+ y: offsetY + startY * cellH + 6
+ });
+ startCell.alpha = 0.7;
+ self.addChild(startCell);
+ var endCell = LK.getAsset('winHighlight', {
+ width: cellW - 12,
+ height: cellH - 12,
+ anchorX: 0,
+ anchorY: 0,
+ x: offsetX + endX * cellW + 6,
+ y: offsetY + endY * cellH + 6
+ });
+ endCell.alpha = 0.7;
+ self.addChild(endCell);
+ // Player
+ self.playerX = startX;
+ self.playerY = startY;
+ self.player = LK.getAsset('aiIndicator', {
+ width: cellW - 24,
+ height: cellH - 24,
+ anchorX: 0,
+ anchorY: 0,
+ x: offsetX + self.playerX * cellW + 12,
+ y: offsetY + self.playerY * cellH + 12
+ });
+ self.addChild(self.player);
+ // Touch controls: swipe or tap to move
+ self.touchStartX = null;
+ self.touchStartY = null;
+ self.touching = false;
+ // Helper: move player if possible
+ self.tryMove = function (dx, dy) {
+ var nx = self.playerX + dx,
+ ny = self.playerY + dy;
+ if (nx >= 0 && nx < mazeCols && ny >= 0 && ny < mazeRows && self.grid[ny][nx] === 0) {
+ self.playerX = nx;
+ self.playerY = ny;
+ self.player.x = offsetX + self.playerX * cellW + 12;
+ self.player.y = offsetY + self.playerY * cellH + 12;
+ // Win check
+ if (self.playerX === endX && self.playerY === endY) {
+ if (typeof self.onWin === "function") self.onWin();
+ }
+ }
+ };
+ // Touch events
+ self.down = function (x, y, obj) {
+ self.touchStartX = x;
+ self.touchStartY = y;
+ self.touching = true;
+ };
+ self.up = function (x, y, obj) {
+ if (!self.touching) return;
+ var dx = x - self.touchStartX;
+ var dy = y - self.touchStartY;
+ if (Math.abs(dx) > Math.abs(dy)) {
+ if (dx > 40) self.tryMove(1, 0);else if (dx < -40) self.tryMove(-1, 0);
+ } else {
+ if (dy > 40) self.tryMove(0, 1);else if (dy < -40) self.tryMove(0, -1);
+ }
+ self.touching = false;
+ };
+ // Also allow tap on adjacent cell
+ self.move = function (x, y, obj) {};
+ // Overlay text
+ var mazeText = new Text2('Maze! Reach the yellow cell!', {
+ size: 90,
+ fill: 0xffd700
+ });
+ mazeText.anchor.set(0.5, 1);
+ mazeText.x = 2048 / 2;
+ mazeText.y = offsetY - 30;
+ self.addChild(mazeText);
+ // Win callback (set externally)
+ self.onWin = null;
+ return self;
+});
/****
* Initialize Game
****/
@@ -564,9 +714,75 @@
}, 400);
}, 900);
}
// Main random event handler
+var mazeActive = false;
+var mazeInstance = null;
+var pausedIntervals = [];
+function pauseAllIntervals() {
+ // Pause all intervals by clearing them and storing their ids
+ if (typeof window !== "undefined") return; // Defensive: not in browser
+ // Not needed in LK, as intervals are not global, but we can set a flag if needed
+}
+function resumeAllIntervals() {
+ // No-op for now, as LK intervals are not globally tracked
+}
function handleRandomEvent() {
+ // 1 in 6 chance to trigger maze mode
+ if (!mazeActive && Math.random() < 0.17) {
+ mazeActive = true;
+ // Hide main UI
+ numberCallText.alpha = 0.1;
+ warningText.alpha = 0.1;
+ jumpScareOverlay.alpha = 0;
+ jumpScareText.alpha = 0;
+ jumpScareOverlay2.alpha = 0;
+ jumpScareText2.alpha = 0;
+ eventOverlay.alpha = 0;
+ eventText.alpha = 0;
+ goldenZombieOverlay.alpha = 0;
+ goldenZombieText.alpha = 0;
+ goldenZombiePicOverlay.alpha = 0;
+ goldenZombiePic.alpha = 0;
+ zombieOverlay.alpha = 0;
+ zombieText.alpha = 0;
+ doorOverlay.alpha = 0;
+ doorText.alpha = 0;
+ // Create maze instance
+ mazeInstance = new MazeMode();
+ mazeInstance.x = 0;
+ mazeInstance.y = 0;
+ mazeInstance.alpha = 1;
+ game.addChild(mazeInstance);
+ // Block main game input
+ game.down = null;
+ // Maze win callback
+ mazeInstance.onWin = function () {
+ // Remove maze, restore UI, resume game
+ if (mazeInstance) {
+ mazeInstance.destroy();
+ mazeInstance = null;
+ }
+ numberCallText.alpha = 1;
+ warningText.alpha = 1;
+ mazeActive = false;
+ // Restore click handler
+ game.down = function (x, y, obj) {
+ handleRandomEvent();
+ };
+ };
+ // Forward touch events to maze
+ game.down = function (x, y, obj) {
+ if (mazeInstance && mazeInstance.down) mazeInstance.down(x, y, obj);
+ };
+ game.up = function (x, y, obj) {
+ if (mazeInstance && mazeInstance.up) mazeInstance.up(x, y, obj);
+ };
+ game.move = function (x, y, obj) {
+ if (mazeInstance && mazeInstance.move) mazeInstance.move(x, y, obj);
+ };
+ return;
+ }
var eventType = Math.floor(Math.random() * 5);
if (eventType === 0) {
// Zombie attack
showEventOverlay(eventOverlay, eventText, 0x00ff00, 'ZOMBIE ATTACK!', 0x00ff00, 900);
Bingo thema. In-Game asset. 2d. High contrast. No shadows
Bingo Mark. In-Game asset. 2d. High contrast. No shadows
Streakbackground bingo. In-Game asset. 2d. High contrast. No shadows
Card border. In-Game asset. 2d. High contrast. No shadows
Djdj. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
A golden zombie with wide eyes. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
Click
Sound effect
Numberthree
Sound effect
ses1
Sound effect
ses2
Sound effect
ses3
Sound effect
ses4
Sound effect
ses5
Sound effect
ses6
Sound effect
ses7
Sound effect
ses8
Sound effect
ses9
Sound effect
ses10
Sound effect
ses11
Sound effect
ses12
Sound effect
ses13
Sound effect
ses14
Sound effect
ses15
Sound effect
ses16
Sound effect
ses17
Sound effect
ses18
Sound effect
ses19
Sound effect
ses20
Sound effect
ses21
Sound effect
ses22
Sound effect
ses23
Sound effect
ses24
Sound effect
ses25
Sound effect
ses26
Sound effect
ses27
Sound effect
ses28
Sound effect
ses29
Sound effect
ses30
Sound effect
ses31
Sound effect
ses32
Sound effect
ses33
Sound effect
ses34
Sound effect
ses35
Sound effect
ses36
Sound effect
ses37
Sound effect
ses38
Sound effect
ses39
Sound effect
ses40
Sound effect
ses41
Sound effect
ses42
Sound effect
ses43
Sound effect
ses44
Sound effect
ses45
Sound effect
ses46
Sound effect
ses47
Sound effect
ses48
Sound effect
ses49
Sound effect
ses50
Sound effect
ses51
Sound effect
ses52
Sound effect
ses53
Sound effect
ses54
Sound effect
ses55
Sound effect
ses56
Sound effect
ses57
Sound effect
ses58
Sound effect
ses59
Sound effect
ses60
Sound effect
ses61
Sound effect
ses62
Sound effect
ses64
Sound effect
ses65
Sound effect
ses66
Sound effect
ses67
Sound effect
ses68
Sound effect
ses69
Sound effect
ses70
Sound effect
ses71
Sound effect
ses72
Sound effect
ses75
Sound effect
fart1
Sound effect
fart2
Sound effect
fart3
Sound effect
fart4
Sound effect
fart5
Sound effect
fart6
Sound effect
fart7
Sound effect