User prompt
Make the coins Bigger
User prompt
Make it where you can tap cat base infinitely until the games lags
User prompt
Make it where when catbase tapped it spawns another normalcat. Make it where if a user uses auto clicker it spawns cats SO fast that they are going everywhere.
User prompt
Make it where if you tap cat base you can spawn infinite cats
User prompt
Make it where if you tap the cat base it spawns another normalcat until it reaches 20 cats.
User prompt
Make it where if you click the cat base when a cat is already spawned it spawns another one it keeps spawning cats until it reaches 20 cats. Make it where if you click the Dog base when a dog is already spawned it spawns another one it keeps spawning dogs until it reaches 20 dogs. Make it where when a cat dies you lose all your money and your money goes to 0¢ but if a dog dies they drop a 50¢ coin there is a 5% chance you will get a 100¢ coin. A 100¢ coin gives the player 100¢ and if lucky it gives them a extra 20¢ when collecting a 100¢ coin.
User prompt
Make it where you can click the cat base until there is 20 cats in total. Make it where the dogs are same size as the cats but a small bit bigger and the dog base can be tapped until there is 20 dogs In Total. when the cats or dogs are spawned make them move towards each other when the cats touches the dog or the dog touches a cat they take damage and then one of them will die and the the dogs or cats keep moving towards the other teams base when the cat gets to dog base it stops at dog base and attacks once the dog base breaks it disappears and dogs can no longer spawn and the cats keep walking past and then cats win and dogs don’t. But if dogs get to cat base and breaks it then they walk past and dogs win cats don’t. Add a gui of a piggg bank which means that there is a number count of your money when you collect coins you get 50¢ you start with 50¢ and the more coins you get the more money you can get and the number count goes on infinity there is no limits of how much coins you can get. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Make it where you can click the cat base until there is 20 cats in total. Make it where the dogs are same size as the cats but a small bit bigger and the dog base can be tapped until there is 20 dogs In Total. when the cats or dogs are spawned make them move towards each other when the cats touches the dog or the dog touches a cat they take damage and then one of them will die and the the dogs or cats keep moving towards the other teams base when the cat gets to dog base it stops at dog base and attacks once the dog base breaks it disappears and dogs can no longer spawn and the cats keep walking past and then cats win and dogs don’t. But if dogs get to cat base and breaks it then they walk past and dogs win cats don’t. Add a gui of a piggg bank which means that there is a number count of your money when you collect coins you get 50¢ you start with 50¢ and the more coins you get the more money you can get and the number count goes on infinity there is no limits of how much coins you can get. ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Make it where the chance of getting a cat in a lambo is lower then the chance of getting the ultra super duper strong dog.
Code edit (1 edits merged)
Please save this source code
User prompt
Dogs vs Cats: Base Battle
Initial prompt
Make a game where there is a dog base and a cat base when you click on it it spawns its random cat if clicked on cat base if clicked on dog base it spawns a random dog if you are sooooo lucky the player will get a golden ultra strong dog that can instantly kill cats but if at least 9 cats attack at once the dog dies and drops 900¢ coins in the top left corner of the screen there is the amount of money you start with 50¢ when you have 50¢ you get to be able to spawn 20 max dogs and cats if you try to spawn more then 20 cats a message in the middle of the screen says “too many cats spawned” but if you try to spawn more then 20 dogs a message in the middle of the screen says “too many dogs spawned” and if you are super duper lucky the player can get a cat in a lambo it can kill 1 dog at once and it has a cool down and can’t move for 2 seconds and then it can and keep running over dogs 1 by 1 but it has a cooldown of 2 seconds and if the players finger or mouse pointer clicks the coin the amount of money goes up it can go up till 10000000000000000000000000000000000000000000000000000000000000000000000000000¢
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); /**** * Classes ****/ 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; } // Priority 1: Attack nearby dogs 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 there's a nearby dog, engage in combat if (nearestDog && nearestDistance < 200) { 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; if (self.isLambo) { self.lastMoveTime = LK.ticks; } } // Attack if close enough if (distance < 50 && LK.ticks - self.lastAttackTime > 60) { self.attack(nearestDog); self.lastAttackTime = LK.ticks; } } else if (dogBase && !dogBase.destroyed) { // Priority 2: Move towards dog base if no dogs nearby var dx = dogBase.x - self.x; var dy = dogBase.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; if (self.isLambo) { self.lastMoveTime = LK.ticks; } } else { // Attack the base if (LK.ticks - self.lastAttackTime > 60) { self.attackBase(dogBase); self.lastAttackTime = LK.ticks; } } } else { // Priority 3: Move past destroyed base (cats win) self.x += self.speed; } }; self.attack = function (dog) { if (self.isLambo) { // Lambo cats can kill any dog self.killDog(dog); } else { // Check for group attack on golden dogs if (dog.isGolden) { var nearbyCats = self.countNearbyCats(); if (nearbyCats >= 9) { self.killDog(dog); } } else { dog.takeDamage(1); } } LK.getSound('battle').play(); }; self.attackBase = function (base) { if (base && !base.destroyed) { base.health -= 1; if (base.health <= 0) { base.destroyed = true; base.alpha = 0.3; showMessage('Cats Win!'); tween(base, { scaleX: 0, scaleY: 0 }, { duration: 1000 }); } 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) { var dogIndex = dogs.indexOf(dog); if (dogIndex > -1) { dogs.splice(dogIndex, 1); dog.destroy(); } }; self.takeDamage = function (damage) { self.health -= damage; if (self.health <= 0) { self.die(); } }; self.die = function () { var catIndex = cats.indexOf(self); if (catIndex > -1) { cats.splice(catIndex, 1); } self.destroy(); }; return self; }); var Coin = Container.expand(function () { var self = Container.call(this); self.value = 50; var coinGraphics = self.attachAsset('coin', { anchorX: 0.5, anchorY: 0.5 }); self.down = function (x, y, obj) { // Collect coin playerMoney += self.value; 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 () { // Priority 1: Attack nearby cats var nearestCat = null; var nearestDistance = Infinity; 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; nearestCat = cat; } } // If there's a nearby cat, engage in combat if (nearestCat && nearestDistance < 200) { 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 (catBase && !catBase.destroyed) { // Priority 2: Move towards cat base if no cats nearby var dx = catBase.x - self.x; var dy = catBase.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 { // Attack the base if (LK.ticks - self.lastAttackTime > 60) { self.attackBase(catBase); self.lastAttackTime = LK.ticks; } } } else { // Priority 3: Move past destroyed base (dogs win) self.x += self.speed; } }; self.attack = function (cat) { if (self.isGolden) { // Golden dogs instantly kill cats self.killCat(cat); } else { // Normal combat cat.takeDamage(1); } LK.getSound('battle').play(); }; self.attackBase = function (base) { if (base && !base.destroyed) { base.health -= 1; if (base.health <= 0) { base.destroyed = true; base.alpha = 0.3; showMessage('Dogs Win!'); tween(base, { scaleX: 0, scaleY: 0 }, { duration: 1000 }); } LK.getSound('battle').play(); } }; self.killCat = function (cat) { var catIndex = cats.indexOf(cat); if (catIndex > -1) { cats.splice(catIndex, 1); cat.destroy(); } }; self.takeDamage = function (damage) { self.health -= damage; if (self.health <= 0) { self.die(); } }; self.die = function () { if (self.isGolden) { // Drop coins self.dropCoins(); } var dogIndex = dogs.indexOf(self); if (dogIndex > -1) { dogs.splice(dogIndex, 1); } self.destroy(); }; self.dropCoins = function () { // Drop 30 coins worth 30¢ each (900¢ total) for (var i = 0; i < 30; i++) { var coin = new Coin(); coin.x = self.x + (Math.random() - 0.5) * 200; coin.y = self.y + (Math.random() - 0.5) * 200; coin.value = 30; droppedCoins.push(coin); game.addChild(coin); } }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x228B22 }); /**** * Game Code ****/ var playerMoney = 50; var dogs = []; var cats = []; var droppedCoins = []; // Create piggy bank icon and money display var piggyBank = LK.getAsset('piggyBank', { anchorX: 0.5, anchorY: 0.5 }); LK.gui.topLeft.addChild(piggyBank); piggyBank.x = 150; piggyBank.y = 50; var moneyText = new Text2(playerMoney + '¢', { size: 50, fill: 0xFFFFFF }); moneyText.anchor.set(0, 0.5); LK.gui.topLeft.addChild(moneyText); moneyText.x = 180; moneyText.y = 50; // 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 var dogBase = game.addChild(LK.getAsset('dogBase', { anchorX: 0.5, anchorY: 0.5 })); dogBase.x = 400; dogBase.y = 1366; dogBase.health = 100; dogBase.destroyed = false; var catBase = game.addChild(LK.getAsset('catBase', { anchorX: 0.5, anchorY: 0.5 })); catBase.x = 1648; catBase.y = 1366; catBase.health = 100; catBase.destroyed = false; // Base click handlers dogBase.down = function (x, y, obj) { if (dogBase.destroyed) return; if (playerMoney >= 50) { if (dogs.length < 20) { playerMoney -= 50; moneyText.setText(playerMoney + '¢'); // 5% chance for golden dog var isGolden = Math.random() < 0.05; var newDog = new Dog(isGolden); newDog.x = dogBase.x + (Math.random() - 0.5) * 100; newDog.y = dogBase.y - 100; dogs.push(newDog); game.addChild(newDog); LK.getSound('spawn').play(); } else { showMessage('Too many dogs spawned!'); } } }; catBase.down = function (x, y, obj) { if (catBase.destroyed) return; if (playerMoney >= 50) { if (cats.length < 20) { playerMoney -= 50; moneyText.setText(playerMoney + '¢'); // 1% chance for lambo cat var isLambo = Math.random() < 0.01; var newCat = new Cat(isLambo); newCat.x = catBase.x + (Math.random() - 0.5) * 100; newCat.y = catBase.y - 100; cats.push(newCat); game.addChild(newCat); LK.getSound('spawn').play(); } else { showMessage('Too many cats spawned!'); } } }; 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; } };
===================================================================
--- original.js
+++ change.js
@@ -1,5 +1,10 @@
/****
+* Plugins
+****/
+var tween = LK.import("@upit/tween.v1");
+
+/****
* Classes
****/
var Cat = Container.expand(function (isLambo) {
var self = Container.call(this);
@@ -17,9 +22,9 @@
// Lambo cats have movement cooldown
if (self.isLambo && LK.ticks - self.lastMoveTime < 120) {
return;
}
- // Move towards nearest dog
+ // Priority 1: Attack nearby dogs
var nearestDog = null;
var nearestDistance = Infinity;
for (var i = 0; i < dogs.length; i++) {
var dog = dogs[i];
@@ -30,9 +35,10 @@
nearestDistance = distance;
nearestDog = dog;
}
}
- if (nearestDog) {
+ // If there's a nearby dog, engage in combat
+ if (nearestDog && nearestDistance < 200) {
var dx = nearestDog.x - self.x;
var dy = nearestDog.y - self.y;
var distance = Math.sqrt(dx * dx + dy * dy);
if (distance > 5) {
@@ -46,8 +52,29 @@
if (distance < 50 && LK.ticks - self.lastAttackTime > 60) {
self.attack(nearestDog);
self.lastAttackTime = LK.ticks;
}
+ } else if (dogBase && !dogBase.destroyed) {
+ // Priority 2: Move towards dog base if no dogs nearby
+ var dx = dogBase.x - self.x;
+ var dy = dogBase.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;
+ if (self.isLambo) {
+ self.lastMoveTime = LK.ticks;
+ }
+ } else {
+ // Attack the base
+ if (LK.ticks - self.lastAttackTime > 60) {
+ self.attackBase(dogBase);
+ self.lastAttackTime = LK.ticks;
+ }
+ }
+ } else {
+ // Priority 3: Move past destroyed base (cats win)
+ self.x += self.speed;
}
};
self.attack = function (dog) {
if (self.isLambo) {
@@ -65,8 +92,25 @@
}
}
LK.getSound('battle').play();
};
+ self.attackBase = function (base) {
+ if (base && !base.destroyed) {
+ base.health -= 1;
+ if (base.health <= 0) {
+ base.destroyed = true;
+ base.alpha = 0.3;
+ showMessage('Cats Win!');
+ tween(base, {
+ scaleX: 0,
+ scaleY: 0
+ }, {
+ duration: 1000
+ });
+ }
+ LK.getSound('battle').play();
+ }
+ };
self.countNearbyCats = function () {
var count = 0;
for (var i = 0; i < cats.length; i++) {
var cat = cats[i];
@@ -132,9 +176,9 @@
anchorX: 0.5,
anchorY: 0.5
});
self.update = function () {
- // Move towards nearest cat
+ // Priority 1: Attack nearby cats
var nearestCat = null;
var nearestDistance = Infinity;
for (var i = 0; i < cats.length; i++) {
var cat = cats[i];
@@ -145,9 +189,10 @@
nearestDistance = distance;
nearestCat = cat;
}
}
- if (nearestCat) {
+ // If there's a nearby cat, engage in combat
+ if (nearestCat && nearestDistance < 200) {
var dx = nearestCat.x - self.x;
var dy = nearestCat.y - self.y;
var distance = Math.sqrt(dx * dx + dy * dy);
if (distance > 5) {
@@ -158,8 +203,26 @@
if (distance < 50 && LK.ticks - self.lastAttackTime > 60) {
self.attack(nearestCat);
self.lastAttackTime = LK.ticks;
}
+ } else if (catBase && !catBase.destroyed) {
+ // Priority 2: Move towards cat base if no cats nearby
+ var dx = catBase.x - self.x;
+ var dy = catBase.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 {
+ // Attack the base
+ if (LK.ticks - self.lastAttackTime > 60) {
+ self.attackBase(catBase);
+ self.lastAttackTime = LK.ticks;
+ }
+ }
+ } else {
+ // Priority 3: Move past destroyed base (dogs win)
+ self.x += self.speed;
}
};
self.attack = function (cat) {
if (self.isGolden) {
@@ -170,8 +233,25 @@
cat.takeDamage(1);
}
LK.getSound('battle').play();
};
+ self.attackBase = function (base) {
+ if (base && !base.destroyed) {
+ base.health -= 1;
+ if (base.health <= 0) {
+ base.destroyed = true;
+ base.alpha = 0.3;
+ showMessage('Dogs Win!');
+ tween(base, {
+ scaleX: 0,
+ scaleY: 0
+ }, {
+ duration: 1000
+ });
+ }
+ LK.getSound('battle').play();
+ }
+ };
self.killCat = function (cat) {
var catIndex = cats.indexOf(cat);
if (catIndex > -1) {
cats.splice(catIndex, 1);
@@ -222,16 +302,24 @@
var playerMoney = 50;
var dogs = [];
var cats = [];
var droppedCoins = [];
-// Create money display
+// Create piggy bank icon and money display
+var piggyBank = LK.getAsset('piggyBank', {
+ anchorX: 0.5,
+ anchorY: 0.5
+});
+LK.gui.topLeft.addChild(piggyBank);
+piggyBank.x = 150;
+piggyBank.y = 50;
var moneyText = new Text2(playerMoney + '¢', {
- size: 60,
+ size: 50,
fill: 0xFFFFFF
});
-moneyText.anchor.set(0, 0);
+moneyText.anchor.set(0, 0.5);
LK.gui.topLeft.addChild(moneyText);
-moneyText.x = 120; // Offset from the left edge to avoid menu icon
+moneyText.x = 180;
+moneyText.y = 50;
// Create message text for feedback
var messageText = new Text2('', {
size: 50,
fill: 0xFF0000
@@ -250,16 +338,21 @@
anchorY: 0.5
}));
dogBase.x = 400;
dogBase.y = 1366;
+dogBase.health = 100;
+dogBase.destroyed = false;
var catBase = game.addChild(LK.getAsset('catBase', {
anchorX: 0.5,
anchorY: 0.5
}));
catBase.x = 1648;
catBase.y = 1366;
+catBase.health = 100;
+catBase.destroyed = false;
// Base click handlers
dogBase.down = function (x, y, obj) {
+ if (dogBase.destroyed) return;
if (playerMoney >= 50) {
if (dogs.length < 20) {
playerMoney -= 50;
moneyText.setText(playerMoney + '¢');
@@ -276,8 +369,9 @@
}
}
};
catBase.down = function (x, y, obj) {
+ if (catBase.destroyed) return;
if (playerMoney >= 50) {
if (cats.length < 20) {
playerMoney -= 50;
moneyText.setText(playerMoney + '¢');
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