User prompt
Yanana 5 tane yumurta olsun 5 den fazla yumurta olursa altta doğru uzasın yan yana en fazla 5 tane yumurta konulabilir
User prompt
Bütün yumurtaları ayıralım üste normal yumurtalar altta altın yumurtalar olsun
User prompt
Yeni 2 adet yumurta ekle 1. Yumurta fiyat 10000000 ama tabi yumurta 10M yazsın altında fiyat olarak içinde 3 tane pet olsun 1. Pet çıkma orani yüzde 0.5 ismi king tıklama basına 10000 veriyor 2. Pet İsmi knight çıkma orani yüzde 5 tıklama basına 5000 score veriyor 3. Pet ismi Human çıkma oranı 94.5 ihtimalle çıkıyor ve tıklama basına 2500 veriyor 2. Yumurta aynı diyeriylr ama altın hali fiyat 20M yazsın yani 20000000 para ama 20M yazssın içindekiler petler herşey aynı yüzde çıkma olasılığı ayni ama petlerin tıklama basına verdiği score lar 2 katı king tıklama basına 20000 verio 2. Pet altın knight 10000 score veriyor tıklama basına 3. Pet altın human tıklama başına 5000 score veriyor
User prompt
Yeni 2 yumurta ekle 1. Yumurta dış gornuş mor olsun ve dışında kolları olsun Fiyat 1250000 içimdekileri 3 tane pet 1. Pet çıkma oranı yüzde 1 Pet adı Iron man tıklama basına 500 versin 2. Pet çıkma oranı yüzde 14 isimkaptan Amerika tıklama basına 300 veriyor 3. Pet çıkma orani yüzde 85 pet adı spiderman tıklama basına 250 veriyor 2. Fiyat 2500000 Yumurta altın mor yumurta yine ayni petler var ama petler tıklama basına verdiği puanlar 2x katlansın çıkma oranları aynı 1. Pet iron man tıklama basına 1000 puan veriyor 2. Pet kaptan Amerika tıklama basına 600 veriyor 3. Pet spiderman tıklama basına 500 veriyor
User prompt
Yeni 2 yumurtanın ekle 1.yumurta dışı görünüşü kırmızı dinazorumsu olsun Fiyat 50000 içimde yüzde 5 ihtimalle T-rex çıksın bir tanesi tıklama basına 100 score versin 2. Pet velector yüzde 25 ihtimalle çıksın tıklama basına 80 veriyor 3. Pet titana boğa yüzde 70 ihtimalle çıkıyor tıklama basına 50 veriyor 2. Yumurtada yine ayni petler ama altın hali dış gornuş ayni ama altın hali fiyat 100000 yüzde 5 ihtimalle altın T-rex tıklama basına 200 score versin yüzde 25 ihtimalle altın velector tıklama basına 160 score veriyor yüzde 70 ihtimalle altın titana boğa tıklama basına 100 score veriyor
User prompt
Yeni bir yumurta ekle yumurtanın dış gornuşumu yeşil olsun ve içinde cıkan petler dinozor yüzde 5 ihtimalle çıkıyor 1 tane her tıklama basına +30 score veriyor 2 tane olunca 60 score veriyor 3 tane olunca 90 score veriyor 2. Pet yeşil yumurtadan çıkan ayı yüzde 15 ihtimalle çıkar 1 tane +20 puan veriyor 2 tane 40 puan 3 tane 60 puan tıklama basına diyer pet yüzde 80 ihtimalle arı çıkıyor 1 tanesi +10 score veriyor 2 tanesi 20 score 3 tane 30 score veriyor tıklama basına ve bu yumurtanın fiyat 15000 2. Yumurta aynı ama altın hali ve petler 2 katta tıklama basına gelen puanları 2x artsın yüzde cıkma ihtimalleri aynı sadece tıklama basına gelen olanlar 2x artır örn ayı +40 puan veriyor dinozor tıklama basına +60 veriyor 1 tanesi 1 tane arı +20 score veriyor ve yumurta fiyatı 30000
User prompt
Delete tuşuna basınca direk silinmesin Delete tuşuna bastıktan sonra pet üstüne tıklıyalım sonra Settar Delete tuşuna basalım sonrada silinsin
User prompt
Golden egg yerini değiştir normal egg yanına koy
User prompt
Invertory yazısını golden egg altına yerleştir
User prompt
Normal egg yanına golden egg ekle fiyatı 10000 para olsun ve içindekile altın cat yüzde 30 ihtimalle çıkıyor altın yılan yüzde 10 ihtimalle cıkıyor yüzde 60 ihtimalle altın dog cıkıyor altın dog her tıklama basına +3 tıklama borusu veriyor 2 tane altın dog +6 borusu veriyo tıklama basına 3 tane altın dog tıklama basına +9 score veriyor altın cat tıklama basına +6 puan veri altın cat 2 tane +12 score veriyor tıklama basına altım cat 3 tane +18 tıklama basına veriyor 1 tane altın yılan tıklama. Basına +10 score veriyor 2 altın yılan +20 score veriyor 3 altın yılan +30 score veriyor tıklama basına
User prompt
Egg fiyatı 1000 olsun
User prompt
Aynı petten sadece 3 tane takılabilir ve ayni oetş bidaha kullanmak için birdaha o peti çıkarman lazım 1 tane pet cıkarılcan 3 defa equip yapamadın ilakki 3 tane aynı petten cıkarılması lazım
User prompt
Aynı peti bidaha takmak için 1 defada aynı pet cıkarsın zorundasın
User prompt
Bir tane pet cıkarılımca ve onu equip yaptın takılsın ama bidaha equip yapında hicbirşey olmasın eyerki birdah o petten çıkarırsa ve yine equip yaparsan aynı oetten 2 tane takmış olursun
User prompt
Aynı peti bidaha takmak için 1 defada aynı pet cıkarsın zorundasın
User prompt
Shock wawe delete
User prompt
Ekrana dokununca beyaz şok dalgasını oluşsun ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Ekrana tıklayınca şok dalgasını olmasın
User prompt
Ekrana tıklamdında beyaz şok dalgasını oluşsun ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Ekrana her tıkladında şok dalgasını oluşsun ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Aynı petten en fazla 3 tane yapılabilir en gazlada toplam 3 tane pet takılabilir ve takılı olan bütün petler score ları ana score tıklamabasına gelen score eklensin
User prompt
Birden fazla aynı petten takarsan her peşlerinden tıklama basına gelen score puanı kaçtan pet varsa yinede eklensin
User prompt
İnvertıryden eyerki bir pet silmek istiyorsan unequip yanında dekte tuşu olsun ve ona bastında pet silinsin
User prompt
Eyer bir petten aynı petten bir daha takmak istiyorsa 2 tane pet equip yapmak istiyorsan bidaha o pett çıkman lazımdır
User prompt
Unequip class add
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); var storage = LK.import("@upit/storage.v1"); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x2c3e50 // Dark blue-gray background }); /**** * Game Code ****/ // Reset all storage on game start storage.currentMultiplier = 1; storage.inventory = []; storage.equippedAnimals = []; // Global game variables var currentMultiplier = 1; var inventory = []; var isInventoryOpen = false; var inventoryOverlay = null; var equippedAnimals = []; var maxEquippedPets = 3; var fallingEgg = null; var eggClickCount = 0; // Reset score to 0 on game start LK.setScore(0); // Initialize score display var scoreTxt = new Text2('0', { size: 120, fill: 0xFFFFFF }); // Set score text properties scoreTxt.anchor.set(0.5, 0); LK.gui.top.addChild(scoreTxt); // Position score text with some padding from top scoreTxt.y = 100; // Add tap instruction text var instructionTxt = new Text2('Tap anywhere to score!', { size: 60, fill: 0xBDC3C7 }); instructionTxt.anchor.set(0.5, 0.5); instructionTxt.x = 2048 / 2; instructionTxt.y = 2732 / 2; game.addChild(instructionTxt); // Handle tap events on the game area game.down = function (x, y, obj) { // Base tap score is always 1, plus pet bonus var petBonus = currentMultiplier - 1; // Convert multiplier to bonus (1 becomes 0, 2 becomes 1, etc.) var totalScore = 1 + petBonus; LK.setScore(LK.getScore() + totalScore); // Update score display scoreTxt.setText(LK.getScore().toString()); // Create visual feedback at tap location showing total points gained var feedbackText = '+' + totalScore.toString(); var tapFeedback = new Text2(feedbackText, { size: 80, fill: 0x27AE60 }); tapFeedback.anchor.set(0.5, 0.5); tapFeedback.x = x; tapFeedback.y = y; tapFeedback.alpha = 1; game.addChild(tapFeedback); // Animate feedback text var startY = y; var animationDuration = 800; var startTime = Date.now(); var _animateCallback = function animateCallback() { var elapsed = Date.now() - startTime; var progress = elapsed / animationDuration; if (progress >= 1) { tapFeedback.destroy(); return; } // Move text upward and fade out tapFeedback.y = startY - progress * 100; tapFeedback.alpha = 1 - progress; LK.setTimeout(_animateCallback, 16); // ~60fps }; _animateCallback(); // Hide instruction text after first tap if (LK.getScore() === 1) { instructionTxt.alpha = 0; } }; // Add Shop button var shopBtn = new Text2('Shop', { size: 80, fill: 0xFFFFFF }); shopBtn.anchor.set(1, 0); LK.gui.topRight.addChild(shopBtn); shopBtn.x = -20; // Small padding from right edge shopBtn.y = 20; // Small padding from top // Shop interface state var isShopOpen = false; var shopOverlay = null; // Handle shop button tap shopBtn.down = function (x, y, obj) { if (!isShopOpen) { // Open shop - create black overlay using Container shopOverlay = new Container(); // Create black background shape for overlay var shopBackground = LK.getAsset('shopBg', { width: 2048, height: 2732, color: 0x000000, shape: 'box' }); shopOverlay.addChild(shopBackground); shopOverlay.x = 0; shopOverlay.y = 0; // Add egg item var eggItem = LK.getAsset('egg', { anchorX: 0.5, anchorY: 0.5 }); eggItem.x = 2048 / 2; eggItem.y = 800; shopOverlay.addChild(eggItem); // Add egg price text var eggPriceText = new Text2('100 Score', { size: 60, fill: 0xFFFFFF }); eggPriceText.anchor.set(0.5, 0); eggPriceText.x = 2048 / 2; eggPriceText.y = 950; shopOverlay.addChild(eggPriceText); // Add inventory button var inventoryBtn = new Text2('Inventory', { size: 80, fill: 0xFFFFFF }); inventoryBtn.anchor.set(0.5, 0); inventoryBtn.x = 2048 / 2; inventoryBtn.y = 1200; shopOverlay.addChild(inventoryBtn); // Handle egg purchase eggItem.down = function () { if (LK.getScore() >= 100) { LK.setScore(LK.getScore() - 100); scoreTxt.setText(LK.getScore().toString()); // Close shop shopOverlay.destroy(); shopOverlay = null; isShopOpen = false; // Create falling egg fallingEgg = LK.getAsset('egg', { anchorX: 0.5, anchorY: 0.5 }); fallingEgg.x = 2048 / 2; fallingEgg.y = -200; eggClickCount = 0; game.addChild(fallingEgg); // Animate egg falling tween(fallingEgg, { y: 2732 / 2 }, { duration: 1000 }); // Handle egg clicking fallingEgg.down = function () { eggClickCount++; if (eggClickCount === 1) { // First crack var crackedEgg1 = LK.getAsset('crackedEgg1', { anchorX: 0.5, anchorY: 0.5 }); crackedEgg1.x = fallingEgg.x; crackedEgg1.y = fallingEgg.y; game.addChild(crackedEgg1); fallingEgg.destroy(); fallingEgg = crackedEgg1; fallingEgg.down = arguments.callee; } else if (eggClickCount === 2) { // Second crack var crackedEgg2 = LK.getAsset('crackedEgg2', { anchorX: 0.5, anchorY: 0.5 }); crackedEgg2.x = fallingEgg.x; crackedEgg2.y = fallingEgg.y; game.addChild(crackedEgg2); fallingEgg.destroy(); fallingEgg = crackedEgg2; fallingEgg.down = arguments.callee; } else if (eggClickCount === 3) { // Third crack - almost fully cracked var crackedEgg3 = LK.getAsset('crackedEgg3', { anchorX: 0.5, anchorY: 0.5 }); crackedEgg3.x = fallingEgg.x; crackedEgg3.y = fallingEgg.y; game.addChild(crackedEgg3); fallingEgg.destroy(); fallingEgg = crackedEgg3; fallingEgg.down = arguments.callee; } else if (eggClickCount === 4) { // Hatch the egg var rand = Math.random(); var animal; if (rand < 0.1) { animal = 'snake'; } else if (rand < 0.4) { animal = 'cat'; } else { animal = 'dog'; } // Add to inventory inventory.push(animal); storage.inventory = inventory; // Show hatched animal briefly var animalSprite = LK.getAsset(animal, { anchorX: 0.5, anchorY: 0.5 }); animalSprite.x = fallingEgg.x; animalSprite.y = fallingEgg.y; game.addChild(animalSprite); // Remove egg and animal after showing fallingEgg.destroy(); LK.setTimeout(function () { animalSprite.destroy(); }, 2000); fallingEgg = null; } }; } }; // Handle inventory button inventoryBtn.down = function () { if (!isInventoryOpen) { // Close shop first if (shopOverlay) { shopOverlay.destroy(); } shopOverlay = null; isShopOpen = false; // Open inventory isInventoryOpen = true; inventoryOverlay = new Container(); var invBackground = LK.getAsset('shopBg', { width: 2048, height: 2732, color: 0x000000, shape: 'box' }); inventoryOverlay.addChild(invBackground); game.addChild(inventoryOverlay); // Display inventory items var yPos = 300; for (var i = 0; i < inventory.length; i++) { var animalItem = LK.getAsset(inventory[i], { anchorX: 0.5, anchorY: 0.5 }); animalItem.x = 300; animalItem.y = yPos; animalItem.animalType = inventory[i]; animalItem.inventoryIndex = i; inventoryOverlay.addChild(animalItem); // Count how many of this type are equipped var equippedCount = 0; for (var k = 0; k < equippedAnimals.length; k++) { if (equippedAnimals[k] === inventory[i]) { equippedCount++; } } // Add equip button var equipBtn = new Text2('Equip', { size: 50, fill: 0xFFFFFF }); equipBtn.anchor.set(0.5, 0.5); equipBtn.x = 550; equipBtn.y = yPos; equipBtn.animalType = inventory[i]; equipBtn.inventoryIndex = i; inventoryOverlay.addChild(equipBtn); // Add unequip button var unequipBtn = new Text2('Unequip', { size: 50, fill: 0xFF6B6B }); unequipBtn.anchor.set(0.5, 0.5); unequipBtn.x = 700; unequipBtn.y = yPos; unequipBtn.animalType = inventory[i]; unequipBtn.inventoryIndex = i; inventoryOverlay.addChild(unequipBtn); // Add count display var countText = new Text2('Equipped: ' + equippedCount, { size: 40, fill: 0xFFFFFF }); countText.anchor.set(0.5, 0.5); countText.x = 900; countText.y = yPos; inventoryOverlay.addChild(countText); // Handle unequip functionality unequipBtn.down = function () { // Find and remove one instance of this pet type from equipped animals for (var removeIndex = 0; removeIndex < equippedAnimals.length; removeIndex++) { if (equippedAnimals[removeIndex] === this.animalType) { equippedAnimals.splice(removeIndex, 1); break; } } // Recalculate pet bonus after unequipping var petBonus = 0; // Count each animal type var dogCount = 0; var catCount = 0; var snakeCount = 0; for (var j = 0; j < equippedAnimals.length; j++) { if (equippedAnimals[j] === 'dog') { dogCount++; } else if (equippedAnimals[j] === 'cat') { catCount++; } else if (equippedAnimals[j] === 'snake') { snakeCount++; } } // Each dog gives +1 bonus per tap petBonus += dogCount; // Cats: 1 cat = +2, 2 cats = +4, 3 cats = +6 (total bonus) if (catCount === 1) { petBonus += 2; } else if (catCount === 2) { petBonus += 4; } else if (catCount === 3) { petBonus += 6; } // Snakes: 1 snake = +5, 2 snakes = +10, 3 snakes = +15 (total bonus) if (snakeCount === 1) { petBonus += 5; } else if (snakeCount === 2) { petBonus += 10; } else if (snakeCount === 3) { petBonus += 15; } // Store as multiplier format (base 1 + bonus) currentMultiplier = 1 + petBonus; storage.equippedAnimals = equippedAnimals; storage.currentMultiplier = currentMultiplier; // Close and reopen inventory to refresh display inventoryOverlay.destroy(); inventoryOverlay = null; isInventoryOpen = false; // Reopen inventory to show updated counts inventoryBtn.down(); }; equipBtn.down = function () { // Check if this pet type is already equipped var isAlreadyEquipped = false; for (var checkIndex = 0; checkIndex < equippedAnimals.length; checkIndex++) { if (equippedAnimals[checkIndex] === this.animalType) { isAlreadyEquipped = true; break; } } // If already equipped, show message and return if (isAlreadyEquipped) { var alreadyEquippedText = new Text2('Unequip first!', { size: 40, fill: 0xff0000 }); alreadyEquippedText.anchor.set(0.5, 0.5); alreadyEquippedText.x = this.x; alreadyEquippedText.y = this.y - 50; inventoryOverlay.addChild(alreadyEquippedText); LK.setTimeout(function () { alreadyEquippedText.destroy(); }, 1500); return; } // Check if we can equip more pets if (equippedAnimals.length < maxEquippedPets) { // Equip this pet equippedAnimals.push(this.animalType); } else { // Show message that max pets reached var maxText = new Text2('Max 3 pets!', { size: 40, fill: 0xff0000 }); maxText.anchor.set(0.5, 0.5); maxText.x = this.x; maxText.y = this.y - 50; inventoryOverlay.addChild(maxText); LK.setTimeout(function () { maxText.destroy(); }, 1500); return; } // Calculate pet bonus based on equipped animal quantities var petBonus = 0; // Count each animal type var dogCount = 0; var catCount = 0; var snakeCount = 0; for (var j = 0; j < equippedAnimals.length; j++) { if (equippedAnimals[j] === 'dog') { dogCount++; } else if (equippedAnimals[j] === 'cat') { catCount++; } else if (equippedAnimals[j] === 'snake') { snakeCount++; } } // Each dog gives +1 bonus per tap petBonus += dogCount; // Cats: 1 cat = +2, 2 cats = +4, 3 cats = +6 (total bonus) if (catCount === 1) { petBonus += 2; } else if (catCount === 2) { petBonus += 4; } else if (catCount === 3) { petBonus += 6; } // Snakes: 1 snake = +5, 2 snakes = +10, 3 snakes = +15 (total bonus) if (snakeCount === 1) { petBonus += 5; } else if (snakeCount === 2) { petBonus += 10; } else if (snakeCount === 3) { petBonus += 15; } // Store as multiplier format (base 1 + bonus) currentMultiplier = 1 + petBonus; storage.equippedAnimals = equippedAnimals; storage.currentMultiplier = currentMultiplier; // Close and reopen inventory to refresh display inventoryOverlay.destroy(); inventoryOverlay = null; isInventoryOpen = false; // Reopen inventory to show updated counts inventoryBtn.down(); }; yPos += 200; } // Add close inventory button var closeInvBtn = new Text2('Close', { size: 80, fill: 0xFFFFFF }); closeInvBtn.anchor.set(0.5, 0.5); closeInvBtn.x = 2048 / 2; closeInvBtn.y = 2400; inventoryOverlay.addChild(closeInvBtn); closeInvBtn.down = function () { inventoryOverlay.destroy(); inventoryOverlay = null; isInventoryOpen = false; }; } }; // Add shop overlay to main game game.addChild(shopOverlay); isShopOpen = true; } else { // Close shop - remove overlay if (shopOverlay) { shopOverlay.destroy(); shopOverlay = null; } isShopOpen = false; } }; // Update score display on game start game.update = function () { // Keep score text updated (in case it changes from other sources) scoreTxt.setText(LK.getScore().toString()); };
===================================================================
--- original.js
+++ change.js
@@ -360,8 +360,31 @@
// Reopen inventory to show updated counts
inventoryBtn.down();
};
equipBtn.down = function () {
+ // Check if this pet type is already equipped
+ var isAlreadyEquipped = false;
+ for (var checkIndex = 0; checkIndex < equippedAnimals.length; checkIndex++) {
+ if (equippedAnimals[checkIndex] === this.animalType) {
+ isAlreadyEquipped = true;
+ break;
+ }
+ }
+ // If already equipped, show message and return
+ if (isAlreadyEquipped) {
+ var alreadyEquippedText = new Text2('Unequip first!', {
+ size: 40,
+ fill: 0xff0000
+ });
+ alreadyEquippedText.anchor.set(0.5, 0.5);
+ alreadyEquippedText.x = this.x;
+ alreadyEquippedText.y = this.y - 50;
+ inventoryOverlay.addChild(alreadyEquippedText);
+ LK.setTimeout(function () {
+ alreadyEquippedText.destroy();
+ }, 1500);
+ return;
+ }
// Check if we can equip more pets
if (equippedAnimals.length < maxEquippedPets) {
// Equip this pet
equippedAnimals.push(this.animalType);