User prompt
BUTONUN REBGİNİ BEYAZ YAP VE BUTONU CAN BARININ YANINA KOY
User prompt
oyuna 1. bossa GİT BUTONU EKLE
User prompt
1. bossu yenince haani kötü adam bize bomba atıyoduya yani ben 1. bossu yendiğimde beni kötü adamın bana bomba attığı yere geçilsin
User prompt
1. bossu yenin ce hani bize bonba tıyodu bizle konuşuyoduya o bölüme at ve ayına 1. boss a geçi ekle
User prompt
hayır ben onu yenince beni you thoug ı lost kısmına at
User prompt
1. bossu yenince direkt beni villianla konuşmaya atsın
User prompt
sona git butonunu kaldır next scine kalsın
User prompt
tamam sona git butonunu kaldır
User prompt
inasanların konuşma baloncuğunu küçült ve rengini beyaz yap ayrıca bianalr yola değsin ve oyuna son sahneye geç butonu ekle
User prompt
sondaki yolu büyüt ve sondaki ahne 10 saniye sürsün ve sondakiler yani insanlar https://upit.com/create/8A6RcqBNGH/assets/images/f buna benzwsin sodaki sahneyide büyüt
User prompt
https://upit.com/create/8A6RcqBNGH/assets/images/road sonda üzerinde durdukları yol buna benzesin
User prompt
https://upit.com/create/8A6RcqBNGH/assets/images/a binalar buna benzesin sondaki ve insanın kafanını küçült ve 6 insan olsun karşılarında
User prompt
https://upit.com/create/8A6RcqBNGH/assets/images/s sondaki kalabalık insan topluluğu buna benzesin ve sonda arka plan siyah olmasın binalar 9lsun ve karşımızıdaki insanlar bize teşşekkür etsin bizde rica ederiz diyelim ingilizce ayrıca inan topluluğu solumuzda bizde onların sağında olalım
User prompt
sondaki konuşmalar beyaz olsun
User prompt
sondaki konuşmalr ingilizce olsun ve dünyaya ışınlanınca yeni bir map yap ve o mapda dünya olsun ve oradaki halk bize sizin sayenizde kurtulduk desin ingilizce
User prompt
sonda hani biz onu yok edince bir konuşma yeri daha varya onu kaldır onun yerşne https://upit.com/create/8A6RcqBNGH/assets/images/bossFace bu bize seninle dünyaya gelebilirmiyim desin ve bizde tamam diyelim sonra dümyaya ışınlanalım
User prompt
https://upit.com/create/8A6RcqBNGH/assets/images/bossFace bunun konuşmasının rengini beyaz yap ve üste al
User prompt
https://upit.com/create/8A6RcqBNGH/assets/images/bossFace ben stop dedikten sonraki konuşmalarda bu resimdeki canavar benle konuşacak
User prompt
sonda biz cnavarı yok edince oyun bitsin
User prompt
sondaki konuşmaları kaldır canavar üzerimize gelirken sonda ona bomba fırlatalım yok olsun sonra villain gelip you cant stop me desin ama cnavar gelirken ona bombayı atmak için ekrana 2 kere hızlıca tıklamalıyız bunu yapmamız gerektiğini cnavar gelmeden 3 saniye önce söyleki oyuncu ne yapacağını bilsin
User prompt
bak why ı shouldu söylerken boss un yüzü olsun why derkende boss un yüzü olsun
User prompt
konuşma baloncuğunda villamın yüzü değil bossun yüzü olsun sonda ben stop dedikten sonra
User prompt
sondaki konuşma 1. bossla benim aramda geçsin kötü adamla değil
User prompt
konuşma benle 1. boss arasında olsun
User prompt
bak sondaki 1. bossun gelip bizi öldürmesşnş kaldır 1. boss yanımıza gelip hadi birlik olalım desşn bizde ona güvenmesekte başka şansımızın olmadığı için tamam diyelim sonra 2. boss gelüp siz bittiniz deyip bize saldırsın ve ikimiz ona karşı savaşalım
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); /**** * Classes ****/ // Boss Class var Boss = Container.expand(function () { var self = Container.call(this); // Attach unique boss face asset var bossFace = self.attachAsset('bossFace', { anchorX: 0.5, anchorY: 0.5, scaleX: 2.2, scaleY: 2.2 }); self.bossFace = bossFace; self.speed = 8; self.targetX = 2048 / 2; self.targetY = 800; // Boss starts at top, then chases player self.x = 2048 / 2; self.y = -bossFace.height; self.update = function () { // Move boss into screen, then chase player if (self.y < self.targetY) { self.y += 18; if (self.y > self.targetY) self.y = self.targetY; } else { // Chase player var dx = playerBall.x - self.x; var dy = playerBall.y - self.y; var dist = Math.sqrt(dx * dx + dy * dy); if (dist > 10) { self.x += dx / dist * self.speed; self.y += dy / dist * self.speed * 0.7; } } }; return self; }); // Damage Ball Class var DamageBall = Container.expand(function () { var self = Container.call(this); // Attach a yellow ball asset var ball = self.attachAsset('centerCircle', { anchorX: 0.5, anchorY: 0.5, scaleX: 1.1, scaleY: 1.1 }); ball.tint = 0xffe600; self.ball = ball; self.speed = 18; // Random X within game area var r = ball.width / 2; self.x = Math.random() * (2048 - 2 * r) + r; self.y = -r - 10; self.update = function () { self.y += self.speed; }; return self; }); // Start the boss chase phase // Enemy Ball Class var EnemyBall = Container.expand(function () { var self = Container.call(this); // Attach enemy ball asset (red circle) var ball = self.attachAsset('enemyBall', { anchorX: 0.5, anchorY: 0.5 }); // Assign ball asset to self.ball for external access self.ball = ball; // Speed will be set on creation self.speed = 6; // Update method: move down self.update = function () { self.y += self.speed; }; return self; }); // Player Ball Class var PlayerBall = Container.expand(function () { var self = Container.call(this); // Attach player ball asset (blue circle) var ball = self.attachAsset('playerBall', { anchorX: 0.5, anchorY: 0.5 }); // For possible future use (e.g., effects) self.ball = ball; // No update needed; position is controlled by drag return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x181818 // Dark background }); /**** * Game Code ****/ // new unique villain face // new unique villain face // --- Second Boss Phase Variables (moved to global scope for access in update and reset) --- // --- Asset Initialization (shapes) --- // Tween plugin for future use (animations, etc.) // --- Game Variables --- // Start the boss chase phase // Monster entrance sound (villain/boss) var secondBoss = null; var secondBossHealth = 1000; var secondBossHealthTxt = null; var inSecondBossPhase = false; var secondBossDamageBalls = []; var secondBossDamageBallSpawnTicks = 0; function startChasePhase() { inChasePhase = true; // Remove all enemies for (var i = 0; i < enemyBalls.length; i++) { enemyBalls[i].destroy(); } enemyBalls = []; // Play monster music for boss phase LK.playMusic('monsterMusic'); // Spawn boss boss = new Boss(); game.addChild(boss); // Show boss health if (bossHealthTxt && bossHealthTxt.parent) bossHealthTxt.parent.removeChild(bossHealthTxt); bossHealth = 500; bossHealthTxt = new Text2("Boss: " + bossHealth, { size: 90, fill: 0xffe600, font: "Arial, Helvetica, sans-serif" }); // Place boss health bar below score, yellow color bossHealthTxt.anchor.set(0.5, 0); bossHealthTxt.x = 2048 / 2; bossHealthTxt.y = 120; // just below score LK.gui.top.addChild(bossHealthTxt); // Reset damage balls for (var j = 0; j < damageBalls.length; j++) { damageBalls[j].destroy(); } damageBalls = []; damageBallSpawnTicks = 0; } // Spawn a damage ball function spawnDamageBall() { var dball = new DamageBall(); damageBalls.push(dball); game.addChild(dball); } var playerBall; var enemyBalls = []; var lives = 3; var score = 0; var spawnInterval = 80; // Initial enemy spawn interval (ticks) var enemySpeed = 6; // Initial enemy speed var ticksSinceLastSpawn = 0; var dragNode = null; var lastGameOver = false; // --- Boss & Chase Phase --- var freezeEnemies = false; var freezeTicks = 0; var chasePhaseStarted = false; var boss = null; var bossHealth = 500; var bossHealthTxt = null; var damageBalls = []; var damageBallSpawnTicks = 0; var inChasePhase = false; // --- Tap to Start Overlay & Villain Dialog Control --- // (Removed tap-to-start overlay and tap logic. Game/dialog starts immediately.) var gameStarted = true; // Control for villain dialog per level (no tap-to-start) var waitingForTap = false; var pendingVillainText = null; var pendingVillainState = null; // Helper to show villain dialog (no tap-to-start overlay) function showVillainAndWait(text, nextState) { // Show villain dialog showVillainBubble(text); waitingForTap = false; pendingVillainText = text; pendingVillainState = nextState; gameStarted = true; } // --- UI Elements --- // Score Text var scoreTxt = new Text2('0', { size: 120, fill: 0xFFFFFF }); scoreTxt.anchor.set(0.5, 0); LK.gui.top.addChild(scoreTxt); // Lives Text var livesTxt = new Text2('❤ 3', { size: 90, fill: 0xFF5252 }); livesTxt.anchor.set(1, 0); LK.gui.topRight.addChild(livesTxt); // --- Player Ball Setup --- playerBall = new PlayerBall(); game.addChild(playerBall); // Start at bottom center, above the bottom edge playerBall.x = 2048 / 2; playerBall.y = 2732 - 220; // --- Drag Handling --- function handleMove(x, y, obj) { // Allow movement during first boss fight (chase phase), but block only during final sequence or second boss phase if (freezeEnemies && !inChasePhase && !inSecondBossPhase) return; // Prevent movement only in final sequence or second boss phase if (dragNode) { // Clamp to game area (keep ball fully visible) var r = playerBall.ball.width / 2; var minX = r, maxX = 2048 - r; var minY = r, maxY = 2732 - r; dragNode.x = Math.max(minX, Math.min(maxX, x)); dragNode.y = Math.max(minY, Math.min(maxY, y)); } } game.move = handleMove; game.down = function (x, y, obj) { // Only start drag if touch/click is on the player ball var dx = x - playerBall.x; var dy = y - playerBall.y; var dist = Math.sqrt(dx * dx + dy * dy); if (dist <= playerBall.ball.width / 2) { dragNode = playerBall; handleMove(x, y, obj); } }; game.up = function (x, y, obj) { dragNode = null; }; // --- Enemy Spawning --- function spawnEnemy() { var enemy = new EnemyBall(); // Random X within game area, keeping ball fully visible var r = enemy.ball.width / 2; enemy.x = Math.random() * (2048 - 2 * r) + r; enemy.y = -r - 10; // Start just above the screen enemy.speed = enemySpeed + Math.random() * 2; // Add a bit of speed variation enemyBalls.push(enemy); game.addChild(enemy); } // --- Story & Level State --- var villainState = 0; // 0: intro, 1: after 50, 2: after 100, 3: after 250 (win) var villainBubble = null; var villainTimeout = null; var villainShowTicks = 0; var villainShowDuration = 180; // 3 seconds at 60fps function showVillainBubble(text) { // Play monster entrance sound LK.getSound('monsterEntrance').play(); // Remove previous if exists if (villainBubble && villainBubble.parent) villainBubble.parent.removeChild(villainBubble); villainBubble = new Container(); // Villain face (unique villain face) var face = LK.getAsset('villainFace', { anchorX: 0.5, anchorY: 1 }); face.x = 0; face.y = 0; villainBubble.addChild(face); // Speech bubble (white rounded box) var bubble = new Container(); var bubbleShape = LK.getAsset('centerCircle', { anchorX: 0.5, anchorY: 0.5, scaleX: 2.5, scaleY: 1.2 }); bubbleShape.tint = 0xffffff; bubbleShape.alpha = 0.92; bubble.addChild(bubbleShape); // Text (English, white) var txt = new Text2(text, { size: 80, fill: 0xffffff, font: "Arial, Helvetica, sans-serif" }); txt.anchor.set(0.5, 0.5); bubble.addChild(txt); bubble.x = 0; bubble.y = -180; villainBubble.addChild(bubble); // Position villainBubble at top center, but lower for readability villainBubble.x = 2048 / 2; // Move villain dialog bubble further down so 'I DESTROYD WORLD' text does not cover the boss face villainBubble.y = 700; // moved down from 520 to 700 game.addChild(villainBubble); villainShowTicks = 0; } function removeVillainBubble() { if (villainBubble && villainBubble.parent) villainBubble.parent.removeChild(villainBubble); villainBubble = null; villainShowTicks = 0; } // --- Game Update Loop --- // --- SONA GÖTÜR BUTTON (for debug/shortcut to end) --- var sonaButton = new Container(); var sonaButtonBg = LK.getAsset('centerCircle', { anchorX: 0.5, anchorY: 0.5, scaleX: 2.2, scaleY: 1.1 }); sonaButtonBg.tint = 0x2196f3; sonaButtonBg.alpha = 0.85; sonaButton.addChild(sonaButtonBg); var sonaButtonTxt = new Text2("SONA GİT", { size: 80, fill: 0xffffff, font: "Arial, Helvetica, sans-serif" }); sonaButtonTxt.anchor.set(0.5, 0.5); sonaButton.addChild(sonaButtonTxt); // Place at bottom center, above the edge sonaButton.x = 2048 / 2; sonaButton.y = 2732 - 120; sonaButton.interactive = true; sonaButton.buttonMode = true; sonaButton.down = function (x, y, obj) { // Only allow if not already in end sequence if (!lastGameOver && !inSecondBossPhase) { // Remove button to prevent double trigger if (sonaButton && sonaButton.parent) sonaButton.parent.removeChild(sonaButton); // Instantly trigger the final sequence as if second boss was just defeated // Remove second boss and its health bar if present if (secondBoss && secondBoss.parent) secondBoss.parent.removeChild(secondBoss); secondBoss = null; if (secondBossHealthTxt && secondBossHealthTxt.parent) secondBossHealthTxt.parent.removeChild(secondBossHealthTxt); secondBossHealthTxt = null; // Remove all second boss damage balls for (var p = 0; p < secondBossDamageBalls.length; p++) { secondBossDamageBalls[p].destroy(); } secondBossDamageBalls = []; // Freeze all gameplay freezeEnemies = true; inSecondBossPhase = false; // Create bomb at player position, throw to player, then white flash var bomb = new Container(); var bombAsset = LK.getAsset('centerCircle', { anchorX: 0.5, anchorY: 0.5, scaleX: 1.5, scaleY: 1.5 }); bombAsset.tint = 0x222222; bomb.addChild(bombAsset); bomb.x = playerBall.x; bomb.y = playerBall.y - 300; game.addChild(bomb); // Animate bomb to player position tween(bomb, { x: playerBall.x, y: playerBall.y }, { duration: 700, easing: tween.cubicOut, onFinish: function onFinish() { // White flash LK.effects.flashScreen(0xffffff, 600); // Remove bomb if (bomb && bomb.parent) bomb.parent.removeChild(bomb); // After flash, dialog sequence LK.setTimeout(function () { // Freeze everything, remove all balls for (var i = 0; i < enemyBalls.length; i++) { enemyBalls[i].destroy(); } enemyBalls = []; for (var j = 0; j < damageBalls.length; j++) { damageBalls[j].destroy(); } damageBalls = []; for (var k = 0; k < secondBossDamageBalls.length; k++) { secondBossDamageBalls[k].destroy(); } secondBossDamageBalls = []; // Remove all UI if (bossHealthTxt && bossHealthTxt.parent) bossHealthTxt.parent.removeChild(bossHealthTxt); bossHealthTxt = null; if (secondBossHealthTxt && secondBossHealthTxt.parent) secondBossHealthTxt.parent.removeChild(secondBossHealthTxt); secondBossHealthTxt = null; // Dialog 1: "You thought I lost, didn't you?" showVillainAndWait("You thought I lost, didn't you?", 201); // After 5s, player responds LK.setTimeout(function () { removeVillainBubble(); LK.setTimeout(function () { // Player dialog var playerBubble = new Container(); var playerFace = LK.getAsset('playerBall', { anchorX: 0.5, anchorY: 1, scaleX: 1.2, scaleY: 1.2 }); playerFace.x = 0; playerFace.y = 0; playerBubble.addChild(playerFace); var bubble = new Container(); var bubbleShape = LK.getAsset('centerCircle', { anchorX: 0.5, anchorY: 0.5, scaleX: 2.2, scaleY: 1.1 }); bubbleShape.tint = 0xffffff; bubbleShape.alpha = 0.92; bubble.addChild(bubbleShape); var txt = new Text2("Yes, you lost!", { size: 80, fill: 0x2196f3, font: "Arial, Helvetica, sans-serif" }); txt.anchor.set(0.5, 0.5); bubble.addChild(txt); bubble.x = 0; bubble.y = -160; playerBubble.addChild(bubble); playerBubble.x = 2048 / 2; playerBubble.y = 2732 - 400; game.addChild(playerBubble); // After 3s, villain final dialog LK.setTimeout(function () { if (playerBubble && playerBubble.parent) playerBubble.parent.removeChild(playerBubble); showVillainAndWait("The world is already gone. Now it's your turn!", 202); // After 2s, bring back 1. boss and start alliance dialog and new villain fight LK.setTimeout(function () { removeVillainBubble(); // 1. Boss approaches player, but player says "Stop!" var allianceBoss = new Boss(); allianceBoss.x = 2048 / 2; allianceBoss.y = -allianceBoss.bossFace.height; game.addChild(allianceBoss); tween(allianceBoss, { x: playerBall.x, y: playerBall.y - 350 }, { duration: 1200, easing: tween.cubicIn, onFinish: function onFinish() { // Pause boss movement allianceBoss.update = function () {}; // Player dialog: "Stop!" var playerBubble = new Container(); var playerFace = LK.getAsset('playerBall', { anchorX: 0.5, anchorY: 1, scaleX: 1.2, scaleY: 1.2 }); playerFace.x = 0; playerFace.y = 0; playerBubble.addChild(playerFace); var bubble = new Container(); var bubbleShape = LK.getAsset('centerCircle', { anchorX: 0.5, anchorY: 0.5, scaleX: 2.2, scaleY: 1.1 }); bubbleShape.tint = 0xffffff; bubbleShape.alpha = 0.92; bubble.addChild(bubbleShape); var txt = new Text2("Stop!", { size: 80, fill: 0x2196f3, font: "Arial, Helvetica, sans-serif" }); txt.anchor.set(0.5, 0.5); bubble.addChild(txt); bubble.x = 0; bubble.y = -160; playerBubble.addChild(bubble); playerBubble.x = 2048 / 2; playerBubble.y = 2732 - 400; game.addChild(playerBubble); // Wait, then continue dialog sequence LK.setTimeout(function () { if (playerBubble && playerBubble.parent) playerBubble.parent.removeChild(playerBubble); // Boss dialog: "Why?" // --- Show bossFace (monster) instead of villainFace in dialog bubble --- if (villainBubble && villainBubble.parent) villainBubble.parent.removeChild(villainBubble); villainBubble = new Container(); var bossFaceImg = LK.getAsset('bossFace', { anchorX: 0.5, anchorY: 1, scaleX: 1.2, scaleY: 1.2 }); bossFaceImg.x = 0; bossFaceImg.y = 0; villainBubble.addChild(bossFaceImg); var bubble = new Container(); var bubbleShape = LK.getAsset('centerCircle', { anchorX: 0.5, anchorY: 0.5, scaleX: 2.2, scaleY: 1.1 }); bubbleShape.tint = 0xffffff; bubbleShape.alpha = 0.92; bubble.addChild(bubbleShape); var txt = new Text2("Why?", { size: 80, fill: 0x6b6e58, font: "Arial, Helvetica, sans-serif" }); txt.anchor.set(0.5, 0.5); bubble.addChild(txt); bubble.x = 0; bubble.y = -160; villainBubble.addChild(bubble); villainBubble.x = 2048 / 2; villainBubble.y = 2732 - 400; game.addChild(villainBubble); villainShowTicks = 0; LK.setTimeout(function () { removeVillainBubble(); // Player: "Let's be allies!" var playerBubble2 = new Container(); var playerFace2 = LK.getAsset('playerBall', { anchorX: 0.5, anchorY: 1, scaleX: 1.2, scaleY: 1.2 }); playerFace2.x = 0; playerFace2.y = 0; playerBubble2.addChild(playerFace2); var bubble2 = new Container(); var bubbleShape2 = LK.getAsset('centerCircle', { anchorX: 0.5, anchorY: 0.5, scaleX: 2.2, scaleY: 1.1 }); bubbleShape2.tint = 0xffffff; bubbleShape2.alpha = 0.92; bubble2.addChild(bubbleShape2); var txt2 = new Text2("Let's be allies!", { size: 80, fill: 0x2196f3, font: "Arial, Helvetica, sans-serif" }); txt2.anchor.set(0.5, 0.5); bubble2.addChild(txt2); bubble2.x = 0; bubble2.y = -160; playerBubble2.addChild(bubble2); playerBubble2.x = 2048 / 2; playerBubble2.y = 2732 - 400; game.addChild(playerBubble2); LK.setTimeout(function () { if (playerBubble2 && playerBubble2.parent) playerBubble2.parent.removeChild(playerBubble2); // Boss: "Why should I?" // --- Show bossFace (monster) instead of villainFace in dialog bubble --- if (villainBubble && villainBubble.parent) villainBubble.parent.removeChild(villainBubble); villainBubble = new Container(); var bossFaceImg2 = LK.getAsset('bossFace', { anchorX: 0.5, anchorY: 1, scaleX: 1.2, scaleY: 1.2 }); bossFaceImg2.x = 0; bossFaceImg2.y = 0; villainBubble.addChild(bossFaceImg2); var bubble2 = new Container(); var bubbleShape2 = LK.getAsset('centerCircle', { anchorX: 0.5, anchorY: 0.5, scaleX: 2.2, scaleY: 1.1 }); bubbleShape2.tint = 0xffffff; bubbleShape2.alpha = 0.92; bubble2.addChild(bubbleShape2); var txt2 = new Text2("Why should I?", { size: 80, fill: 0x6b6e58, font: "Arial, Helvetica, sans-serif" }); txt2.anchor.set(0.5, 0.5); bubble2.addChild(txt2); bubble2.x = 0; bubble2.y = -160; villainBubble.addChild(bubble2); villainBubble.x = 2048 / 2; villainBubble.y = 2732 - 400; game.addChild(villainBubble); villainShowTicks = 0; LK.setTimeout(function () { removeVillainBubble(); // Player: "If we join forces, we can rule this place!" var playerBubble3 = new Container(); var playerFace3 = LK.getAsset('playerBall', { anchorX: 0.5, anchorY: 1, scaleX: 1.2, scaleY: 1.2 }); playerFace3.x = 0; playerFace3.y = 0; playerBubble3.addChild(playerFace3); var bubble3 = new Container(); var bubbleShape3 = LK.getAsset('centerCircle', { anchorX: 0.5, anchorY: 0.5, scaleX: 2.2, scaleY: 1.1 }); bubbleShape3.tint = 0xffffff; bubbleShape3.alpha = 0.92; bubble3.addChild(bubbleShape3); var txt3 = new Text2("If we join forces, we can rule this place!", { size: 70, fill: 0x2196f3, font: "Arial, Helvetica, sans-serif" }); txt3.anchor.set(0.5, 0.5); bubble3.addChild(txt3); bubble3.x = 0; bubble3.y = -160; playerBubble3.addChild(bubble3); playerBubble3.x = 2048 / 2; playerBubble3.y = 2732 - 400; game.addChild(playerBubble3); LK.setTimeout(function () { if (playerBubble3 && playerBubble3.parent) playerBubble3.parent.removeChild(playerBubble3); // Boss: "I'm not sure... but okay!" // --- Show bossFace (monster) instead of villainFace in dialog bubble --- if (villainBubble && villainBubble.parent) villainBubble.parent.removeChild(villainBubble); villainBubble = new Container(); var bossFaceImg3 = LK.getAsset('bossFace', { anchorX: 0.5, anchorY: 1, scaleX: 1.2, scaleY: 1.2 }); bossFaceImg3.x = 0; bossFaceImg3.y = 0; villainBubble.addChild(bossFaceImg3); var bubble3 = new Container(); var bubbleShape3 = LK.getAsset('centerCircle', { anchorX: 0.5, anchorY: 0.5, scaleX: 2.2, scaleY: 1.1 }); bubbleShape3.tint = 0xffffff; bubbleShape3.alpha = 0.92; bubble3.addChild(bubbleShape3); var txt3 = new Text2("I'm not sure... but okay!", { size: 80, fill: 0x6b6e58, font: "Arial, Helvetica, sans-serif" }); txt3.anchor.set(0.5, 0.5); bubble3.addChild(txt3); bubble3.x = 0; bubble3.y = -160; villainBubble.addChild(bubble3); villainBubble.x = 2048 / 2; villainBubble.y = 2732 - 400; game.addChild(villainBubble); villainShowTicks = 0; LK.setTimeout(function () { removeVillainBubble(); // Enable movement again, start new villain fight freezeEnemies = false; // Animate boss to stand by player tween(allianceBoss, { x: playerBall.x + 320, y: playerBall.y }, { duration: 700, easing: tween.cubicOut, onFinish: function onFinish() { // Start new villain entrance // New villain appears at top var villain = new Container(); var villainFace = LK.getAsset('villainFace', { anchorX: 0.5, anchorY: 0.5, scaleX: 1.5, scaleY: 1.5 }); villain.addChild(villainFace); villain.x = 2048 / 2; villain.y = -villainFace.height; game.addChild(villain); // Animate villain entrance tween(villain, { y: 700 }, { duration: 900, easing: tween.cubicOut, onFinish: function onFinish() { // Play entrance sound LK.getSound('monsterEntrance').play(); // Show villain dialog showVillainAndWait("You can't stop me!", 304); LK.setTimeout(function () { removeVillainBubble(); // Start final fight: boss protects, player collects damage balls // Set up villain as secondBoss for damage secondBoss = villain; secondBossHealth = 1000; inSecondBossPhase = true; secondBossHealthTxt = new Text2("Villain: " + secondBossHealth, { size: 90, fill: 0xffe600, font: "Arial, Helvetica, sans-serif" }); secondBossHealthTxt.anchor.set(0.5, 0); secondBossHealthTxt.x = 2048 / 2; secondBossHealthTxt.y = 120; LK.gui.top.addChild(secondBossHealthTxt); secondBossDamageBalls = []; secondBossDamageBallSpawnTicks = 0; // Boss will move to block villain from player allianceBoss.update = function () { // Move between villain and player var px = playerBall.x; var py = playerBall.y; var vx = villain.x; var vy = villain.y; // Place boss between villain and player, closer to player var midX = px + (vx - px) * 0.35; var midY = py + (vy - py) * 0.35; // Smooth follow this.x += (midX - this.x) * 0.18; this.y += (midY - this.y) * 0.18; }; // Player can move again, boss will block villain // Villain will move toward player, but boss blocks villain.update = function () { // Move toward player, but stop if boss is in the way var dx = playerBall.x - this.x; var dy = playerBall.y - this.y; var dist = Math.sqrt(dx * dx + dy * dy); var bossDist = Math.sqrt((allianceBoss.x - this.x) * (allianceBoss.x - this.x) + (allianceBoss.y - this.y) * (allianceBoss.y - this.y)); if (bossDist < 220) { // Stop, boss is blocking return; } if (dist > 30) { this.x += dx / dist * 7; this.y += dy / dist * 5.5; } }; // All other logic (damage balls, collision, etc) handled in update loop }, 1800); } }); } }); }, 1800); }, 1800); }, 1800); }, 1800); }, 1800); }, 900); } }); }, 2000); }, 3000); }, 600); }, 5000); }, 700); } }); } }; // Add to game game.addChild(sonaButton); game.update = function () { // --- Villain Dialog Logic --- if (villainBubble) { villainShowTicks++; if (villainShowTicks > villainShowDuration) { removeVillainBubble(); } } // --- Level/Story Progression --- // At each story point, show villain and advance automatically if (villainState === 0 && LK.ticks < 10) { showVillainAndWait("I will destroy the world!", 1); villainState = 0.25; } if (villainState === 0.25) { // Remove villain bubble after duration, then advance if (!villainBubble) { villainState = 1; } } if (villainState === 1 && score >= 50) { showVillainAndWait("You're finished now!", 2); // Speed up balls spawnInterval = Math.max(30, spawnInterval - 18); enemySpeed += 3.5; villainState = 1.25; } if (villainState === 1.25) { if (!villainBubble) { villainState = 2; } } if (villainState === 2 && score >= 100) { // At the start of 'Enough!' dialog, stop all music and block bombs/music LK.stopMusic(); freezeEnemies = true; freezeTicks = LK.ticks; // Prevent bomb spawns and music during dialog showVillainAndWait("Enough!", 3); // Schedule villainEnoughMusic to start after dialog ends (5 seconds) LK.setTimeout(function () { // Only start music if still in correct state and dialog is gone if (villainState === 2.25 && !villainBubble) { LK.playMusic('villainEnoughMusic'); freezeEnemies = false; } }, 5000); villainState = 2.25; } if (villainState === 2.25) { // Wait for villain bubble to disappear, then allow bombs/music if not already done if (!villainBubble) { // If for some reason music didn't start (e.g. dialog skipped), start it now if (!LK.isMusicPlaying) { LK.playMusic('villainEnoughMusic'); } freezeEnemies = false; villainState = 3; } } // Stop villainEnoughMusic at score 250 if (villainState >= 2.25 && LK.isMusicPlaying && score >= 250) { LK.stopMusic(); } if (villainState === 3 && score >= 250) { showVillainAndWait("Stop right there!", 4); villainState = 3.25; // Freeze all enemies, but allow player to move for (var i = 0; i < enemyBalls.length; i++) { enemyBalls[i].frozen = true; } // Prevent new enemies from spawning freezeEnemies = true; freezeTicks = LK.ticks; chasePhaseStarted = false; } if (villainState === 3.25) { if (!villainBubble && !chasePhaseStarted) { // After villain dialog, wait 10 seconds, then start chase LK.setTimeout(function () { showVillainAndWait("Taste this!", 5); // After dialog, spawn boss and damage balls LK.setTimeout(function () { startChasePhase(); }, villainShowDuration * 16.7); // villainShowDuration is in ticks, convert to ms }, 10000); chasePhaseStarted = true; } // Do not advance villainState until chase phase is started } // --- Enemy Spawning --- if (!freezeEnemies && !inChasePhase) { ticksSinceLastSpawn++; if (ticksSinceLastSpawn >= spawnInterval) { spawnEnemy(); ticksSinceLastSpawn = 0; } } // --- Difficulty Scaling --- if (!freezeEnemies && !inChasePhase) { // Every 600 ticks (~10 seconds), increase difficulty if (LK.ticks % 600 === 0 && LK.ticks > 0) { if (spawnInterval > 30) spawnInterval -= 8; // Faster spawns if (enemySpeed < 22) enemySpeed += 1.2; // Faster enemies } } // --- Update Enemies --- for (var i = enemyBalls.length - 1; i >= 0; i--) { var enemy = enemyBalls[i]; if (!enemy.frozen) { enemy.update(); } // Check collision with player var collides = enemy.intersects(playerBall); if (collides && !enemy.frozen) { // Remove enemy enemy.destroy(); enemyBalls.splice(i, 1); // Lose a life lives--; livesTxt.setText('❤ ' + lives); // Flash player ball LK.effects.flashObject(playerBall, 0xff0000, 400); // Game over if no lives left if (lives <= 0 && !lastGameOver) { lastGameOver = true; LK.effects.flashScreen(0xff0000, 800); LK.showGameOver(); return; } continue; } // Remove if off screen if (enemy.y - enemy.ball.height / 2 > 2732 + 40) { enemy.destroy(); enemyBalls.splice(i, 1); // Score for dodging score++; scoreTxt.setText(score + ''); } } // --- Boss Chase Phase --- if (inChasePhase && boss) { boss.update(); // Check collision with player (lose instantly) if (boss.intersects(playerBall) && !lastGameOver) { lastGameOver = true; LK.effects.flashScreen(0xff0000, 800); LK.showGameOver(); return; } // Update damage balls var _loop = function _loop() { dball = damageBalls[j]; dball.update(); // If player collects damage ball if (dball.intersects(playerBall)) { // Remove damage ball dball.destroy(); damageBalls.splice(j, 1); // Deal 20 damage to boss bossHealth -= 20; if (bossHealth < 0) bossHealth = 0; if (bossHealthTxt) bossHealthTxt.setText("Boss: " + bossHealth); // Flash boss LK.effects.flashObject(boss, 0xffe600, 400); // If boss defeated, trigger final sequence (skip second boss phase) if (bossHealth <= 0 && !inSecondBossPhase) { // Helper to show instruction var showInstructionBubble = function showInstructionBubble() { if (instructionBubble && instructionBubble.parent) instructionBubble.parent.removeChild(instructionBubble); instructionBubble = new Container(); var bubbleShape = LK.getAsset('centerCircle', { anchorX: 0.5, anchorY: 0.5, scaleX: 2.5, scaleY: 1.2 }); bubbleShape.tint = 0xffffff; bubbleShape.alpha = 0.92; instructionBubble.addChild(bubbleShape); var txt = new Text2("Canavara bomba atmak için ekrana 2 kere hızlıca tıkla!", { size: 80, fill: 0x222222, font: "Arial, Helvetica, sans-serif" }); txt.anchor.set(0.5, 0.5); instructionBubble.addChild(txt); instructionBubble.x = 2048 / 2; instructionBubble.y = 600; game.addChild(instructionBubble); }; // Helper to remove instruction var removeInstructionBubble = function removeInstructionBubble() { if (instructionBubble && instructionBubble.parent) instructionBubble.parent.removeChild(instructionBubble); instructionBubble = null; }; // Set up tap handler for double-tap // Stop monster music as boss is defeated LK.stopMusic(); // Remove first boss and health bar if (boss && boss.parent) boss.parent.removeChild(boss); boss = null; if (bossHealthTxt && bossHealthTxt.parent) bossHealthTxt.parent.removeChild(bossHealthTxt); bossHealthTxt = null; // Remove all damage balls for (k = 0; k < damageBalls.length; k++) { damageBalls[k].destroy(); } damageBalls = []; inChasePhase = false; // --- NEW: Final sequence (monster approaches, double-tap to throw bomb, villain taunt) --- freezeEnemies = true; inSecondBossPhase = false; // Remove all balls and UI for (i = 0; i < enemyBalls.length; i++) { enemyBalls[i].destroy(); } enemyBalls = []; for (j = 0; j < damageBalls.length; j++) { damageBalls[j].destroy(); } damageBalls = []; if (bossHealthTxt && bossHealthTxt.parent) bossHealthTxt.parent.removeChild(bossHealthTxt); bossHealthTxt = null; // Monster approaches from top finalMonster = new Boss(); finalMonster.x = 2048 / 2; finalMonster.y = -finalMonster.bossFace.height; finalMonster.speed = 12; finalMonster.targetX = playerBall.x; finalMonster.targetY = playerBall.y - 400; game.addChild(finalMonster); // Show instruction 3 seconds before monster reaches player instructionBubble = null; monsterApproachTicks = 0; doubleTapCount = 0; lastTapTime = 0; bombThrown = false; originalDown = game.down; game.down = function (x, y, obj) { var now = Date.now(); if (!bombThrown) { if (now - lastTapTime < 400) { doubleTapCount++; } else { doubleTapCount = 1; } lastTapTime = now; if (doubleTapCount >= 2) { // Throw bomb at monster bombThrown = true; removeInstructionBubble(); // Create bomb at player position, throw to monster, then white flash var bomb = new Container(); var bombAsset = LK.getAsset('centerCircle', { anchorX: 0.5, anchorY: 0.5, scaleX: 1.5, scaleY: 1.5 }); bombAsset.tint = 0x222222; bomb.addChild(bombAsset); bomb.x = playerBall.x; bomb.y = playerBall.y - 300; game.addChild(bomb); // Animate bomb to monster position tween(bomb, { x: finalMonster.x, y: finalMonster.y }, { duration: 700, easing: tween.cubicOut, onFinish: function onFinish() { // White flash LK.effects.flashScreen(0xffffff, 600); // Remove bomb and monster if (bomb && bomb.parent) bomb.parent.removeChild(bomb); if (finalMonster && finalMonster.parent) finalMonster.parent.removeChild(finalMonster); // After flash, villain appears and taunts LK.setTimeout(function () { // Villain appears at top var villain = new Container(); var villainFace = LK.getAsset('villainFace', { anchorX: 0.5, anchorY: 0.5, scaleX: 1.5, scaleY: 1.5 }); villain.addChild(villainFace); villain.x = 2048 / 2; villain.y = -villainFace.height; game.addChild(villain); // Animate villain entrance tween(villain, { y: 700 }, { duration: 900, easing: tween.cubicOut, onFinish: function onFinish() { // Play entrance sound LK.getSound('monsterEntrance').play(); // Show villain dialog showVillainAndWait("You can't stop me!", 304); LK.setTimeout(function () { removeVillainBubble(); // Show win after short delay LK.setTimeout(function () { LK.showYouWin(); }, 1200); }, 2200); } }); }, 600); } }); } } // Allow drag if needed if (originalDown) originalDown(x, y, obj); }; // Final monster update loop finalMonster.update = function () { // Move monster toward target if (this.y < this.targetY) { this.y += 18; if (this.y > this.targetY) this.y = this.targetY; } else { // Move closer to player var dx = playerBall.x - this.x; var dy = playerBall.y - this.y; var dist = Math.sqrt(dx * dx + dy * dy); if (dist > 10) { this.x += dx / dist * this.speed; this.y += dy / dist * this.speed * 0.7; } } // Show instruction 3 seconds before monster reaches player monsterApproachTicks++; if (monsterApproachTicks === 60) { // Estimate 3 seconds before reaching player showInstructionBubble(); } // If monster reaches player and bomb not thrown, game over if (!bombThrown && this.intersects(playerBall)) { removeInstructionBubble(); if (finalMonster && finalMonster.parent) finalMonster.parent.removeChild(finalMonster); lastGameOver = true; LK.effects.flashScreen(0xff0000, 800); LK.showGameOver(); } }; // Add update to game loop oldUpdate = game.update; game.update = function () { if (finalMonster && finalMonster.parent) { finalMonster.update(); } if (oldUpdate) oldUpdate(); }; return { v: void 0 }; } } // Remove if off screen if (dball.y > 2732 + 80) { dball.destroy(); damageBalls.splice(j, 1); } }, dball, k, i, j, finalMonster, instructionBubble, monsterApproachTicks, doubleTapCount, lastTapTime, bombThrown, originalDown, oldUpdate, _ret; for (var j = damageBalls.length - 1; j >= 0; j--) { _ret = _loop(); if (_ret) return _ret.v; } // Spawn damage balls every 90 ticks damageBallSpawnTicks++; if (damageBallSpawnTicks >= 90) { spawnDamageBall(); damageBallSpawnTicks = 0; } } // --- Second Boss Phase --- if (inSecondBossPhase && secondBoss) { secondBoss.update(); // If villain collides with player, game over if (secondBoss.intersects(playerBall) && !lastGameOver) { lastGameOver = true; LK.effects.flashScreen(0xff0000, 800); LK.showGameOver(); return; } // Update second boss damage balls for (var n = secondBossDamageBalls.length - 1; n >= 0; n--) { var sdball = secondBossDamageBalls[n]; sdball.update(); // If player collects damage ball if (sdball.intersects(playerBall)) { sdball.destroy(); secondBossDamageBalls.splice(n, 1); // Deal 50 damage to second boss secondBossHealth -= 50; if (secondBossHealth < 0) secondBossHealth = 0; if (secondBossHealthTxt) secondBossHealthTxt.setText("Villain: " + secondBossHealth); LK.effects.flashObject(secondBoss, 0xffe600, 400); // If second boss defeated if (secondBossHealth <= 0 && !lastGameOver) { lastGameOver = true; // Boss explosion effect if (secondBoss && secondBoss.parent) { // Create a quick yellow flash and scale up for explosion tween(secondBoss, { scaleX: 3.5, scaleY: 3.5, alpha: 0 }, { duration: 700, easing: tween.cubicOut }); LK.effects.flashObject(secondBoss, 0xffe600, 400); LK.setTimeout(function () { if (secondBoss && secondBoss.parent) secondBoss.parent.removeChild(secondBoss); }, 700); } else if (secondBoss && !secondBoss.parent) { // fallback secondBoss = null; } if (secondBossHealthTxt && secondBossHealthTxt.parent) secondBossHealthTxt.parent.removeChild(secondBossHealthTxt); // Remove all second boss damage balls for (var p = 0; p < secondBossDamageBalls.length; p++) { secondBossDamageBalls[p].destroy(); } secondBossDamageBalls = []; // --- NEW: Second boss throws a bomb, screen flashes white, dialog sequence, then win --- // Freeze all gameplay freezeEnemies = true; inSecondBossPhase = false; // Create bomb at boss position, throw to player, then white flash var bomb = new Container(); var bombAsset = LK.getAsset('centerCircle', { anchorX: 0.5, anchorY: 0.5, scaleX: 1.5, scaleY: 1.5 }); bombAsset.tint = 0x222222; bomb.addChild(bombAsset); bomb.x = secondBoss && secondBoss.x ? secondBoss.x : 2048 / 2; bomb.y = secondBoss && secondBoss.y ? secondBoss.y : 700; game.addChild(bomb); // Animate bomb to player position tween(bomb, { x: playerBall.x, y: playerBall.y }, { duration: 700, easing: tween.cubicOut, onFinish: function onFinish() { // White flash LK.effects.flashScreen(0xffffff, 600); // Remove bomb if (bomb && bomb.parent) bomb.parent.removeChild(bomb); // After flash, dialog sequence LK.setTimeout(function () { // Freeze everything, remove all balls for (var i = 0; i < enemyBalls.length; i++) { enemyBalls[i].destroy(); } enemyBalls = []; for (var j = 0; j < damageBalls.length; j++) { damageBalls[j].destroy(); } damageBalls = []; for (var k = 0; k < secondBossDamageBalls.length; k++) { secondBossDamageBalls[k].destroy(); } secondBossDamageBalls = []; // Remove all UI if (bossHealthTxt && bossHealthTxt.parent) bossHealthTxt.parent.removeChild(bossHealthTxt); bossHealthTxt = null; if (secondBossHealthTxt && secondBossHealthTxt.parent) secondBossHealthTxt.parent.removeChild(secondBossHealthTxt); secondBossHealthTxt = null; // Dialog 1: "You thought I lost, didn't you?" showVillainAndWait("You thought I lost, didn't you?", 201); // After 5s, player responds LK.setTimeout(function () { removeVillainBubble(); LK.setTimeout(function () { // Player dialog var playerBubble = new Container(); var playerFace = LK.getAsset('playerBall', { anchorX: 0.5, anchorY: 1, scaleX: 1.2, scaleY: 1.2 }); playerFace.x = 0; playerFace.y = 0; playerBubble.addChild(playerFace); var bubble = new Container(); var bubbleShape = LK.getAsset('centerCircle', { anchorX: 0.5, anchorY: 0.5, scaleX: 2.2, scaleY: 1.1 }); bubbleShape.tint = 0xffffff; bubbleShape.alpha = 0.92; bubble.addChild(bubbleShape); var txt = new Text2("Yes, you lost!", { size: 80, fill: 0x2196f3, font: "Arial, Helvetica, sans-serif" }); txt.anchor.set(0.5, 0.5); bubble.addChild(txt); bubble.x = 0; bubble.y = -160; playerBubble.addChild(bubble); playerBubble.x = 2048 / 2; playerBubble.y = 2732 - 400; game.addChild(playerBubble); // After 3s, villain final dialog LK.setTimeout(function () { if (playerBubble && playerBubble.parent) playerBubble.parent.removeChild(playerBubble); showVillainAndWait("The world is already gone. Now it's your turn!", 202); // After 4s, show win LK.setTimeout(function () { removeVillainBubble(); LK.setTimeout(function () { LK.showYouWin(); }, 800); }, 4000); }, 3000); }, 600); }, 5000); }, 700); } }); return; } } // Remove if off screen if (sdball.y > 2732 + 80) { sdball.destroy(); secondBossDamageBalls.splice(n, 1); } } // Spawn second boss damage balls every 60 ticks (faster) secondBossDamageBallSpawnTicks++; if (secondBossDamageBallSpawnTicks >= 60) { var sdb = new DamageBall(); sdb.ball.tint = 0xffe600; secondBossDamageBalls.push(sdb); game.addChild(sdb); secondBossDamageBallSpawnTicks = 0; } } }; // --- Reset Handler (for when game restarts) --- game.on('destroy', function () { // Clean up for (var i = 0; i < enemyBalls.length; i++) { enemyBalls[i].destroy(); } enemyBalls = []; // Remove boss if exists if (boss && boss.parent) boss.parent.removeChild(boss); boss = null; // Remove boss health text if (bossHealthTxt && bossHealthTxt.parent) bossHealthTxt.parent.removeChild(bossHealthTxt); bossHealthTxt = null; // Remove damage balls for (var j = 0; j < damageBalls.length; j++) { damageBalls[j].destroy(); } damageBalls = []; inChasePhase = false; freezeEnemies = false; chasePhaseStarted = false; bossHealth = 500; damageBallSpawnTicks = 0; // Remove second boss and its UI if (secondBoss && secondBoss.parent) secondBoss.parent.removeChild(secondBoss); secondBoss = null; if (secondBossHealthTxt && secondBossHealthTxt.parent) secondBossHealthTxt.parent.removeChild(secondBossHealthTxt); secondBossHealthTxt = null; for (var q = 0; q < secondBossDamageBalls.length; q++) { secondBossDamageBalls[q].destroy(); } secondBossDamageBalls = []; inSecondBossPhase = false; secondBossHealth = 1000; secondBossDamageBallSpawnTicks = 0; lives = 3; score = 0; spawnInterval = 80; enemySpeed = 6; ticksSinceLastSpawn = 0; lastGameOver = false; scoreTxt.setText('0'); livesTxt.setText('❤ 3'); // Reset player position playerBall.x = 2048 / 2; playerBall.y = 2732 - 220; // Reset gameStarted and villain state gameStarted = true; waitingForTap = false; pendingVillainText = null; pendingVillainState = null; villainState = 0; removeVillainBubble(); });
===================================================================
--- original.js
+++ change.js
@@ -494,9 +494,44 @@
// Wait, then continue dialog sequence
LK.setTimeout(function () {
if (playerBubble && playerBubble.parent) playerBubble.parent.removeChild(playerBubble);
// Boss dialog: "Why?"
- showVillainAndWait("Why?", 301);
+ // --- Show bossFace (monster) instead of villainFace in dialog bubble ---
+ if (villainBubble && villainBubble.parent) villainBubble.parent.removeChild(villainBubble);
+ villainBubble = new Container();
+ var bossFaceImg = LK.getAsset('bossFace', {
+ anchorX: 0.5,
+ anchorY: 1,
+ scaleX: 1.2,
+ scaleY: 1.2
+ });
+ bossFaceImg.x = 0;
+ bossFaceImg.y = 0;
+ villainBubble.addChild(bossFaceImg);
+ var bubble = new Container();
+ var bubbleShape = LK.getAsset('centerCircle', {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ scaleX: 2.2,
+ scaleY: 1.1
+ });
+ bubbleShape.tint = 0xffffff;
+ bubbleShape.alpha = 0.92;
+ bubble.addChild(bubbleShape);
+ var txt = new Text2("Why?", {
+ size: 80,
+ fill: 0x6b6e58,
+ font: "Arial, Helvetica, sans-serif"
+ });
+ txt.anchor.set(0.5, 0.5);
+ bubble.addChild(txt);
+ bubble.x = 0;
+ bubble.y = -160;
+ villainBubble.addChild(bubble);
+ villainBubble.x = 2048 / 2;
+ villainBubble.y = 2732 - 400;
+ game.addChild(villainBubble);
+ villainShowTicks = 0;
LK.setTimeout(function () {
removeVillainBubble();
// Player: "Let's be allies!"
var playerBubble2 = new Container();
@@ -534,9 +569,44 @@
game.addChild(playerBubble2);
LK.setTimeout(function () {
if (playerBubble2 && playerBubble2.parent) playerBubble2.parent.removeChild(playerBubble2);
// Boss: "Why should I?"
- showVillainAndWait("Why should I?", 302);
+ // --- Show bossFace (monster) instead of villainFace in dialog bubble ---
+ if (villainBubble && villainBubble.parent) villainBubble.parent.removeChild(villainBubble);
+ villainBubble = new Container();
+ var bossFaceImg2 = LK.getAsset('bossFace', {
+ anchorX: 0.5,
+ anchorY: 1,
+ scaleX: 1.2,
+ scaleY: 1.2
+ });
+ bossFaceImg2.x = 0;
+ bossFaceImg2.y = 0;
+ villainBubble.addChild(bossFaceImg2);
+ var bubble2 = new Container();
+ var bubbleShape2 = LK.getAsset('centerCircle', {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ scaleX: 2.2,
+ scaleY: 1.1
+ });
+ bubbleShape2.tint = 0xffffff;
+ bubbleShape2.alpha = 0.92;
+ bubble2.addChild(bubbleShape2);
+ var txt2 = new Text2("Why should I?", {
+ size: 80,
+ fill: 0x6b6e58,
+ font: "Arial, Helvetica, sans-serif"
+ });
+ txt2.anchor.set(0.5, 0.5);
+ bubble2.addChild(txt2);
+ bubble2.x = 0;
+ bubble2.y = -160;
+ villainBubble.addChild(bubble2);
+ villainBubble.x = 2048 / 2;
+ villainBubble.y = 2732 - 400;
+ game.addChild(villainBubble);
+ villainShowTicks = 0;
LK.setTimeout(function () {
removeVillainBubble();
// Player: "If we join forces, we can rule this place!"
var playerBubble3 = new Container();
@@ -574,9 +644,44 @@
game.addChild(playerBubble3);
LK.setTimeout(function () {
if (playerBubble3 && playerBubble3.parent) playerBubble3.parent.removeChild(playerBubble3);
// Boss: "I'm not sure... but okay!"
- showVillainAndWait("I'm not sure... but okay!", 303);
+ // --- Show bossFace (monster) instead of villainFace in dialog bubble ---
+ if (villainBubble && villainBubble.parent) villainBubble.parent.removeChild(villainBubble);
+ villainBubble = new Container();
+ var bossFaceImg3 = LK.getAsset('bossFace', {
+ anchorX: 0.5,
+ anchorY: 1,
+ scaleX: 1.2,
+ scaleY: 1.2
+ });
+ bossFaceImg3.x = 0;
+ bossFaceImg3.y = 0;
+ villainBubble.addChild(bossFaceImg3);
+ var bubble3 = new Container();
+ var bubbleShape3 = LK.getAsset('centerCircle', {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ scaleX: 2.2,
+ scaleY: 1.1
+ });
+ bubbleShape3.tint = 0xffffff;
+ bubbleShape3.alpha = 0.92;
+ bubble3.addChild(bubbleShape3);
+ var txt3 = new Text2("I'm not sure... but okay!", {
+ size: 80,
+ fill: 0x6b6e58,
+ font: "Arial, Helvetica, sans-serif"
+ });
+ txt3.anchor.set(0.5, 0.5);
+ bubble3.addChild(txt3);
+ bubble3.x = 0;
+ bubble3.y = -160;
+ villainBubble.addChild(bubble3);
+ villainBubble.x = 2048 / 2;
+ villainBubble.y = 2732 - 400;
+ game.addChild(villainBubble);
+ villainShowTicks = 0;
LK.setTimeout(function () {
removeVillainBubble();
// Enable movement again, start new villain fight
freezeEnemies = false;