User prompt
Make the dirt a itty bit bigger
User prompt
Make the dirt a tiny bit bigger
User prompt
Make the dirt a bit bigger
User prompt
Make the dirt a tiny bit bigger
User prompt
Make the dirt a bit less tall
User prompt
Make the dirt SOOOO wide and so taller that I looks like catbase and dogbase are on top of the dirt. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Make the dirt taller
User prompt
Add grounddirt to the bottom of the screen stretching across the screen from the bottom.
User prompt
Make it where if only if you hold down on dogbase it has a 20% chance to spawn Superstronggoldendogform or a 43% chance to spawn cuteuwudog and if catbase held down with 100 or more you can spawn irongolemhelper. Make it where irongolemhelpers have 243 health and there strength are 500. Make it where Superstronggoldendogform uses mind power to drag the irongolemhelper,cat or dog into the ground. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Make it where normal dogs do not spawn when catbase tapped or held down on
User prompt
Make it where if you have 909¢ or more you can spawn a cuteuwudog 46% chance or a Superstronggoldendogform 10% chance. Make it where behind the Superstronggoldendogformhealth is healthbarback which when he loses health by cats (20 damage) the number 399 above his head goes down by 20 when his health reaches 0 he dies. When a irongolemhelper hits Superstronggoldendogform it does a random 7-34 damage. When a dog accidentally hits Superstronggoldendogform he grabs the dog and shoves him the ground. If a irongolemhelper hits Superstronggoldendogform when irongolemhelper is at 3 health Superstronggoldendogform grabs irongolemhelper and tests him in the air the the iron golem falls back down then Superstronggoldendogform steps on irongolemhelper and irongolemhelper Drops ironingot when you click on it it gives player 34¢. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Make it where if you have 100¢ or more and you hold down on catbase it spawns a irongolemhelper
User prompt
Make it where if you have 30 cats you can deafest Superstronggoldendogform
User prompt
Make the Superstronggoldendogform do 1000 damage so it one shots catbase and even irongolemhelpers and cats but if you have 20 cats and at least 1 or 2 irongolemhelpers you can defeat it. Make the Superstronggoldendogform go a bit more up and a bit more to the right. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Make it where if you have 909¢ or more you can hold down on dogbase and spawn a Superstronggoldendogform 25% chance or a dog for 43% chance.
User prompt
Make it where if you have 909 or more coins you can hold down to spawn a Superstronggoldendogform 19% chance or there is a 45% chance it spawns a Dog if the Superstronggoldendogform dies it drops 201 50¢ coins or if your lucky it will give you 2 100¢ coins a 1 1¢ coin. Make it where if you get a 1¢ if gives the player 1¢ to there piggy bank. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Make it a 23% chance a Superstronggoldendogform spawns and Make golden dog spawn if a Superstronggoldendogform gets tired of getting attacked a bunch of times and make the Superstronggoldendogform a tiny bit bigger then irongolemhelper. And make the Superstronggoldendogformhealth appear above Superstronggoldendogform and it follows him where ever he moves. Make it where when ever Superstronggoldendogform spawns it plays bossmusic until Superstronggoldendogform dies. Make it where when Superstronggoldendogform dies it plays Superstronggoldendogformdie until he dies. Make the death animation. It goes to Superstronggoldendogformdie and he sinks into the ground then disappears and doesn’t come back. Make it where there can only be 1 Superstronggoldendogform at once at you have to wait 5 minutes for one to spawn again. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Make golden dog spawn if a Superstronggoldendogform gets tired of getting attacked a bunch of times and make the Superstronggoldendogform a tiny bit bigger then irongolemhelper. And make the Superstronggoldendogformhealth appear above Superstronggoldendogform and it follows him where ever he moves. Make it where when ever Superstronggoldendogform spawns it plays bossmusic until Superstronggoldendogform dies. Make it where when Superstronggoldendogform dies it plays Superstronggoldendogformdie until he dies. Make the death animation. It goes to Superstronggoldendogformdie and he sinks into the ground then disappears and doesn’t come back. Make it where there can only be 1 Superstronggoldendogform at once at you have to wait 5 minutes for one to spawn again. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Make the golden dog and normal dog as big as normalcat ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Make it where you need 100¢ to be able to spawn a irongolemhelper when holding down on catbase.
User prompt
Make it where when a cat kills a dog the dog dies and the cat doesn’t. Make it where if a dog kills a cat the cat dies and the dog doesn’t. Make it where if dog and a cat both kill each other at same time then it’s a 15% chance the cat will stay alive or a 18% chance the dog will stay alive. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Make it where if a cat kills a cat the cat doesn’t die and if a dog kills a cat the dog won’t die.
User prompt
Make it where if a dog kills a cat but dies the cat doesn’t die even if it turns red but if a cat dies and the cats kills the dog right after dying the dog won’t die. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Make it where the coins can’t attack so when the coin drops and hits a cat or dog they don’t die
User prompt
Make it where thy e game never spawns a irongolemhelper unless player holds down on the catbase for 1 second.
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); /**** * Classes ****/ var Base = Container.expand(function (type) { var self = Container.call(this); self.type = type; // 'dog' or 'cat' self.health = 100; self.maxHealth = 100; self.isDestroyed = false; var baseGraphics = self.attachAsset(type === 'dog' ? 'dogBase' : 'catBase', { anchorX: 0.5, anchorY: 0.5 }); self.takeDamage = function (damage) { self.health -= damage; if (self.health <= 0 && !self.isDestroyed) { self.destroy(); } }; self.destroy = function () { self.isDestroyed = true; // Fade out animation tween(self, { alpha: 0 }, { duration: 1000, onFinish: function onFinish() { if (self.type === 'dog') { gameState = 'catsWin'; showMessage('Cats Win!'); } else { gameState = 'dogsWin'; showMessage('Dogs Win!'); } } }); }; return self; }); var Cat = Container.expand(function (isLambo) { var self = Container.call(this); self.isLambo = isLambo || false; self.health = 1; self.speed = self.isLambo ? 3 : 1.5; self.target = null; self.lastAttackTime = 0; self.lastMoveTime = 0; var catGraphics = self.attachAsset(self.isLambo ? 'lamboCat' : 'normalCat', { anchorX: 0.5, anchorY: 0.5 }); self.update = function () { // Lambo cats have movement cooldown if (self.isLambo && LK.ticks - self.lastMoveTime < 120) { return; } // Normal cats no longer spawn irongolemhelper automatically // First check for nearby iron golems to avoid var avoidanceForceX = 0; var avoidanceForceY = 0; var avoidanceRadius = 150; // Distance to start avoiding iron golems for (var i = 0; i < ironGolems.length; i++) { var golem = ironGolems[i]; var dx = golem.x - self.x; var dy = golem.y - self.y; var distance = Math.sqrt(dx * dx + dy * dy); // If within avoidance radius, add avoidance force if (distance < avoidanceRadius && distance > 0) { var avoidanceStrength = (avoidanceRadius - distance) / avoidanceRadius; avoidanceForceX -= dx / distance * avoidanceStrength * 3; avoidanceForceY -= dy / distance * avoidanceStrength * 3; } } // Move towards nearest dog or dog base, but only if not avoiding iron golems var nearestTarget = null; var nearestDistance = Infinity; // Only look for dogs to attack, not iron golems for (var i = 0; i < dogs.length; i++) { var dog = dogs[i]; var dx = dog.x - self.x; var dy = dog.y - self.y; var distance = Math.sqrt(dx * dx + dy * dy); if (distance < nearestDistance) { nearestDistance = distance; nearestTarget = dog; } } var moveX = 0; var moveY = 0; if (nearestTarget) { // Move towards nearest dog var dx = nearestTarget.x - self.x; var dy = nearestTarget.y - self.y; var distance = Math.sqrt(dx * dx + dy * dy); if (distance > 5) { moveX = dx / distance * self.speed; moveY = dy / distance * self.speed; } // Attack if close enough if (distance < 50 && LK.ticks - self.lastAttackTime > 60) { self.attack(nearestTarget); self.lastAttackTime = LK.ticks; } } else if (dogBaseObj && !dogBaseObj.isDestroyed) { // Move towards dog base if no dogs present var dx = dogBaseObj.x - self.x; var dy = dogBaseObj.y - self.y; var distance = Math.sqrt(dx * dx + dy * dy); if (distance > 50) { moveX = dx / distance * self.speed; moveY = dy / distance * self.speed; } else if (LK.ticks - self.lastAttackTime > 60) { // Attack the base dogBaseObj.takeDamage(5); self.lastAttackTime = LK.ticks; LK.getSound('battle').play(); } } // Apply movement with avoidance force if (moveX !== 0 || moveY !== 0 || avoidanceForceX !== 0 || avoidanceForceY !== 0) { self.x += moveX + avoidanceForceX; self.y += moveY + avoidanceForceY; if (self.isLambo) { self.lastMoveTime = LK.ticks; } } }; self.attack = function (target) { if (target.takeDamageFromCat) { // Attacking an iron golem // 10% chance to accidentally hit the irongolemhelper if (Math.random() < 0.1) { // IronGolemHelper kills the cat target.killCat(self); return; } target.takeDamageFromCat(); } else { // Attacking a dog if (self.isLambo) { // Lambo cats can kill any dog self.killDog(target); } else { // Check for group attack on golden dogs if (target.isGolden) { var nearbyCats = self.countNearbyCats(); if (nearbyCats >= 9) { self.killDog(target); } } else { target.takeDamage(2); // Cats take 2 hits to kill dogs } } } LK.getSound('battle').play(); }; self.countNearbyCats = function () { var count = 0; for (var i = 0; i < cats.length; i++) { var cat = cats[i]; var dx = cat.x - self.x; var dy = cat.y - self.y; var distance = Math.sqrt(dx * dx + dy * dy); if (distance < 100) { count++; } } return count; }; self.killDog = function (dog) { if (dog.isDying) return; // Don't kill if dog is already dying // Check if dog is also trying to kill this cat at the same time var simultaneousKill = false; if (dog.target === self || dog.lastAttackTime === LK.ticks) { simultaneousKill = true; } if (simultaneousKill) { // Both are killing each other - apply survival chances var catSurvives = Math.random() < 0.15; // 15% chance cat survives var dogSurvives = Math.random() < 0.18; // 18% chance dog survives if (catSurvives && !dogSurvives) { // Only cat survives var dogIndex = dogs.indexOf(dog); if (dogIndex > -1) { dogs.splice(dogIndex, 1); dog.die(); } } else if (dogSurvives && !catSurvives) { // Only dog survives self.die(); } else if (!catSurvives && !dogSurvives) { // Both die var dogIndex = dogs.indexOf(dog); if (dogIndex > -1) { dogs.splice(dogIndex, 1); dog.die(); } self.die(); } // If both survive, neither dies } else { // Normal kill - only dog dies var dogIndex = dogs.indexOf(dog); if (dogIndex > -1) { dogs.splice(dogIndex, 1); dog.die(); } } }; self.killCat = function (cat) { if (cat.isDying) return; // Don't kill if cat is already dying // Cats don't die when killing other cats - do nothing }; self.takeDamage = function (damage) { self.health -= damage; if (self.health <= 0) { self.die(); } }; self.die = function (fromFallDamage) { if (self.isDying) return; // Prevent multiple death calls self.isDying = true; // Never lose money when cats die - keep it permanently moneyText.setText(playerMoney + '¢'); var catIndex = cats.indexOf(self); if (catIndex > -1) { cats.splice(catIndex, 1); } // Turn red then disappear for all death types tween(self, { tint: 0xff0000 }, { duration: 500, onFinish: function onFinish() { self.destroy(); } }); }; return self; }); var Coin = Container.expand(function () { var self = Container.call(this); self.value = 50; self.canAttack = false; // Coins cannot attack cats or dogs var coinGraphics = self.attachAsset('coin', { anchorX: 0.5, anchorY: 0.5, scaleX: 6, scaleY: 6 }); self.down = function (x, y, obj) { // Collect coin based on its value var coinValue = self.value; if (self.value === 100) { // 100¢ coin has chance for extra 20¢ if (Math.random() < 0.2) { // 20% chance for extra coinValue += 20; } } playerMoney += coinValue; moneyText.setText(playerMoney + '¢'); var coinIndex = droppedCoins.indexOf(self); if (coinIndex > -1) { droppedCoins.splice(coinIndex, 1); } LK.getSound('coinCollect').play(); self.destroy(); }; return self; }); var Dog = Container.expand(function (isGolden) { var self = Container.call(this); self.isGolden = isGolden || false; self.health = 1; self.speed = 2; self.target = null; self.lastAttackTime = 0; var dogGraphics = self.attachAsset(self.isGolden ? 'goldenDog' : 'normalDog', { anchorX: 0.5, anchorY: 0.5 }); self.update = function () { // Move towards nearest cat, iron golem, or cat base var nearestTarget = null; var nearestDistance = Infinity; // Check cats for (var i = 0; i < cats.length; i++) { var cat = cats[i]; var dx = cat.x - self.x; var dy = cat.y - self.y; var distance = Math.sqrt(dx * dx + dy * dy); if (distance < nearestDistance) { nearestDistance = distance; nearestTarget = cat; } } // Check iron golems for (var i = 0; i < ironGolems.length; i++) { var golem = ironGolems[i]; var dx = golem.x - self.x; var dy = golem.y - self.y; var distance = Math.sqrt(dx * dx + dy * dy); if (distance < nearestDistance) { nearestDistance = distance; nearestTarget = golem; } } var nearestCat = nearestTarget; if (nearestCat) { // Move towards nearest cat var dx = nearestCat.x - self.x; var dy = nearestCat.y - self.y; var distance = Math.sqrt(dx * dx + dy * dy); if (distance > 5) { self.x += dx / distance * self.speed; self.y += dy / distance * self.speed; } // Attack if close enough if (distance < 50 && LK.ticks - self.lastAttackTime > 60) { self.attack(nearestCat); self.lastAttackTime = LK.ticks; } } else if (catBaseObj && !catBaseObj.isDestroyed) { // Move towards cat base if no cats present var dx = catBaseObj.x - self.x; var dy = catBaseObj.y - self.y; var distance = Math.sqrt(dx * dx + dy * dy); if (distance > 50) { self.x += dx / distance * self.speed; self.y += dy / distance * self.speed; } else if (LK.ticks - self.lastAttackTime > 60) { // Attack the base catBaseObj.takeDamage(5); self.lastAttackTime = LK.ticks; LK.getSound('battle').play(); } } }; self.attack = function (target) { if (target.takeDamageFromDog) { // Attacking an iron golem target.takeDamageFromDog(); } else { // Attacking a cat if (self.isGolden) { // Golden dogs instantly kill cats self.killCat(target); } else { // Dogs take 3 hits to kill cats target.takeDamage(3); } } LK.getSound('battle').play(); }; self.killCat = function (cat) { if (cat.isDying) return; // Don't kill if cat is already dying // Check if cat is also trying to kill this dog at the same time var simultaneousKill = false; if (cat.target === self || cat.lastAttackTime === LK.ticks) { simultaneousKill = true; } if (simultaneousKill) { // Both are killing each other - apply survival chances var catSurvives = Math.random() < 0.15; // 15% chance cat survives var dogSurvives = Math.random() < 0.18; // 18% chance dog survives if (catSurvives && !dogSurvives) { // Only cat survives self.die(); } else if (dogSurvives && !catSurvives) { // Only dog survives var catIndex = cats.indexOf(cat); if (catIndex > -1) { cats.splice(catIndex, 1); cat.die(); } } else if (!catSurvives && !dogSurvives) { // Both die var catIndex = cats.indexOf(cat); if (catIndex > -1) { cats.splice(catIndex, 1); cat.die(); } self.die(); } // If both survive, neither dies } else { // Normal kill - only cat dies var catIndex = cats.indexOf(cat); if (catIndex > -1) { cats.splice(catIndex, 1); cat.die(); } } }; self.takeDamage = function (damage) { self.health -= damage; if (self.health <= 0) { self.die(); } }; self.die = function () { if (self.isDying) return; // Prevent multiple death calls self.isDying = true; // All dogs drop coins when they die self.dropCoins(); var dogIndex = dogs.indexOf(self); if (dogIndex > -1) { dogs.splice(dogIndex, 1); } // Turn red then disappear tween(self, { tint: 0xff0000 }, { duration: 500, onFinish: function onFinish() { self.destroy(); } }); }; self.dropCoins = function () { // Drop single coin - 5% chance for 100¢ coin, otherwise 50¢ var coin = new Coin(); coin.x = self.x + (Math.random() - 0.5) * 100; coin.y = self.y + (Math.random() - 0.5) * 100; // 5% chance for 100¢ coin if (Math.random() < 0.05) { coin.value = 100; } else { coin.value = 50; } droppedCoins.push(coin); game.addChild(coin); }; return self; }); var IronGolemHelper = Container.expand(function () { var self = Container.call(this); self.health = 10; // Takes 23 hits from cats and 10 dogs to kill self.speed = 1; self.target = null; self.lastAttackTime = 0; self.hitsTakenFromCats = 0; self.hitsTakenFromDogs = 0; self.lastComfortCheck = 0; self.comfortThreshold = 5; // Gets uncomfortable with 5+ cats nearby var golemGraphics = self.attachAsset('Irongolemhelper', { anchorX: 0.5, anchorY: 0.5, scaleX: 4.0, scaleY: 4.0 }); self.update = function () { // Check comfort level every 60 ticks (1 second) if (LK.ticks - self.lastComfortCheck > 60) { self.checkComfortLevel(); self.lastComfortCheck = LK.ticks; } // Move towards nearest dog or dog base var nearestDog = null; var nearestDistance = Infinity; for (var i = 0; i < dogs.length; i++) { var dog = dogs[i]; var dx = dog.x - self.x; var dy = dog.y - self.y; var distance = Math.sqrt(dx * dx + dy * dy); if (distance < nearestDistance) { nearestDistance = distance; nearestDog = dog; } } if (nearestDog) { // Move towards nearest dog var dx = nearestDog.x - self.x; var dy = nearestDog.y - self.y; var distance = Math.sqrt(dx * dx + dy * dy); if (distance > 5) { self.x += dx / distance * self.speed; self.y += dy / distance * self.speed; } // Attack if close enough if (distance < 50 && LK.ticks - self.lastAttackTime > 60) { self.attack(nearestDog); self.lastAttackTime = LK.ticks; } } else if (dogBaseObj && !dogBaseObj.isDestroyed) { // Move towards dog base if no dogs present var dx = dogBaseObj.x - self.x; var dy = dogBaseObj.y - self.y; var distance = Math.sqrt(dx * dx + dy * dy); if (distance > 50) { self.x += dx / distance * self.speed; self.y += dy / distance * self.speed; } else if (LK.ticks - self.lastAttackTime > 60) { // Attack the base dogBaseObj.takeDamage(5); self.lastAttackTime = LK.ticks; LK.getSound('battle').play(); } } }; self.attack = function (dog) { // IronGolemHelper instantly kills dogs when touching them self.killDog(dog); LK.getSound('battle').play(); }; self.killDog = function (dog) { if (dog.isDying) return; // Don't kill if dog is already dying var dogIndex = dogs.indexOf(dog); if (dogIndex > -1) { dogs.splice(dogIndex, 1); dog.die(); } }; self.takeDamageFromCat = function () { self.hitsTakenFromCats++; if (self.hitsTakenFromCats >= 23) { self.die(); } }; self.takeDamageFromDog = function () { self.hitsTakenFromDogs++; if (self.hitsTakenFromDogs >= 10) { self.die(); } }; self.killCat = function (cat) { if (cat.isDying) return; // Don't kill if cat is already dying var catIndex = cats.indexOf(cat); if (catIndex > -1) { cats.splice(catIndex, 1); cat.die(); } }; self.checkComfortLevel = function () { // Count nearby cats within 200 pixel radius var nearbyCats = []; for (var i = 0; i < cats.length; i++) { var cat = cats[i]; var dx = cat.x - self.x; var dy = cat.y - self.y; var distance = Math.sqrt(dx * dx + dy * dy); if (distance < 200) { nearbyCats.push(cat); } } // If too many cats nearby, get uncomfortable and fling some if (nearbyCats.length >= self.comfortThreshold) { var catsToFling = Math.min(2, nearbyCats.length); // Fling up to 2 cats for (var j = 0; j < catsToFling; j++) { var victimCat = nearbyCats[j]; self.flingCat(victimCat); } } }; self.flingCat = function (cat) { // Store original position for fall back var originalY = cat.y; var flingHeight = -2000; // Fling SOOOOOOOOO high (2000 pixels up) var flingDirection = (Math.random() - 0.5) * 600; // Random horizontal fling // 25% chance to die immediately from iron golem fling if (Math.random() < 0.25) { cat.die(true); return; } // Fling cat up and sideways tween(cat, { x: cat.x + flingDirection, y: cat.y + flingHeight }, { duration: 1500, easing: tween.easeOut, onFinish: function onFinish() { // Stay in the air for 222ms before falling LK.setTimeout(function () { // Fall back down tween(cat, { y: originalY }, { duration: 1200, easing: tween.easeIn, onFinish: function onFinish() { // 25% chance to die from fall damage if (Math.random() < 0.25) { cat.die(true); } } }); }, 222); } }); }; self.die = function () { var golemIndex = ironGolems.indexOf(self); if (golemIndex > -1) { ironGolems.splice(golemIndex, 1); } // Turn red then disappear tween(self, { tint: 0xff0000 }, { duration: 500, onFinish: function onFinish() { self.destroy(); } }); }; return self; }); var Special100Coin = Container.expand(function () { var self = Container.call(this); self.value = 100; self.canAttack = false; var coinGraphics = self.attachAsset('100coin', { anchorX: 0.5, anchorY: 0.5, scaleX: 3, scaleY: 3 }); self.down = function (x, y, obj) { playerMoney += 100; moneyText.setText(playerMoney + '¢'); var coinIndex = droppedCoins.indexOf(self); if (coinIndex > -1) { droppedCoins.splice(coinIndex, 1); } LK.getSound('coinCollect').play(); self.destroy(); }; return self; }); var Special1Coin = Container.expand(function () { var self = Container.call(this); self.value = 1; self.canAttack = false; var coinGraphics = self.attachAsset('1coin', { anchorX: 0.5, anchorY: 0.5, scaleX: 2, scaleY: 2 }); self.down = function (x, y, obj) { playerMoney += 1; moneyText.setText(playerMoney + '¢'); var coinIndex = droppedCoins.indexOf(self); if (coinIndex > -1) { droppedCoins.splice(coinIndex, 1); } LK.getSound('coinCollect').play(); self.destroy(); }; return self; }); var Special50Coin = Container.expand(function () { var self = Container.call(this); self.value = 50; self.canAttack = false; var coinGraphics = self.attachAsset('50coin', { anchorX: 0.5, anchorY: 0.5, scaleX: 3, scaleY: 3 }); self.down = function (x, y, obj) { playerMoney += 50; moneyText.setText(playerMoney + '¢'); var coinIndex = droppedCoins.indexOf(self); if (coinIndex > -1) { droppedCoins.splice(coinIndex, 1); } LK.getSound('coinCollect').play(); self.destroy(); }; return self; }); var Superstronggoldendogform = Container.expand(function () { var self = Container.call(this); self.health = 1000; self.maxHealth = 1000; self.speed = 1.5; self.target = null; self.lastAttackTime = 0; self.hitsTakenFromCats = 0; self.hitsTakenFromDogs = 0; self.isDying = false; self.attackCount = 0; // Track how many times it's been attacked self.spawnGoldenDogsThreshold = 200; // Spawn golden dogs after 200 attacks var bossGraphics = self.attachAsset('Superstronggoldendogform', { anchorX: 0.5, anchorY: 0.5, scaleX: 6.0, // Slightly bigger than irongolemhelper (4.0) scaleY: 6.0 }); // Create health bar that follows the boss self.healthBar = LK.getAsset('Superstronggoldendogformhealth', { anchorX: 0.5, anchorY: 0.5, scaleX: 3.0, scaleY: 1.5 }); self.update = function () { // Update health bar position to follow boss self.healthBar.x = self.x; self.healthBar.y = self.y - 200; // Position above the boss // Update health bar visibility based on health percentage var healthPercent = self.health / self.maxHealth; self.healthBar.alpha = 0.7 + healthPercent * 0.3; // Fade as health decreases // Move towards nearest cat or cat base var nearestTarget = null; var nearestDistance = Infinity; // Check cats for (var i = 0; i < cats.length; i++) { var cat = cats[i]; var dx = cat.x - self.x; var dy = cat.y - self.y; var distance = Math.sqrt(dx * dx + dy * dy); if (distance < nearestDistance) { nearestDistance = distance; nearestTarget = cat; } } if (nearestTarget) { // Move towards nearest cat var dx = nearestTarget.x - self.x; var dy = nearestTarget.y - self.y; var distance = Math.sqrt(dx * dx + dy * dy); if (distance > 5) { self.x += dx / distance * self.speed; self.y += dy / distance * self.speed; } // Attack if close enough if (distance < 80 && LK.ticks - self.lastAttackTime > 30) { self.attack(nearestTarget); self.lastAttackTime = LK.ticks; } } else if (catBaseObj && !catBaseObj.isDestroyed) { // Move towards cat base if no cats present var dx = catBaseObj.x - self.x; var dy = catBaseObj.y - self.y; var distance = Math.sqrt(dx * dx + dy * dy); if (distance > 80) { self.x += dx / distance * self.speed; self.y += dy / distance * self.speed; } else if (LK.ticks - self.lastAttackTime > 30) { // Attack the base catBaseObj.takeDamage(20); self.lastAttackTime = LK.ticks; LK.getSound('battle').play(); } } }; self.attack = function (target) { // Instantly kill cats if (target.die) { var catIndex = cats.indexOf(target); if (catIndex > -1) { cats.splice(catIndex, 1); target.die(); } } LK.getSound('battle').play(); }; self.takeDamageFromCat = function () { self.health -= 1; self.hitsTakenFromCats++; self.attackCount++; // Check if tired of getting attacked (spawn golden dogs) if (self.attackCount >= self.spawnGoldenDogsThreshold) { self.spawnGoldenDogs(); self.attackCount = 0; // Reset counter } if (self.health <= 0) { self.die(); } }; self.takeDamageFromDog = function () { self.health -= 5; self.hitsTakenFromDogs++; self.attackCount++; // Check if tired of getting attacked (spawn golden dogs) if (self.attackCount >= self.spawnGoldenDogsThreshold) { self.spawnGoldenDogs(); self.attackCount = 0; // Reset counter } if (self.health <= 0) { self.die(); } }; self.spawnGoldenDogs = function () { // Spawn 3 golden dogs around the boss for (var i = 0; i < 3; i++) { var goldenDog = new Dog(true); var angle = i / 3 * Math.PI * 2; goldenDog.x = self.x + Math.cos(angle) * 150; goldenDog.y = self.y + Math.sin(angle) * 150; dogs.push(goldenDog); game.addChild(goldenDog); } LK.getSound('spawn').play(); }; self.dropSpecialCoins = function () { // Check for lucky drop (2 100¢ coins + 1 1¢ coin) if (Math.random() < 0.1) { // 10% chance for lucky drop // Drop 2 100¢ coins for (var i = 0; i < 2; i++) { var coin100 = new Special100Coin(); coin100.x = self.x + (Math.random() - 0.5) * 200; coin100.y = self.y + (Math.random() - 0.5) * 200; droppedCoins.push(coin100); game.addChild(coin100); } // Drop 1 1¢ coin var coin1 = new Special1Coin(); coin1.x = self.x + (Math.random() - 0.5) * 200; coin1.y = self.y + (Math.random() - 0.5) * 200; droppedCoins.push(coin1); game.addChild(coin1); } else { // Normal drop: 201 50¢ coins for (var i = 0; i < 201; i++) { var coin50 = new Special50Coin(); coin50.x = self.x + (Math.random() - 0.5) * 400; coin50.y = self.y + (Math.random() - 0.5) * 400; droppedCoins.push(coin50); game.addChild(coin50); } } }; self.die = function () { if (self.isDying) return; self.isDying = true; // Drop special coins before dying self.dropSpecialCoins(); // Stop boss music and play death music LK.stopMusic(); LK.playMusic('Superstronggoldendogformdie', { loop: false }); // Change to death sprite var deathGraphics = self.attachAsset('Superstronggoldendogformdie', { anchorX: 0.5, anchorY: 0.5, scaleX: 6.0, scaleY: 6.0 }); // Remove health bar if (self.healthBar) { self.healthBar.destroy(); } // Death animation: sink into ground and disappear tween(self, { y: self.y + 300, alpha: 0 }, { duration: 2000, easing: tween.easeIn, onFinish: function onFinish() { // Remove from array and destroy var bossIndex = superstrongBosses.indexOf(self); if (bossIndex > -1) { superstrongBosses.splice(bossIndex, 1); } self.destroy(); // Start 5-minute cooldown for next boss spawn lastBossSpawnTime = LK.ticks; } }); }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x228B22 }); /**** * Game Code ****/ var playerMoney = 50; var dogs = []; var cats = []; var droppedCoins = []; var ironGolems = []; var superstrongBosses = []; var lastBossSpawnTime = 0; var bossSpawnCooldown = 18000; // 5 minutes at 60 FPS (5 * 60 * 60) var gameState = 'playing'; // 'playing', 'dogsWin', 'catsWin' var dogBaseObj = null; var catBaseObj = null; // Create piggy bank GUI var piggyBank = LK.getAsset('coin', { anchorX: 0.5, anchorY: 0.5, scaleX: 2, scaleY: 2 }); LK.gui.topLeft.addChild(piggyBank); piggyBank.x = 80; piggyBank.y = 80; // Create money display next to piggy bank var moneyText = new Text2(playerMoney + '¢', { size: 60, fill: 0xFFFFFF }); moneyText.anchor.set(0, 0); LK.gui.topLeft.addChild(moneyText); moneyText.x = 120; // Offset from the left edge to avoid menu icon // Create message text for feedback var messageText = new Text2('', { size: 50, fill: 0xFF0000 }); messageText.anchor.set(0.5, 0); LK.gui.top.addChild(messageText); messageText.y = 100; var messageTimer = 0; function showMessage(text) { messageText.setText(text); messageTimer = 180; // Show for 3 seconds } // Create bases dogBaseObj = game.addChild(new Base('dog')); dogBaseObj.x = 400; dogBaseObj.y = 1366; catBaseObj = game.addChild(new Base('cat')); catBaseObj.x = 1648; catBaseObj.y = 1366; // Base click handlers dogBaseObj.down = function (x, y, obj) { if (gameState !== 'playing' || dogBaseObj.isDestroyed) return; // Start tracking hold dogBaseHoldStart = LK.ticks; dogBaseIsHolding = true; }; dogBaseObj.up = function (x, y, obj) { if (gameState !== 'playing' || dogBaseObj.isDestroyed) return; var holdDuration = LK.ticks - dogBaseHoldStart; dogBaseIsHolding = false; // If held for more than 1 second (60 ticks) and have 909¢ or more, try to spawn boss or dog if (holdDuration >= 60 && playerMoney >= 909) { // 25% chance for Superstronggoldendogform, 43% chance for Dog var spawnRoll = Math.random(); if (spawnRoll < 0.25 && superstrongBosses.length === 0) { // Spawn Superstronggoldendogform (25% chance) var newBoss = new Superstronggoldendogform(); newBoss.x = dogBaseObj.x + (Math.random() - 0.5) * 300; newBoss.y = dogBaseObj.y - 150 + (Math.random() - 0.5) * 150; superstrongBosses.push(newBoss); game.addChild(newBoss); game.addChild(newBoss.healthBar); LK.playMusic('Bossmusic'); LK.getSound('spawn').play(); } else if (spawnRoll < 0.68) { // Spawn Dog (43% chance - 0.25 + 0.43 = 0.68) var isGolden = Math.random() < 0.05; var newDog = new Dog(isGolden); newDog.x = dogBaseObj.x + (Math.random() - 0.5) * 300; newDog.y = dogBaseObj.y - 150 + (Math.random() - 0.5) * 150; dogs.push(newDog); game.addChild(newDog); LK.getSound('spawn').play(); } // No spawn for remaining 32% chance } else if (playerMoney >= 50) { // Short tap - spawn normal dog with existing 50¢ logic // Never deduct money - keep it permanently moneyText.setText(playerMoney + '¢'); // 5% chance for golden dog var isGolden = Math.random() < 0.05; var newDog = new Dog(isGolden); newDog.x = dogBaseObj.x + (Math.random() - 0.5) * 200; newDog.y = dogBaseObj.y - 100 + (Math.random() - 0.5) * 100; dogs.push(newDog); game.addChild(newDog); LK.getSound('spawn').play(); } }; // Track hold state for catBase var catBaseHoldStart = 0; var catBaseIsHolding = false; // Track hold state for dogBase var dogBaseHoldStart = 0; var dogBaseIsHolding = false; catBaseObj.down = function (x, y, obj) { if (gameState !== 'playing' || catBaseObj.isDestroyed) return; // Start tracking hold catBaseHoldStart = LK.ticks; catBaseIsHolding = true; }; catBaseObj.up = function (x, y, obj) { if (gameState !== 'playing' || catBaseObj.isDestroyed) return; var holdDuration = LK.ticks - catBaseHoldStart; catBaseIsHolding = false; // If held for more than 1 second (60 ticks) and have 909¢ or more, try to spawn boss or dog if (holdDuration >= 60 && playerMoney >= 909) { // 19% chance for Superstronggoldendogform, 45% chance for Dog var spawnRoll = Math.random(); if (spawnRoll < 0.19 && superstrongBosses.length === 0) { // Spawn Superstronggoldendogform (19% chance) var newBoss = new Superstronggoldendogform(); newBoss.x = catBaseObj.x + (Math.random() - 0.5) * 300; newBoss.y = catBaseObj.y - 150 + (Math.random() - 0.5) * 150; superstrongBosses.push(newBoss); game.addChild(newBoss); game.addChild(newBoss.healthBar); LK.playMusic('Bossmusic'); LK.getSound('spawn').play(); } else if (spawnRoll < 0.64) { // Spawn Dog (45% chance - 0.19 + 0.45 = 0.64) var isGolden = Math.random() < 0.05; var newDog = new Dog(isGolden); newDog.x = catBaseObj.x + (Math.random() - 0.5) * 300; newDog.y = catBaseObj.y - 150 + (Math.random() - 0.5) * 150; dogs.push(newDog); game.addChild(newDog); LK.getSound('spawn').play(); } // No spawn for remaining 36% chance } else if (holdDuration >= 60 && playerMoney >= 100) { // If held for more than 1 second (60 ticks) and have 100¢, spawn irongolemhelper var irongolem = new IronGolemHelper(); irongolem.x = catBaseObj.x + (Math.random() - 0.5) * 300; irongolem.y = catBaseObj.y - 150 + (Math.random() - 0.5) * 150; ironGolems.push(irongolem); game.addChild(irongolem); LK.getSound('spawn').play(); } else { // Short tap - spawn normal cat var newCat = new Cat(false); newCat.x = catBaseObj.x + (Math.random() - 0.5) * 200; newCat.y = catBaseObj.y - 100 + (Math.random() - 0.5) * 100; cats.push(newCat); game.addChild(newCat); // No automatic irongolemhelper spawning - only on 1 second hold // Check if cat spawned too close to any iron golem var tooCloseToGolem = false; for (var g = 0; g < ironGolems.length; g++) { var golem = ironGolems[g]; var dx = golem.x - newCat.x; var dy = golem.y - newCat.y; var distance = Math.sqrt(dx * dx + dy * dy); if (distance < 150) { // Within 150 pixels is "too close" // 5% chance iron golem will fling the cat if (Math.random() < 0.05) { golem.flingCat(newCat); } tooCloseToGolem = true; break; // Only need to check once } } LK.getSound('spawn').play(); } }; game.update = function () { // Update message timer if (messageTimer > 0) { messageTimer--; if (messageTimer <= 0) { messageText.setText(''); } } // Keep animals within bounds for (var i = 0; i < dogs.length; i++) { var dog = dogs[i]; if (dog.x < 0) dog.x = 0; if (dog.x > 2048) dog.x = 2048; if (dog.y < 0) dog.y = 0; if (dog.y > 2732) dog.y = 2732; } for (var i = 0; i < cats.length; i++) { var cat = cats[i]; if (cat.x < 0) cat.x = 0; if (cat.x > 2048) cat.x = 2048; if (cat.y < 0) cat.y = 0; if (cat.y > 2732) cat.y = 2732; } for (var i = 0; i < ironGolems.length; i++) { var golem = ironGolems[i]; if (golem.x < 0) golem.x = 0; if (golem.x > 2048) golem.x = 2048; if (golem.y < 0) golem.y = 0; if (golem.y > 2732) golem.y = 2732; } // Keep superstrongBosses within bounds for (var i = 0; i < superstrongBosses.length; i++) { var boss = superstrongBosses[i]; if (boss.x < 0) boss.x = 0; if (boss.x > 2048) boss.x = 2048; if (boss.y < 0) boss.y = 0; if (boss.y > 2732) boss.y = 2732; } // Boss spawn logic - only spawn if cooldown has passed and no boss exists if (superstrongBosses.length === 0 && LK.ticks - lastBossSpawnTime >= bossSpawnCooldown) { // Random chance to spawn boss (23% chance each frame after cooldown) if (Math.random() < 0.23) { var newBoss = new Superstronggoldendogform(); newBoss.x = 1024; // Center of screen horizontally newBoss.y = 1366; // Center of screen vertically superstrongBosses.push(newBoss); game.addChild(newBoss); // Add health bar to game game.addChild(newBoss.healthBar); // Play boss music LK.playMusic('Bossmusic'); } } };
===================================================================
--- original.js
+++ change.js
@@ -937,9 +937,43 @@
catBaseObj.y = 1366;
// Base click handlers
dogBaseObj.down = function (x, y, obj) {
if (gameState !== 'playing' || dogBaseObj.isDestroyed) return;
- if (playerMoney >= 50) {
+ // Start tracking hold
+ dogBaseHoldStart = LK.ticks;
+ dogBaseIsHolding = true;
+};
+dogBaseObj.up = function (x, y, obj) {
+ if (gameState !== 'playing' || dogBaseObj.isDestroyed) return;
+ var holdDuration = LK.ticks - dogBaseHoldStart;
+ dogBaseIsHolding = false;
+ // If held for more than 1 second (60 ticks) and have 909¢ or more, try to spawn boss or dog
+ if (holdDuration >= 60 && playerMoney >= 909) {
+ // 25% chance for Superstronggoldendogform, 43% chance for Dog
+ var spawnRoll = Math.random();
+ if (spawnRoll < 0.25 && superstrongBosses.length === 0) {
+ // Spawn Superstronggoldendogform (25% chance)
+ var newBoss = new Superstronggoldendogform();
+ newBoss.x = dogBaseObj.x + (Math.random() - 0.5) * 300;
+ newBoss.y = dogBaseObj.y - 150 + (Math.random() - 0.5) * 150;
+ superstrongBosses.push(newBoss);
+ game.addChild(newBoss);
+ game.addChild(newBoss.healthBar);
+ LK.playMusic('Bossmusic');
+ LK.getSound('spawn').play();
+ } else if (spawnRoll < 0.68) {
+ // Spawn Dog (43% chance - 0.25 + 0.43 = 0.68)
+ var isGolden = Math.random() < 0.05;
+ var newDog = new Dog(isGolden);
+ newDog.x = dogBaseObj.x + (Math.random() - 0.5) * 300;
+ newDog.y = dogBaseObj.y - 150 + (Math.random() - 0.5) * 150;
+ dogs.push(newDog);
+ game.addChild(newDog);
+ LK.getSound('spawn').play();
+ }
+ // No spawn for remaining 32% chance
+ } else if (playerMoney >= 50) {
+ // Short tap - spawn normal dog with existing 50¢ logic
// Never deduct money - keep it permanently
moneyText.setText(playerMoney + '¢');
// 5% chance for golden dog
var isGolden = Math.random() < 0.05;
@@ -953,8 +987,11 @@
};
// Track hold state for catBase
var catBaseHoldStart = 0;
var catBaseIsHolding = false;
+// Track hold state for dogBase
+var dogBaseHoldStart = 0;
+var dogBaseIsHolding = false;
catBaseObj.down = function (x, y, obj) {
if (gameState !== 'playing' || catBaseObj.isDestroyed) return;
// Start tracking hold
catBaseHoldStart = LK.ticks;
A white dog with black spots on him and one ear black and one ear blue. Make it a sitting dog with a heart grey hole in the middle of the body and make it SOOOO cute with big cute eyes with shines in them and make the dog facing right. Kinda 3d. Some Shadows.
A golden shining coin with the words “dogs vs cats coin” at the top and the coin says “50¢” . No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
Minecraft iron golem facing left with a pink flower on his forehead. Full body. 2d. Cool.
Golden dog with blue eyes that is SOO BUFF that he looks so cool and he scares everyone away. full body. Facing right. 2d.
Make a green health bar with words under it golden shiny letters saying “Superstronggoldendogform” and golden words on top saying “399HP”. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
A golden shining coin with the words “dogs vs cats coin” at the top and the coin says “100¢” . No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
Brown dog with a blue top hat. 🎩. In-Game asset. High contrast. No shadows. 2d.
Super buff Golden dog with a hand up laying falling in lava holding his hand out for help. full body. Facing right. 2d.
Make a white dog SOOOOOO CUTE. In-Game asset. 2d. High contrast. No shadows
A golden shining coin with the words “dogs vs cats coin” at the top and the coin says “1¢” . No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
No background Minecraft iron ingot
Dirt square
Line of grass. In-Game asset. 2d. High contrast. No shadows
Cloud. In-Game asset. 2d. High contrast. No shadows
A golden shining coin with the words “dogs vs cats coin” at the top and the coin says “3000¢” with a dark yellow line under. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
A super buff iron golem with super big muscles and that has a Minecraft iron sword in his hand.. In-Game asset. 2d. High contrast. No shadows