User prompt
Oyundaki nesnelerde sayılar m ye kadar değilde trilyara kadar olsun 1000 m yerine 1 b gibi
User prompt
Sadece 1.5 versin eskisi giib
User prompt
2 kat vermesin alış başına 3 . Alışta n sonra 5 artsın
User prompt
Ve şöyle yap 150 y daha büyüt joystick alanını üste ve mağazadan muscle la muscle boost alınca muscle boost da her alışta 2 kat daha fazla versin
User prompt
Bak joystick ın yürüme alanının yerini değiştirme büyüt sadece en solda da olsun ortalarda da ve y olarak da biraz büyüt çok değil 100 y tarzı
User prompt
Şimdi şöyle olucak şu joystick çok geride yani ekranın taa en soluna tıklayınca yürünğyo onu ekranın orta taraflarına basıncada yürüme yap çok solda olmasın ve assetslere yeni düşman ekle 5 k güç isticek ve 1k win vercek yenme başına ve bi tane daha ekle oda 50 k güç isticek 10 k win vercek yenme başına ve ikinci yumurta 5 k win istesin 2 k yerine ve düşmanlar bi önceki düşman gibi aralarında aynı y mesafesi olsun
User prompt
2. Eggi ve yazılarını 150 y daha aşşağıya al ve hata düzelt page 2 de inventory kapatınca page 2 deki petler ekranda kalıyo olması gereken ekrandan gitmesi ve page 2 deki petlerede luck boostları ekle ilk pet ve ikinci petin şansı azalcak luck boost başına yüzde 10 ilk petin ikinci yüzde 7.5 şansı azalcak diğer 4 pet yüzde 25 artıcak şansları luck boost başına dikkat li oku
User prompt
Şimdi yeni bir yumurta ekle assetslere içinden 5 pet çıkan 2 k win Le alınıyo ilk pet 50 şansla çıkıyo 0.1 win boost 0.07 muscle boost ikinci pet 20 şansla çıkıyo 0.4 win boost 0.2 muscle boost üçüncü pet 5 şansla çıkıyo 2 win boost 1.2 muscle boost dördüncü pet 1 şansla çıkıyo 15 win boost 10 muscle boost beşinci pet 0.06 şansla çıkıyo 100 win boost 85 muscle boost 1 tanede gizli pet olcak 0.0001 şansı olcak bu pet win boostu ve muscle boostu 5 x arttıracak bu petleri 2. Sayfaya koy ve bi önceki 5 petle söylediğim pet sırasına göre konumunu ayarla şansa göre en fazladan en aza göre ve yumurta nın konumu bi önceki yumurtadan 250 y altta olcak gizli pet tek all muscle boost 5 x ve all win boost 5 x yazcak ve onunda konumu üçüncü petin altında olcak x ı üçüncü petin x ı olcak y si son petin y si
User prompt
Pet pet 1 pet 2 pet 3 pet 4 1. Sayfada
User prompt
Bide yeni assetslere obje ekle buda önceki sayfaya gitmeye yarıcak ve ileri sayfaya gitmekle aynı y de olcak x i sadece en sol taraflarda olcak sen uygun olarak ayarla ve şuan 2. Ci sayfa boş ben sana söylicem hangi petleri 2. Ci sayfaya koyacağını şuan pet den pet 4 e kadar olan petler 1. Sayfada
User prompt
Envantere sayfa mekaniği eklicez ilk olarak assetslere bir obje ekle onla bir sonraki sayfaya geçicez ismini ona göre ayarla ve o objeyi inventory deki close tuşunun 150 y altına koy ona tıklayınca sayfa mekaniği ile sonraki sayfa atlansın şuan 2 sayfa olcak her sayfada 1 tane egg ın sayfası olucak ve petleri şuan 1 egg var 2. Egg eklenince 2. Sayfaya gelcek petler ve ın inventory nin tam orta en üstünün 50 y altında 60 px Le sayfa sayısı yazsın
User prompt
Dusmana veya dusman 1e tıklayınca 0.5sn beklesin ve ondan sonra ödül versin ve 0.5 sn beklerken 0.5sn içinde tıklayınca hiç bişi olmasın 0.5 sn geçince düzelsin ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Şimdi 1 tane daha weightLiftingRect ekle bu da 100 k muscle istesin ve 2k muscle versin tıklama başı assets lere weightLiftingRect 2 ekle ve weightLiftingRect 1 10 k istesin ve 300 versin muscle
User prompt
Şimdi 1 tane daha weightLiftingRect ekle bu da 100 k muscle istesin ve 1k muscle versin tıklama başı assets lere weightLiftingRect 2 ekle ve weightLiftingRect 1 10 k istesin
User prompt
50 y daha altına gitsin dusman 1 ve weightLiftingRect tin altındaki muscle 0 yazısının 40 y altına 1 muscle yazsın diğer weightLiftingRect 1 ın de muscle 1k yazısının 40 y altına 5 muscle yazsın dusman altında 1 win dusman 1 ın altında 15 win yazsın
User prompt
50 y daha altına gitsin dusman 1 ve weightLiftingRect tin altındaki muscle 0 yazısının 40 y altına 1 muscle yazsın diğer weightLiftingRect 1 ın de muscle 1k yazısının 40 y altına 5 muscle yazsın dusman altında 1 win dusman 1 ın altında 15 win yazsın
User prompt
Dusman 1 dusmanın 100 y altına daha gitsin ve weightLiftingRect 1 400 x daha sağa gitsin
User prompt
Şimdi ilk dusman a her tıkladığımızda 0.05 sn beklesin bu auto click tıklandığında yavaş tıklansın diye veya 0.1 de yapabilirsin ve 2. Düşman gelcek assets lere dusman 1 ekle diğer dusman ın 200 y altında olsun 100 muscle gereksin 15 win versin ve üstteki muscle yapma yerine weightLiftingRect 1 eklensin weightLiftingRect ın 100 x sağına yeni bir weightLiftingRect 1 assetsi gelcek bu 5 muscle vercek ama bunu kullanmak için en az 1 k güç gerekcek diğeriyle aynı kodu sadece bunlar ekle ve altında 1 k muscle yazcak weightLiftingRect ın ise 0 muscle yazcak
User prompt
Oyunun resmini nerden düzenleyebilirim ben düzenleyemiyosam sen gym salonu resmi koy
User prompt
Ama yüzde 5 4 ve 3 olarak düşücek direkt sayı olarak değil yüzde
User prompt
Ama luck boost 0 iken pet ın 70 çıkma şansı pet 1 30 pet 2 10 olucak oyüzden o şanslar dan düşçek 5 4 3
User prompt
Bak şöyle olucak pet pet 1 ve pet 2 nin şansları düşücek artmıcak luck boost başına pet ın yüzde 5 pet 1 yüzde 4 pet 2 yüzde 3 düşücek 0 a geldiğinde çıkma şansları olmıcak ve düşmeyecek daha
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); var storage = LK.import("@upit/storage.v1"); /**** * Classes ****/ var Character = Container.expand(function () { var self = Container.call(this); var characterGraphics = self.attachAsset('character', { anchorX: 0.5, anchorY: 0.5 }); // Add floating text for muscle display self.muscleText = new Text2('Muscle: 0', { size: 60, fill: '#ffffff' }); self.muscleText.anchor.set(0.5, 1); self.addChild(self.muscleText); self.speed = 8; self.velocityX = 0; self.velocityY = 0; self.targetRotation = 0; self.setVelocity = function (vx, vy) { self.velocityX = vx; self.velocityY = vy; // Calculate rotation to face movement direction if (vx !== 0 || vy !== 0) { self.targetRotation = Math.atan2(vy, vx); } }; self.update = function () { // Store previous position for collision detection var prevX = self.x; var prevY = self.y; // Move character self.x += self.velocityX * self.speed; self.y += self.velocityY * self.speed; // Check collision with enemy (barrier) var enemyLeft = enemy.x - 100 - 115; // enemy half width + character half width var enemyRight = enemy.x + 100 + 115; var enemyTop = enemy.y - 100 - 115; var enemyBottom = enemy.y + 100 + 115; if (self.x >= enemyLeft && self.x <= enemyRight && self.y >= enemyTop && self.y <= enemyBottom) { // Collision detected, revert to previous position self.x = prevX; self.y = prevY; self.setVelocity(0, 0); } // Check collision with weight lifting area (barrier) var weightLeft = weightLiftingRect.x - 175 - 115; // weight half width + character half width var weightRight = weightLiftingRect.x + 175 + 115; var weightTop = weightLiftingRect.y - 203 - 115; // weight half height + character half width var weightBottom = weightLiftingRect.y + 203 + 115; if (self.x >= weightLeft && self.x <= weightRight && self.y >= weightTop && self.y <= weightBottom) { // Collision detected, revert to previous position self.x = prevX; self.y = prevY; self.setVelocity(0, 0); } // Keep character within screen bounds only if (self.x < 40) { self.x = 40; } if (self.x > 2008) { self.x = 2008; } if (self.y < 40) { self.y = 40; } if (self.y > 2692) { self.y = 2692; } // Update character graphics based on muscle level var currentAssetId = 'character'; if (muscle >= 100000000) { currentAssetId = 'character_100m'; } else if (muscle >= 10000000) { currentAssetId = 'character_10m'; } else if (muscle >= 1000000) { currentAssetId = 'character_1m'; } else if (muscle >= 100000) { currentAssetId = 'character_100k'; } else if (muscle >= 10000) { currentAssetId = 'character_10k'; } else if (muscle >= 1000) { currentAssetId = 'character_1k'; } // Check if we need to change the character asset if (!self.currentAssetId || self.currentAssetId !== currentAssetId) { // Remove old graphics if (characterGraphics.parent) { self.removeChild(characterGraphics); } // Add new graphics characterGraphics = self.attachAsset(currentAssetId, { anchorX: 0.5, anchorY: 0.5 }); self.currentAssetId = currentAssetId; } // Update muscle text with formatted display self.muscleText.setText('Muscle: ' + formatMuscle(muscle)); self.muscleText.x = 0; self.muscleText.y = -100; // 50px higher than before // Update win text if (!self.winText) { self.winText = new Text2('Win: 0', { size: 60, fill: '#ffffff' }); self.winText.anchor.set(0.5, 1); self.addChild(self.winText); } self.winText.setText('Win: ' + formatWin(win)); self.winText.x = 0; self.winText.y = -150; // 50px above muscle text // Smooth rotation towards target var currentRotation = characterGraphics.rotation; var rotationDiff = self.targetRotation - currentRotation; // Handle rotation wrapping if (rotationDiff > Math.PI) { rotationDiff -= 2 * Math.PI; } if (rotationDiff < -Math.PI) { rotationDiff += 2 * Math.PI; } characterGraphics.rotation += rotationDiff * 0.15; }; return self; }); var Joystick = Container.expand(function () { var self = Container.call(this); var baseGraphics = self.attachAsset('joystickBase', { anchorX: 0.5, anchorY: 0.5 }); var handleGraphics = self.attachAsset('joystickHandle', { anchorX: 0.5, anchorY: 0.5 }); baseGraphics.alpha = 0.3; handleGraphics.alpha = 0.7; self.baseRadius = 100; self.handleRadius = 40; self.isActive = false; self.centerX = 0; self.centerY = 0; self.handleX = 0; self.handleY = 0; self.show = function (x, y) { self.visible = true; self.isActive = true; self.x = x; self.y = y; self.centerX = x; self.centerY = y; self.handleX = 0; self.handleY = 0; handleGraphics.x = 0; handleGraphics.y = 0; }; self.hide = function () { self.visible = false; self.isActive = false; // Smooth return to center tween(handleGraphics, { x: 0, y: 0 }, { duration: 200 }); }; self.updateHandle = function (x, y) { if (!self.isActive) { return; } // Calculate offset from center var offsetX = x - self.centerX; var offsetY = y - self.centerY; var distance = Math.sqrt(offsetX * offsetX + offsetY * offsetY); // Constrain handle within base radius if (distance > self.baseRadius) { offsetX = offsetX / distance * self.baseRadius; offsetY = offsetY / distance * self.baseRadius; distance = self.baseRadius; } self.handleX = offsetX; self.handleY = offsetY; handleGraphics.x = offsetX; handleGraphics.y = offsetY; // Return normalized values for movement return { x: offsetX / self.baseRadius, y: offsetY / self.baseRadius, magnitude: distance / self.baseRadius }; }; self.visible = false; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x2C3E50 }); /**** * Game Code ****/ // Initialize muscle variable var muscle = storage.muscle || 0; // Initialize win variable var win = storage.win || 0; // Function to format win numbers with proper decimal places function formatWin(value) { if (value >= 1) { // For values >= 1, use maximum 2 decimal places return Math.round(value * 100) / 100; } else { // For values < 1, round to 2 decimal places and format appropriately var rounded = Math.round(value * 100) / 100; return rounded; } } // Function to format muscle numbers with k, m notation function formatMuscle(value) { if (value >= 1000000) { // For millions var millions = value / 1000000; if (millions >= 10) { return Math.floor(millions) + 'm'; } else { return Math.floor(millions * 10) / 10 + 'm'; } } else if (value >= 1000) { // For thousands var thousands = value / 1000; if (thousands >= 10) { return Math.floor(thousands) + 'k'; } else { return Math.floor(thousands * 10) / 10 + 'k'; } } else { // For values less than 1000, show with max 2 decimal places return Math.round(value * 100) / 100; } } // Universal function to format all numbers with k, m notation for display function formatNumber(value) { if (value >= 1000000) { // For millions var millions = value / 1000000; if (millions >= 10) { return Math.floor(millions) + 'm'; } else { return Math.floor(millions * 10) / 10 + 'm'; } } else if (value >= 1000) { // For thousands var thousands = value / 1000; if (thousands >= 10) { return Math.floor(thousands) + 'k'; } else { return Math.floor(thousands * 10) / 10 + 'k'; } } else { // For values < 1000, show with proper decimal places return Math.round(value * 100) / 100; } } // Initialize pet inventory var petCount = storage.petCount || 0; var pet1Count = storage.pet1Count || 0; var pet2Count = storage.pet2Count || 0; var pet3Count = storage.pet3Count || 0; var pet4Count = storage.pet4Count || 0; // Initialize pet boost values var petWinBoost = petCount * 0.02; // 0.02 per pet var pet1WinBoost = pet1Count * 0.06; // 0.06 per pet1 var pet2WinBoost = pet2Count * 0.2; // 0.2 per pet2 var pet3WinBoost = pet3Count * 1.5; // 1.5 per pet3 var pet4WinBoost = pet4Count * 60; // 60 per pet4 var totalWinBoost = petWinBoost + pet1WinBoost + pet2WinBoost + pet3WinBoost + pet4WinBoost; // Initialize pet muscle boost values var petMuscleBoost = petCount * 0.01; // 0.01 per pet var pet1MuscleBoost = pet1Count * 0.03; // 0.03 per pet1 var pet2MuscleBoost = pet2Count * 0.1; // 0.1 per pet2 var pet3MuscleBoost = pet3Count * 0.75; // 0.75 per pet3 var pet4MuscleBoost = pet4Count * 30; // 30 per pet4 var totalPetMuscleBoost = petMuscleBoost + pet1MuscleBoost + pet2MuscleBoost + pet3MuscleBoost + pet4MuscleBoost; // Initialize shop variables var muscleBoost = storage.muscleBoost || 0; // Additional muscle gain per flex var shopPrice = storage.shopPrice || 10; // Current price for muscle boost var shopBoostAmount = 1.5; // Current boost amount var luckBoost = storage.luckBoost || 0; // Luck boost count var luckPrice = storage.luckPrice || 100; // Current price for luck boost var isShopOpen = false; // Track if shop UI is open var isInventoryOpen = false; // Track if inventory UI is open // Joystick handle (smaller circle) // Joystick base (semi-transparent circle) // Add gym background image var gymBackground = game.addChild(LK.getAsset('gym_background', { anchorX: 0, anchorY: 0 })); gymBackground.x = 0; gymBackground.y = 0; // Character shape var character = game.addChild(new Character()); character.x = 1024; character.y = 1366; // Create Weight Lifting rectangle at top-center, 100px from left edge var weightLiftingRect = game.addChild(LK.getAsset('weightLiftingRect', { anchorX: 0.5, anchorY: 0.5 })); weightLiftingRect.x = 200 + 175; // 200px from left + half width (175) to center weightLiftingRect.y = 50 + 110; // 50 + half height (70) to center // Add text above the rectangle var weightLiftingText = new Text2('Weight Lifting', { size: 58, // 36 * 1.6 = 57.6, rounded to 58 fill: '#ffffff' }); weightLiftingText.anchor.set(0.5, 1); weightLiftingText.x = weightLiftingRect.x; weightLiftingText.y = weightLiftingRect.y - 75; game.addChild(weightLiftingText); // Create enemy at top right, 150px from top var enemy = game.addChild(LK.getAsset('dusman', { anchorX: 0.5, anchorY: 0.5 })); enemy.x = 2048 - 200; // Right edge minus half width enemy.y = 150 + 100; // 150px from top plus half height // Add power text above enemy var enemyPowerText = new Text2('Power: ' + formatNumber(10), { size: 60, fill: '#ffffff' }); enemyPowerText.anchor.set(0.5, 1); enemyPowerText.x = enemy.x; enemyPowerText.y = enemy.y - 100; game.addChild(enemyPowerText); // Variables for weight lifting interaction var isMovingToWeights = false; var isWaitingAtWeights = false; var joystick = game.addChild(new Joystick()); var isDragging = false; var joystickTouchId = null; // Create egg object at left center, 200px up from center var egg = game.addChild(LK.getAsset('egg', { anchorX: 0.5, anchorY: 0.5 })); egg.x = 100; // Left edge + some margin egg.y = 866 - 200; // Center Y - 200px // Add "Egg 1" text above egg var eggTitle = new Text2('Egg 1', { size: 60, fill: '#ffffff' }); eggTitle.anchor.set(0.5, 1); eggTitle.x = egg.x; eggTitle.y = egg.y - 160; // Above egg game.addChild(eggTitle); // Add "200 wins" text below egg title var eggCost = new Text2(formatNumber(200) + ' wins', { size: 50, fill: '#ffffff' }); eggCost.anchor.set(0.5, 1); eggCost.x = egg.x; eggCost.y = egg.y - 100; // Below egg title, above egg game.addChild(eggCost); // Create inventory button above shop var inventory = LK.gui.bottomRight.addChild(LK.getAsset('inventory', { anchorX: 1, anchorY: 1, scaleX: 0.15, scaleY: 0.15 })); inventory.x = -50; inventory.y = -260; // 150px above shop (-50 - 150 = -200) // Add inventory text var inventoryText = new Text2('Inventory', { size: 35, fill: '#ffffff' }); inventoryText.anchor.set(0.5, 0.5); inventoryText.x = inventory.width / 2; inventoryText.y = inventory.height / 2; inventory.addChild(inventoryText); // Create shop object at bottom right var shop = LK.gui.bottomRight.addChild(LK.getAsset('shop_bg', { anchorX: 1, anchorY: 1, scaleX: 0.15, scaleY: 0.15 })); shop.x = -50; shop.y = -50; // Add shop text var shopText = new Text2('Shop', { size: 40, fill: '#ffffff' }); shopText.anchor.set(0.5, 0.5); shopText.x = shop.width / 2; shopText.y = shop.height / 2; shop.addChild(shopText); // Create shop UI (initially hidden) var shopUI = LK.gui.center.addChild(LK.getAsset('shop_bg', { anchorX: 0.5, anchorY: 0.5, scaleX: 0.65, scaleY: 0.65 })); shopUI.visible = false; // Create inventory UI (initially hidden) var inventoryUI = LK.gui.center.addChild(LK.getAsset('inventory', { anchorX: 0.5, anchorY: 0.5, scaleX: 0.65, scaleY: 0.65 })); inventoryUI.visible = false; // Create in_inventory image UI element (initially hidden) var inInventoryImage = LK.gui.center.addChild(LK.getAsset('in_inventory', { anchorX: 0.5, anchorY: 0.5, scaleX: 0.8, scaleY: 0.8 })); inInventoryImage.visible = false; // Create pet display elements (initially hidden) var petDisplay = LK.gui.center.addChild(LK.getAsset('pet', { anchorX: 0.5, anchorY: 0.5 })); petDisplay.visible = false; petDisplay.x = -280; petDisplay.y = -140; var pet1Display = LK.gui.center.addChild(LK.getAsset('pet1', { anchorX: 0.5, anchorY: 0.5 })); pet1Display.visible = false; pet1Display.x = -40; pet1Display.y = -140; var pet2Display = LK.gui.center.addChild(LK.getAsset('pet2', { anchorX: 0.5, anchorY: 0.5 })); pet2Display.visible = false; pet2Display.x = 200; pet2Display.y = -140; var pet3Display = LK.gui.center.addChild(LK.getAsset('pet3', { anchorX: 0.5, anchorY: 0.5 })); pet3Display.visible = false; pet3Display.x = -280; pet3Display.y = 160; var pet4Display = LK.gui.center.addChild(LK.getAsset('pet4', { anchorX: 0.5, anchorY: 0.5 })); pet4Display.visible = false; pet4Display.x = -40; pet4Display.y = 160; // Create count text for pets var petCountText = LK.gui.center.addChild(new Text2('0x', { size: 55, fill: '#ffffff' })); petCountText.anchor.set(0, 1); petCountText.visible = false; petCountText.x = -265 - 50; // Bottom left of pet display petCountText.y = -105; var pet1CountText = LK.gui.center.addChild(new Text2('0x', { size: 55, fill: '#ffffff' })); pet1CountText.anchor.set(0, 1); pet1CountText.visible = false; pet1CountText.x = -25 - 50; // Bottom left of pet1 display pet1CountText.y = -105; var pet2CountText = LK.gui.center.addChild(new Text2('0x', { size: 55, fill: '#ffffff' })); pet2CountText.anchor.set(0, 1); pet2CountText.visible = false; pet2CountText.x = 215 - 50; // Bottom left of pet2 display pet2CountText.y = -105; var pet3CountText = LK.gui.center.addChild(new Text2('0x', { size: 55, fill: '#ffffff' })); pet3CountText.anchor.set(0, 1); pet3CountText.visible = false; pet3CountText.x = -265 - 50; // Bottom left of pet3 display pet3CountText.y = 195; var pet4CountText = LK.gui.center.addChild(new Text2('0x', { size: 55, fill: '#ffffff' })); pet4CountText.anchor.set(0, 1); pet4CountText.visible = false; pet4CountText.x = -25 - 50; // Bottom left of pet4 display pet4CountText.y = 195; // Add pet chance and boost text var petChanceText = LK.gui.center.addChild(new Text2('70%', { size: 35, fill: '#ffffff' })); petChanceText.anchor.set(0.5, 0); petChanceText.visible = false; petChanceText.x = -280; petChanceText.y = -70; // Below pet display var petBoostText = LK.gui.center.addChild(new Text2('Win boost = 0.02', { size: 27, fill: '#ffffff' })); petBoostText.anchor.set(0.5, 0); petBoostText.visible = false; petBoostText.x = -280; petBoostText.y = -35; // Below chance text // Add pet1 chance and boost text var pet1ChanceText = LK.gui.center.addChild(new Text2('30%', { size: 35, fill: '#ffffff' })); pet1ChanceText.anchor.set(0.5, 0); pet1ChanceText.visible = false; pet1ChanceText.x = -40; pet1ChanceText.y = -70; // Below pet1 display var pet1BoostText = LK.gui.center.addChild(new Text2('Win boost = 0.06', { size: 27, fill: '#ffffff' })); pet1BoostText.anchor.set(0.5, 0); pet1BoostText.visible = false; pet1BoostText.x = -40; pet1BoostText.y = -35; // Below chance text // Add pet muscle boost text var petMuscleBoostText = LK.gui.center.addChild(new Text2('Muscle boost = 0.01', { size: 23, fill: '#ffffff' })); petMuscleBoostText.anchor.set(0.5, 0); petMuscleBoostText.visible = false; petMuscleBoostText.x = -280; petMuscleBoostText.y = 0; // Below win boost text // Add pet1 muscle boost text var pet1MuscleBoostText = LK.gui.center.addChild(new Text2('Muscle boost = 0.03', { size: 23, fill: '#ffffff' })); pet1MuscleBoostText.anchor.set(0.5, 0); pet1MuscleBoostText.visible = false; pet1MuscleBoostText.x = -40; pet1MuscleBoostText.y = 0; // Below win boost text // Add pet2 chance and boost text var pet2ChanceText = LK.gui.center.addChild(new Text2('10%', { size: 35, fill: '#ffffff' })); pet2ChanceText.anchor.set(0.5, 0); pet2ChanceText.visible = false; pet2ChanceText.x = 200; pet2ChanceText.y = -70; // Below pet2 display var pet2BoostText = LK.gui.center.addChild(new Text2('Win boost = 0.2', { size: 27, fill: '#ffffff' })); pet2BoostText.anchor.set(0.5, 0); pet2BoostText.visible = false; pet2BoostText.x = 200; pet2BoostText.y = -35; // Below chance text var pet2MuscleBoostText = LK.gui.center.addChild(new Text2('Muscle boost = 0.1', { size: 23, fill: '#ffffff' })); pet2MuscleBoostText.anchor.set(0.5, 0); pet2MuscleBoostText.visible = false; pet2MuscleBoostText.x = 200; pet2MuscleBoostText.y = 0; // Below win boost text // Add pet3 chance and boost text var pet3ChanceText = LK.gui.center.addChild(new Text2('1%', { size: 35, fill: '#ffffff' })); pet3ChanceText.anchor.set(0.5, 0); pet3ChanceText.visible = false; pet3ChanceText.x = -280; pet3ChanceText.y = 230; // Below pet3 display var pet3BoostText = LK.gui.center.addChild(new Text2('Win boost = 1.5', { size: 27, fill: '#ffffff' })); pet3BoostText.anchor.set(0.5, 0); pet3BoostText.visible = false; pet3BoostText.x = -280; pet3BoostText.y = 265; // Below chance text var pet3MuscleBoostText = LK.gui.center.addChild(new Text2('Muscle boost = 0.75', { size: 23, fill: '#ffffff' })); pet3MuscleBoostText.anchor.set(0.5, 0); pet3MuscleBoostText.visible = false; pet3MuscleBoostText.x = -280; pet3MuscleBoostText.y = 300; // Below win boost text // Add pet4 chance and boost text var pet4ChanceText = LK.gui.center.addChild(new Text2('0.05%', { size: 35, fill: '#ffffff' })); pet4ChanceText.anchor.set(0.5, 0); pet4ChanceText.visible = false; pet4ChanceText.x = -40; pet4ChanceText.y = 230; // Below pet4 display var pet4BoostText = LK.gui.center.addChild(new Text2('Win boost = 60', { size: 27, fill: '#ffffff' })); pet4BoostText.anchor.set(0.5, 0); pet4BoostText.visible = false; pet4BoostText.x = -40; pet4BoostText.y = 265; // Below chance text var pet4MuscleBoostText = LK.gui.center.addChild(new Text2('Muscle boost = 30', { size: 23, fill: '#ffffff' })); pet4MuscleBoostText.anchor.set(0.5, 0); pet4MuscleBoostText.visible = false; pet4MuscleBoostText.x = -40; pet4MuscleBoostText.y = 300; // Below win boost text // Create close1 button for inventory (initially hidden) var close1Button = LK.gui.center.addChild(LK.getAsset('close', { anchorX: 0.5, anchorY: 0.5 })); close1Button.visible = false; close1Button.x = 538; close1Button.y = -315; // Create shopping image UI element (initially hidden) var shoppingImage = LK.gui.center.addChild(LK.getAsset('shopping', { anchorX: 0.5, anchorY: 0.5, scaleX: 0.8, scaleY: 0.8 })); shoppingImage.visible = false; // Create close button UI element (initially hidden) var closeButton = LK.gui.center.addChild(LK.getAsset('close', { anchorX: 0.5, anchorY: 0.5 })); closeButton.visible = false; closeButton.x = 310; // Position close button to the right of shopping image closeButton.y = -310; // Position close button at the top of shopping image // Add shop upgrade text var shopUpgradeText = LK.gui.center.addChild(new Text2(formatNumber(shopPrice) + ' muscle = + ' + formatNumber(1) + ' muscle boost', { size: 45, fill: '#ffffff', font: 'bold serif' })); shopUpgradeText.anchor.set(0.5, 0.5); shopUpgradeText.x = 0; shopUpgradeText.y = -200; shopUpgradeText.visible = false; // Add luck boost upgrade text var luckUpgradeText = LK.gui.center.addChild(new Text2(formatNumber(luckPrice) + ' win = + 1 luck boost', { size: 45, fill: '#ffffff', font: 'bold serif' })); luckUpgradeText.anchor.set(0.5, 0.5); luckUpgradeText.x = 0; luckUpgradeText.y = -100; luckUpgradeText.visible = false; // Add win boost display in bottom left var winBoostDisplay = LK.gui.bottomLeft.addChild(new Text2('Win Boost: ' + formatNumber(totalWinBoost), { size: 50, fill: '#ffffff' })); winBoostDisplay.anchor.set(0, 1); winBoostDisplay.x = 20; winBoostDisplay.y = -20; // Add muscle boost display in bottom left var muscleBoostDisplay = LK.gui.bottomLeft.addChild(new Text2('Muscle Boost: ' + formatNumber(muscleBoost + totalPetMuscleBoost), { size: 50, fill: '#ffffff', font: 'bold serif' })); muscleBoostDisplay.anchor.set(0, 1); muscleBoostDisplay.x = 20; muscleBoostDisplay.y = -80; // Add luck boost display in bottom left var luckBoostDisplay = LK.gui.bottomLeft.addChild(new Text2('Luck Boost: ' + formatNumber(luckBoost), { size: 50, fill: '#ffffff' })); luckBoostDisplay.anchor.set(0, 1); luckBoostDisplay.x = 20; luckBoostDisplay.y = -140; // Add close button text var closeShopText = new Text2('Close', { size: 50, fill: '#ff0000' }); closeShopText.anchor.set(0.5, 0.5); closeShopText.x = 0; closeShopText.y = 200; shopUI.addChild(closeShopText); game.down = function (x, y, obj) { // Check if inventory UI is open if (isInventoryOpen) { // Check if close1 button was clicked (convert screen coordinates to GUI coordinates) var screenY = y * (LK.gui.height / 2732); var screenX = x * (LK.gui.width / 2048); var guiCenterX = LK.gui.width / 2; var guiCenterY = LK.gui.height / 2; // Calculate close1 button bounds in screen coordinates var close1Bounds = { left: guiCenterX + close1Button.x - 50, right: guiCenterX + close1Button.x + 50, top: guiCenterY + close1Button.y - 50, bottom: guiCenterY + close1Button.y + 50 }; if (screenX >= close1Bounds.left && screenX <= close1Bounds.right && screenY >= close1Bounds.top && screenY <= close1Bounds.bottom) { // Close inventory isInventoryOpen = false; inInventoryImage.visible = false; close1Button.visible = false; // Hide pet displays petDisplay.visible = false; pet1Display.visible = false; pet2Display.visible = false; pet3Display.visible = false; pet4Display.visible = false; petCountText.visible = false; pet1CountText.visible = false; pet2CountText.visible = false; pet3CountText.visible = false; pet4CountText.visible = false; petChanceText.visible = false; petBoostText.visible = false; pet1ChanceText.visible = false; pet1BoostText.visible = false; pet2ChanceText.visible = false; pet2BoostText.visible = false; pet3ChanceText.visible = false; pet3BoostText.visible = false; pet4ChanceText.visible = false; pet4BoostText.visible = false; petMuscleBoostText.visible = false; pet1MuscleBoostText.visible = false; pet2MuscleBoostText.visible = false; pet3MuscleBoostText.visible = false; pet4MuscleBoostText.visible = false; return; } return; } // Check if shop UI is open if (isShopOpen) { // Check if close button was clicked (convert screen coordinates to GUI coordinates) var screenY = y * (LK.gui.height / 2732); var screenX = x * (LK.gui.width / 2048); var guiCenterX = LK.gui.width / 2; var guiCenterY = LK.gui.height / 2; // Calculate close button bounds in screen coordinates var closeBounds = { left: guiCenterX + closeButton.x - 50, right: guiCenterX + closeButton.x + 50, top: guiCenterY + closeButton.y - 50, bottom: guiCenterY + closeButton.y + 50 }; if (screenX >= closeBounds.left && screenX <= closeBounds.right && screenY >= closeBounds.top && screenY <= closeBounds.bottom) { // Close shop isShopOpen = false; shoppingImage.visible = false; closeButton.visible = false; shopUpgradeText.visible = false; luckUpgradeText.visible = false; return; } // Calculate shop upgrade text bounds in screen coordinates var upgradeBounds = { left: guiCenterX - 200, // Approximate text width bounds right: guiCenterX + 200, top: guiCenterY + shopUpgradeText.y - 30, // Approximate text height bounds bottom: guiCenterY + shopUpgradeText.y + 30 }; if (screenX >= upgradeBounds.left && screenX <= upgradeBounds.right && screenY >= upgradeBounds.top && screenY <= upgradeBounds.bottom) { // Check if player has enough muscle to buy upgrade if (muscle >= shopPrice) { // Deduct muscle and add boost muscle = Math.round((muscle - shopPrice) * 10) / 10; muscleBoost = Math.round((muscleBoost + shopBoostAmount) * 10) / 10; // Multiply the price by 1.5x for next upgrade shopPrice = Math.round(shopPrice * 1.5); // Save to storage storage.muscle = muscle; storage.muscleBoost = muscleBoost; storage.shopPrice = shopPrice; // Update shop text shopUpgradeText.setText(formatNumber(shopPrice) + ' muscle = + ' + formatNumber(1.5) + ' muscle boost'); // Update muscle boost display muscleBoostDisplay.setText('Muscle Boost: ' + formatNumber(muscleBoost + totalPetMuscleBoost)); } return; } // Calculate luck upgrade text bounds in screen coordinates var luckUpgradeBounds = { left: guiCenterX - 200, right: guiCenterX + 200, top: guiCenterY + luckUpgradeText.y - 30, bottom: guiCenterY + luckUpgradeText.y + 30 }; if (screenX >= luckUpgradeBounds.left && screenX <= luckUpgradeBounds.right && screenY >= luckUpgradeBounds.top && screenY <= luckUpgradeBounds.bottom) { // Check if player has enough wins to buy luck boost if (win >= luckPrice) { // Deduct wins and add luck boost win -= luckPrice; luckBoost += 1; // Multiply the price by 10x for next upgrade luckPrice = luckPrice * 10; // Save to storage storage.win = win; storage.luckBoost = luckBoost; storage.luckPrice = luckPrice; // Update luck upgrade text luckUpgradeText.setText(formatNumber(luckPrice) + ' win = + 1 luck boost'); // Update luck boost display luckBoostDisplay.setText('Luck Boost: ' + formatNumber(luckBoost)); } return; } return; } // Check if shop was clicked (convert screen coordinates to GUI coordinates) var screenY = y * (LK.gui.height / 2732); var screenX = x * (LK.gui.width / 2048); // Calculate shop bounds more accurately for bottom-right position var shopBounds = { left: LK.gui.width + shop.x - shop.width * 0.15, // Account for right anchor and scale right: LK.gui.width + shop.x, top: LK.gui.height + shop.y - shop.height * 0.15, // Account for anchor and scale bottom: LK.gui.height + shop.y }; if (screenX >= shopBounds.left && screenX <= shopBounds.right && screenY >= shopBounds.top && screenY <= shopBounds.bottom) { // Open shop (don't toggle, only open) if (!isShopOpen) { isShopOpen = true; shoppingImage.visible = true; closeButton.visible = true; shopUpgradeText.visible = true; luckUpgradeText.visible = true; // Update shop upgrade text with current values shopUpgradeText.setText(formatNumber(shopPrice) + ' muscle = + ' + formatNumber(1.5) + ' muscle boost'); // Update luck upgrade text with current values luckUpgradeText.setText(formatNumber(luckPrice) + ' win = + 1 luck boost'); } return; } // Check if egg was clicked var eggLeft = egg.x - 75; var eggRight = egg.x + 75; var eggTop = egg.y - 75; var eggBottom = egg.y + 75; if (x >= eggLeft && x <= eggRight && y >= eggTop && y <= eggBottom && win >= 200) { // Deduct 200 win points win -= 200; storage.win = win; // Pet chances with luck boost and cascading decrease system var luckMultiplier = 1 + luckBoost * 0.25; // Pet (first pet) decreases by 5% per luck boost from base 70%, can reach 0 var basePetChance = Math.max(0, 70 * Math.pow(0.95, luckBoost)); // Pet1 decreases by 4% per luck boost from base 30%, can reach 0 var basePet1Chance = Math.max(0, 30 * Math.pow(0.96, luckBoost)); // Pet2 decreases by 3% per luck boost from base 10%, can reach 0 var basePet2Chance = Math.max(0, 10 * Math.pow(0.97, luckBoost)); // Pet3 and Pet4 always increase with luck boost, never decrease var basePet3Chance = 1; var basePet4Chance = 0.05; // For pets that decrease, don't apply luck multiplier, just use base values var petChance = basePetChance; var pet1Chance = basePet1Chance; var pet2Chance = basePet2Chance; var pet3Chance = basePet3Chance * luckMultiplier; var pet4Chance = basePet4Chance * luckMultiplier; var random = Math.random() * 100; // Convert to percentage if (random < pet4Chance) { // Got pet4 pet4Count += 1; storage.pet4Count = pet4Count; } else if (random < pet4Chance + pet3Chance) { // Got pet3 pet3Count += 1; storage.pet3Count = pet3Count; } else if (random < pet4Chance + pet3Chance + pet2Chance) { // Got pet2 pet2Count += 1; storage.pet2Count = pet2Count; } else if (random < pet4Chance + pet3Chance + pet2Chance + pet1Chance) { // Got pet1 pet1Count += 1; storage.pet1Count = pet1Count; } else { // Got pet (remaining chance) petCount += 1; storage.petCount = petCount; } // Recalculate win boost values petWinBoost = petCount * 0.02; pet1WinBoost = pet1Count * 0.06; pet2WinBoost = pet2Count * 0.2; pet3WinBoost = pet3Count * 1.5; pet4WinBoost = pet4Count * 60; totalWinBoost = petWinBoost + pet1WinBoost + pet2WinBoost + pet3WinBoost + pet4WinBoost; // Recalculate pet muscle boost values petMuscleBoost = petCount * 0.01; pet1MuscleBoost = pet1Count * 0.03; pet2MuscleBoost = pet2Count * 0.1; pet3MuscleBoost = pet3Count * 0.75; pet4MuscleBoost = pet4Count * 30; totalPetMuscleBoost = petMuscleBoost + pet1MuscleBoost + pet2MuscleBoost + pet3MuscleBoost + pet4MuscleBoost; // Update win boost display winBoostDisplay.setText('Win Boost: ' + formatNumber(totalWinBoost)); // Update muscle boost display muscleBoostDisplay.setText('Muscle Boost: ' + formatNumber(muscleBoost + totalPetMuscleBoost)); return; } // Check if inventory was clicked (convert screen coordinates to GUI coordinates) var inventoryBounds = { left: LK.gui.width + inventory.x - inventory.width * 0.15, right: LK.gui.width + inventory.x, top: LK.gui.height + inventory.y - inventory.height * 0.15, bottom: LK.gui.height + inventory.y }; if (screenX >= inventoryBounds.left && screenX <= inventoryBounds.right && screenY >= inventoryBounds.top && screenY <= inventoryBounds.bottom) { // Open inventory (don't toggle, only open) if (!isInventoryOpen) { isInventoryOpen = true; inInventoryImage.visible = true; close1Button.visible = true; // Calculate dynamic chances with luck boost var luckMultiplier = 1 + luckBoost * 0.25; // Pet (first pet) decreases by 5% per luck boost from base 70%, can reach 0 var basePetChance = Math.max(0, 70 * Math.pow(0.95, luckBoost)); // Pet1 decreases by 4% per luck boost from base 30%, can reach 0 var basePet1Chance = Math.max(0, 30 * Math.pow(0.96, luckBoost)); // Pet2 decreases by 3% per luck boost from base 10%, can reach 0 var basePet2Chance = Math.max(0, 10 * Math.pow(0.97, luckBoost)); // Pet3 and Pet4 always increase with luck boost, never decrease var basePet3Chance = 1; var basePet4Chance = 0.05; // For pets that decrease, don't apply luck multiplier, just use base values var finalPetChance = basePetChance; var finalPet1Chance = basePet1Chance; var finalPet2Chance = basePet2Chance; var finalPet3Chance = basePet3Chance * luckMultiplier; var finalPet4Chance = basePet4Chance * luckMultiplier; // Show pets if owned if (petCount > 0) { petDisplay.visible = true; petCountText.visible = true; petCountText.setText(formatNumber(petCount) + 'x'); petChanceText.visible = true; petChanceText.setText(formatNumber(finalPetChance) + '%'); petBoostText.visible = true; petBoostText.setText('Win boost = ' + formatNumber(petCount * 0.02)); petMuscleBoostText.visible = true; petMuscleBoostText.setText('Muscle boost = ' + formatNumber(petCount * 0.01)); } if (pet1Count > 0) { pet1Display.visible = true; pet1CountText.visible = true; pet1CountText.setText(formatNumber(pet1Count) + 'x'); pet1ChanceText.visible = true; pet1ChanceText.setText(formatNumber(finalPet1Chance) + '%'); pet1BoostText.visible = true; pet1BoostText.setText('Win boost = ' + formatNumber(pet1Count * 0.06)); pet1MuscleBoostText.visible = true; pet1MuscleBoostText.setText('Muscle boost = ' + formatNumber(pet1Count * 0.03)); } if (pet2Count > 0) { pet2Display.visible = true; pet2CountText.visible = true; pet2CountText.setText(formatNumber(pet2Count) + 'x'); pet2ChanceText.visible = true; pet2ChanceText.setText(formatNumber(finalPet2Chance) + '%'); pet2BoostText.visible = true; pet2BoostText.setText('Win boost = ' + formatNumber(pet2Count * 0.2)); pet2MuscleBoostText.visible = true; pet2MuscleBoostText.setText('Muscle boost = ' + formatNumber(pet2Count * 0.1)); } if (pet3Count > 0) { pet3Display.visible = true; pet3CountText.visible = true; pet3CountText.setText(formatNumber(pet3Count) + 'x'); pet3ChanceText.visible = true; pet3ChanceText.setText(formatNumber(finalPet3Chance) + '%'); pet3BoostText.visible = true; pet3BoostText.setText('Win boost = ' + formatNumber(pet3Count * 1.5)); pet3MuscleBoostText.visible = true; pet3MuscleBoostText.setText('Muscle boost = ' + formatNumber(pet3Count * 0.75)); } if (pet4Count > 0) { pet4Display.visible = true; pet4CountText.visible = true; pet4CountText.setText(formatNumber(pet4Count) + 'x'); pet4ChanceText.visible = true; pet4ChanceText.setText(formatNumber(finalPet4Chance) + '%'); pet4BoostText.visible = true; pet4BoostText.setText('Win boost = ' + formatNumber(pet4Count * 60)); pet4MuscleBoostText.visible = true; pet4MuscleBoostText.setText('Muscle boost = ' + formatNumber(pet4Count * 30)); } } return; } // Check if enemy was clicked and character has muscle >= 10 var enemyLeft = enemy.x - 100; var enemyRight = enemy.x + 100; var enemyTop = enemy.y - 100; var enemyBottom = enemy.y + 100; if (x >= enemyLeft && x <= enemyRight && y >= enemyTop && y <= enemyBottom && muscle >= 10) { // Wait 1.25 seconds then increment win LK.setTimeout(function () { win = formatWin(win + 1 + totalWinBoost); storage.win = win; }, 1250); return; } // Check if weight lifting rectangle was clicked var rectLeft = weightLiftingRect.x - 175; var rectRight = weightLiftingRect.x + 175; var rectTop = weightLiftingRect.y - 70; var rectBottom = weightLiftingRect.y + 70; if (x >= rectLeft && x <= rectRight && y >= rectTop && y <= rectBottom && !isMovingToWeights && !isWaitingAtWeights) { // Move character to weight lifting area isMovingToWeights = true; character.setVelocity(0, 0); // Stop current movement tween(character, { x: weightLiftingRect.x, y: weightLiftingRect.y + 350 }, { duration: 500, easing: tween.easeInOut, onFinish: function onFinish() { isMovingToWeights = false; isWaitingAtWeights = true; // Wait 1 second then increase muscle LK.setTimeout(function () { muscle = Math.round((muscle + 1 + muscleBoost + totalPetMuscleBoost) * 10) / 10; storage.muscle = muscle; isWaitingAtWeights = false; }, 250); } }); return; } // Show joystick at bottom-left area when touched if (x < 400 && y > 2332) { joystick.show(x, y); isDragging = true; var input = joystick.updateHandle(x, y); if (input) { character.setVelocity(input.x * input.magnitude, input.y * input.magnitude); } } }; game.move = function (x, y, obj) { if (isDragging && joystick.isActive && !isMovingToWeights && !isWaitingAtWeights) { var input = joystick.updateHandle(x, y); if (input) { character.setVelocity(input.x * input.magnitude, input.y * input.magnitude); } } }; game.up = function (x, y, obj) { if (isDragging && !isMovingToWeights && !isWaitingAtWeights) { isDragging = false; joystick.hide(); character.setVelocity(0, 0); } }; game.update = function () { // Character update is handled automatically by its update method };
===================================================================
--- original.js
+++ change.js
@@ -303,8 +303,15 @@
var isShopOpen = false; // Track if shop UI is open
var isInventoryOpen = false; // Track if inventory UI is open
// Joystick handle (smaller circle)
// Joystick base (semi-transparent circle)
+// Add gym background image
+var gymBackground = game.addChild(LK.getAsset('gym_background', {
+ anchorX: 0,
+ anchorY: 0
+}));
+gymBackground.x = 0;
+gymBackground.y = 0;
// Character shape
var character = game.addChild(new Character());
character.x = 1024;
character.y = 1366;
2 d az kaslı insan görseli oluştur. In-Game asset. 2d. High contrast. No shadows 1 tane ten renginde
Shop 2 d pixel. In-Game asset. 2d. High contrast. No shadows
Pixel kaslı kol 2d kuş bakışı. In-Game asset. 2d. High contrast. No shadows
Etrafı tablo gibi olan içi gri etrafında kahverengi dışı. In-Game asset. 2d. High contrast. No shadows
1 tane az kaslı yeşil slime yap çok az kası olsun nötr surat olsun. In-Game asset. 2d. High contrast. No shadows ayakları elleri kafası var
Kırmızı kasları ve damarları gözüken slime ama çok değil az gözüken damarları. In-Game asset. 2d. High contrast. No shadows elleri ayakları var kırmızı sinirli insan boyunda kısa değil
Bana sarı kaslı bir slime yap elleri kolları ayakları var kasları kolayca belli oluyo nötr. In-Game asset. 2d. High contrast. No shadows
İnsan boyunda elleri kolları ayakları olan sinirli kaslı damarlı egzotik cyan renginde slime yap. In-Game asset. 2d. High contrast. No shadows
Pixel oyun tarzı köpek balığı peti oluştur 2 d. In-Game asset. 2d. High contrast. No shadows
Ekranı 4 e böl ve 4 tane pet 2 d yap pixel biri papağan biri kaplan biri yılan biri de kemikten oluşan gizemli bir pet siyah kırmızı tarzı renkler kullan. In-Game asset. 2d. High contrast. No shadows
Elleri ayakları kolları olan gökkuşağı renklerinde yüzsüz çok fazla kaslı damarlı slime yap. Tatlı In-Game asset. 2d. High contrast. No shadows