User prompt
prestige başına saniyelik kazanç X3 değerinin olduğunu bir şekilde göster
User prompt
prestige başına gelen saniyedeki kazanç X10 değerini x3 e düşür
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot set properties of undefined (setting 'tint')' in or related to this line: 'musicMuteButton.tint = musicMuted ? 0x27AE60 : 0xE74C3C;' Line Number: 494
User prompt
ayarlardaki sekmeye arkaplan müziği için ve ses efektleri için bir buton ekle o butona basıldığında sesi tamamen kapasın ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
ayarlardan ses seviyesini değiştirdiğimde hiçbirşey olmuyor
User prompt
hala ses seviyesini değiştirdiğimde hiçbirşey değişmiyor
User prompt
hala ses seviyesini değiştirdiğimde hiçbirşey değişmiyor ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
hala ses seviyesini değiştirdiğimde hiçbirşey değişmiyor ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
hala ses seviyesini değiştirdiğimde hiçbirşey değişmiyor ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Please fix the bug: 'Uncaught TypeError: LK.getMusicVolume is not a function' in or related to this line: 'LK.playMusic('bgmusic', {' Line Number: 576
User prompt
ayarlardan ses seviyesini değiştirdiğim zaman hiçbirşey olmuyor
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'reload')' in or related to this line: 'location.reload();' Line Number: 317
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'x')' in or related to this line: 'var localPos = self.toLocal(obj.position);' Line Number: 559
User prompt
oyuna birde ayarlar sekmesi ekleyelim, bu ayarlar sekmesinde arkaplan müziğinin sesini ayarlama, ses efektlerinin ses seviyesini ayarlama gibi şeyler olsun ve en alt kısımda oyunu resetleme butonu olsun. resetleme butonuna basıldığı zaman bir bilgilendirici uyarı ekranı çıksın ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
her prestige edildiğinde prestige etmenin maliyeti artsın ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
oyun yanlızca 5 kez prestige edildiği zaman bitsin ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
her prestige başına saniyelik gelir x10 olsun ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
5 kere prestige edildiği zaman oyun bitsin.prestige etmenin maliyeti 1.000.000 dolar olsun. ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Oyuna save sistemi eklemeliyiz, oyundan çıkıp sonra girdiğimizde paramız ve yükseltmelerimiz kaldığı yerden devam etmeli ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Arka planı görsel olarak değiltirmeli ve Arka plan sesi eklemeliyiz
User prompt
Butonlara basıldığı zaman çıkacak bir animasyon ve ses ekle ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Yükseltmeleri birbirleyile alakalı olucak şekilde yap ve görsel olarak iyileştir ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Görsel olarak iyileştir örneğin limonata standı aldığım zaman limonata standı eklesin gittikçe gelişsin ↪💡 Consider importing and using the following plugins: @upit/tween.v1
Code edit (1 edits merged)
Please save this source code
User prompt
Money Tycoon Empire
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); var storage = LK.import("@upit/storage.v1"); /**** * Classes ****/ var BackgroundElement = Container.expand(function (assetId, x, y, speed, rotationSpeed) { var self = Container.call(this); self.graphic = self.attachAsset(assetId, { anchorX: 0.5, anchorY: 0.5 }); self.x = x; self.y = y; self.speed = speed; self.rotationSpeed = rotationSpeed; self.graphic.alpha = 0.1; // Fade in animation tween(self.graphic, { alpha: 0.3 }, { duration: 2000 + Math.random() * 3000 }); self.update = function () { self.y += self.speed; self.graphic.rotation += self.rotationSpeed; // Reset position when off screen if (self.y > 2800) { self.y = -100; self.x = Math.random() * 2048; } }; return self; }); var Business = Container.expand(function (type, name, baseCost, baseIncome) { var self = Container.call(this); self.type = type; self.name = name; self.baseCost = baseCost; self.baseIncome = baseIncome; self.level = 0; self.cost = baseCost; self.income = 0; var background = self.attachAsset('upgradeButton', { anchorX: 0.5, anchorY: 0.5 }); self.businessIcon = self.attachAsset(type, { anchorX: 0.5, anchorY: 0.5 }); self.businessIcon.x = -200; self.businessIcon.alpha = 0; self.nameText = new Text2(name, { size: 40, fill: 0xFFFFFF }); self.nameText.anchor.set(0.5, 0.3); self.addChild(self.nameText); self.costText = new Text2('$' + self.cost, { size: 32, fill: 0xFFFF00 }); self.costText.anchor.set(0.5, 0.7); self.addChild(self.costText); self.levelText = new Text2('Lv.0', { size: 28, fill: 0x00ff00 }); self.levelText.anchor.set(0.5, 0.5); self.levelText.x = -200; self.levelText.y = 50; self.levelText.alpha = 0; self.addChild(self.levelText); self.updateDisplay = function () { var businessIndex = -1; for (var i = 0; i < businesses.length; i++) { if (businesses[i] === self) { businessIndex = i; break; } } var isUnlocked = businessIndex === -1 ? true : isBusinessUnlocked(businessIndex); var synergyMultiplier = businessIndex === -1 ? 1 : calculateSynergyBonus(businessIndex); var hasBonus = synergyMultiplier > 1; if (!isUnlocked) { background.tint = 0x444444; self.alpha = 0.3; self.costText.setText('LOCKED'); } else { self.costText.setText('$' + formatNumber(self.cost)); if (hasBonus) { background.tint = money >= self.cost ? 0xf39c12 : 0x7f8c8d; } else { background.tint = money >= self.cost ? 0x3498db : 0x7f8c8d; } self.alpha = 1; } self.levelText.setText('Lv.' + self.level + (hasBonus ? ' +' + Math.floor((synergyMultiplier - 1) * 100) + '%' : '')); if (self.level > 0) { self.businessIcon.alpha = Math.min(1, self.level * 0.2 + 0.3); self.levelText.alpha = 1; var scale = Math.min(2, 1 + self.level * 0.1); self.businessIcon.scaleX = scale; self.businessIcon.scaleY = scale; if (hasBonus) { self.businessIcon.tint = 0xf1c40f; } } else { self.businessIcon.alpha = 0; self.levelText.alpha = 0; } }; self.purchase = function () { var businessIndex = -1; for (var i = 0; i < businesses.length; i++) { if (businesses[i] === self) { businessIndex = i; break; } } var isUnlocked = businessIndex === -1 ? true : isBusinessUnlocked(businessIndex); if (money >= self.cost && isUnlocked) { // Button press animation tween(background, { scaleX: 0.95, scaleY: 0.95 }, { duration: 100, onFinish: function onFinish() { tween(background, { scaleX: 1, scaleY: 1 }, { duration: 100 }); } }); money -= self.cost; var wasFirstPurchase = self.level === 0; self.level++; self.income = self.baseIncome * self.level; self.cost = Math.floor(self.baseCost * Math.pow(1.15, self.level)); LK.getSound('purchase').play(); self.updateDisplay(); updateMoneyDisplay(); updateConnections(); // Update all businesses to show new synergy bonuses for (var i = 0; i < businesses.length; i++) { businesses[i].updateDisplay(); } if (wasFirstPurchase) { tween(self.businessIcon, { alpha: 0.5, scaleX: 1.2, scaleY: 1.2 }, { duration: 300, onFinish: function onFinish() { tween(self.businessIcon, { scaleX: 1, scaleY: 1 }, { duration: 200 }); } }); tween(self.levelText, { alpha: 1 }, { duration: 300 }); } else { tween(self.businessIcon, { scaleX: self.businessIcon.scaleX + 0.1, scaleY: self.businessIcon.scaleY + 0.1 }, { duration: 200, onFinish: function onFinish() { tween(self.businessIcon, { scaleX: Math.min(2, 1 + self.level * 0.1), scaleY: Math.min(2, 1 + self.level * 0.1) }, { duration: 100 }); } }); } tween(self, { scaleX: 1.1, scaleY: 1.1 }, { duration: 100, onFinish: function onFinish() { tween(self, { scaleX: 1, scaleY: 1 }, { duration: 100 }); } }); } }; self.down = function (x, y, obj) { self.purchase(); }; return self; }); var PrestigeButton = Container.expand(function () { var self = Container.call(this); var button = self.attachAsset('prestigeButton', { anchorX: 0.5, anchorY: 0.5 }); var prestigeText = new Text2('PRESTIGE', { size: 32, fill: 0xFFFFFF }); prestigeText.anchor.set(0.5, 0.5); self.addChild(prestigeText); self.updateDisplay = function () { var canPrestige = money >= 1000000 && prestigeCount < 5; button.tint = canPrestige ? 0x9b59b6 : 0x7f8c8d; self.alpha = canPrestige ? 1 : 0.5; if (prestigeCount >= 5) { prestigeText.setText('MAX PRESTIGE'); button.tint = 0x444444; self.alpha = 0.3; } else { prestigeText.setText('PRESTIGE (' + prestigeCount + '/5)\n$1,000,000'); } }; self.down = function (x, y, obj) { // Button press animation tween(button, { scaleX: 0.9, scaleY: 0.9 }, { duration: 150, onFinish: function onFinish() { tween(button, { scaleX: 1, scaleY: 1 }, { duration: 150 }); } }); if (money >= 1000000 && prestigeCount < 5) { prestigeCount++; prestigeMultiplier = Math.pow(10, prestigeCount); money = 0; tapValue = Math.floor(1 * Math.pow(10, prestigeCount)); for (var i = 0; i < businesses.length; i++) { businesses[i].level = 0; businesses[i].income = 0; businesses[i].cost = businesses[i].baseCost; businesses[i].updateDisplay(); // Clear saved business data storage['business_' + i + '_level'] = 0; storage['business_' + i + '_cost'] = businesses[i].baseCost; } LK.getSound('prestige').play(); updateMoneyDisplay(); updateIncomeDisplay(); LK.effects.flashScreen(0x9b59b6, 1000); // Check if we've reached max prestiges if (prestigeCount >= 5) { LK.setTimeout(function () { LK.effects.flashScreen(0x00ff00, 2000); LK.showYouWin(); }, 1500); } } }; return self; }); var TapButton = Container.expand(function () { var self = Container.call(this); var button = self.attachAsset('tapButton', { anchorX: 0.5, anchorY: 0.5 }); var tapText = new Text2('TAP\nFOR $' + tapValue, { size: 60, fill: 0xFFFFFF }); tapText.anchor.set(0.5, 0.5); self.addChild(tapText); self.updateDisplay = function () { tapText.setText('TAP\nFOR $' + tapValue); }; self.down = function (x, y, obj) { money += tapValue; updateMoneyDisplay(); LK.getSound('tap').play(); // Enhanced button press animation with color flash tween(button, { tint: 0xFFFFFF }, { duration: 50, onFinish: function onFinish() { tween(button, { tint: 0xFFFFFF }, { duration: 50 }); } }); tween(self, { scaleX: 1.2, scaleY: 1.2 }, { duration: 100, onFinish: function onFinish() { tween(self, { scaleX: 1, scaleY: 1 }, { duration: 100 }); } }); var floatingText = new Text2('+$' + tapValue, { size: 40, fill: 0x00FF00 }); floatingText.anchor.set(0.5, 0.5); floatingText.x = x; floatingText.y = y; game.addChild(floatingText); tween(floatingText, { y: floatingText.y - 100, alpha: 0 }, { duration: 1000, onFinish: function onFinish() { floatingText.destroy(); } }); }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x1a252f }); /**** * Game Code ****/ var money = storage.money || 0; var tapValue = storage.tapValue || 1; var prestigeMultiplier = storage.prestigeMultiplier || 1; var totalEarned = storage.totalEarned || 0; var prestigeCount = storage.prestigeCount || 0; // Update tap value based on prestige multiplier tapValue = Math.floor(1 * Math.pow(10, prestigeCount)); var businesses = []; var businessData = [{ type: 'lemonadeStand', name: 'Lemonade Stand', cost: 10, income: 1, unlockRequirement: null, synergies: ['newspaper'], // Newspaper route helps advertise lemonade synergyBonus: 0.1 // 10% bonus per synergy business level }, { type: 'newspaper', name: 'Newspaper Route', cost: 100, income: 5, unlockRequirement: { business: 0, level: 1 }, // Requires 1 lemonade stand synergies: ['lemonadeStand', 'restaurant'], // Advertises both lemonade and restaurant synergyBonus: 0.15 }, { type: 'carwash', name: 'Car Wash', cost: 500, income: 20, unlockRequirement: { business: 1, level: 2 }, // Requires 2 newspaper routes synergies: ['restaurant'], // Clean cars bring customers to restaurant synergyBonus: 0.2 }, { type: 'restaurant', name: 'Restaurant', cost: 2000, income: 80, unlockRequirement: { business: 2, level: 1 }, // Requires 1 car wash synergies: ['factory'], // Restaurant supplies factory workers synergyBonus: 0.25 }, { type: 'factory', name: 'Factory', cost: 10000, income: 400, unlockRequirement: { business: 3, level: 2 }, // Requires 2 restaurants synergies: ['bank'], // Factory profits go to bank synergyBonus: 0.3 }, { type: 'bank', name: 'Bank', cost: 50000, income: 2000, unlockRequirement: { business: 4, level: 1 }, // Requires 1 factory synergies: ['tech'], // Bank finances tech company synergyBonus: 0.35 }, { type: 'tech', name: 'Tech Company', cost: 250000, income: 10000, unlockRequirement: { business: 5, level: 1 }, // Requires 1 bank synergies: [], // No synergies for final business synergyBonus: 0.4 }]; function formatNumber(num) { if (num >= 1000000000) { return (num / 1000000000).toFixed(1) + 'B'; } else if (num >= 1000000) { return (num / 1000000).toFixed(1) + 'M'; } else if (num >= 1000) { return (num / 1000).toFixed(1) + 'K'; } return Math.floor(num).toString(); } function updateMoneyDisplay() { moneyText.setText('$' + formatNumber(money)); for (var i = 0; i < businesses.length; i++) { businesses[i].updateDisplay(); } prestigeButton.updateDisplay(); if (tapButton.updateDisplay) { tapButton.updateDisplay(); } } function calculateSynergyBonus(businessIndex) { var business = businesses[businessIndex]; var data = businessData[businessIndex]; var synergyMultiplier = 1; if (data.synergies && data.synergies.length > 0) { for (var i = 0; i < data.synergies.length; i++) { var synergyType = data.synergies[i]; for (var j = 0; j < businesses.length; j++) { if (businessData[j].type === synergyType) { synergyMultiplier += businesses[j].level * data.synergyBonus; break; } } } } return synergyMultiplier; } function isBusinessUnlocked(businessIndex) { var data = businessData[businessIndex]; if (!data.unlockRequirement) return true; var requiredBusiness = businesses[data.unlockRequirement.business]; return requiredBusiness && requiredBusiness.level >= data.unlockRequirement.level; } function updateIncomeDisplay() { var totalIncome = 0; for (var i = 0; i < businesses.length; i++) { var baseIncome = businesses[i].income; var synergyMultiplier = calculateSynergyBonus(i); var finalIncome = baseIncome * synergyMultiplier * prestigeMultiplier; totalIncome += finalIncome; } incomeText.setText('$' + formatNumber(totalIncome) + '/sec'); } var moneyText = new Text2('$' + formatNumber(money), { size: 80, fill: 0xF1C40F }); moneyText.anchor.set(0.5, 0); LK.gui.top.addChild(moneyText); var incomeText = new Text2('$0/sec', { size: 50, fill: 0xE74C3C }); incomeText.anchor.set(0.5, 0); incomeText.y = 100; LK.gui.top.addChild(incomeText); var tapButton = game.addChild(new TapButton()); tapButton.x = 1024; tapButton.y = 800; for (var i = 0; i < businessData.length; i++) { var business = new Business(businessData[i].type, businessData[i].name, businessData[i].cost, businessData[i].income); business.x = 1024; business.y = 1200 + i * 140; // Load saved business data var savedLevel = storage['business_' + i + '_level'] || 0; var savedCost = storage['business_' + i + '_cost'] || businessData[i].cost; business.level = savedLevel; business.cost = savedCost; business.income = businessData[i].income * savedLevel; businesses.push(business); game.addChild(business); } var prestigeButton = game.addChild(new PrestigeButton()); prestigeButton.x = 1024; prestigeButton.y = 2500; var winText = new Text2('TECH EMPIRE UNLOCKED!', { size: 60, fill: 0xFFFFFF }); winText.anchor.set(0.5, 0.5); winText.x = 1024; winText.y = 1366; winText.alpha = 0; game.addChild(winText); var connectionLines = []; var backgroundElements = []; // Create animated background elements for (var i = 0; i < 8; i++) { var assetTypes = ['bgCircle1', 'bgCircle2', 'bgCircle3', 'bgRect1', 'bgRect2']; var randomAsset = assetTypes[Math.floor(Math.random() * assetTypes.length)]; var bgElement = new BackgroundElement(randomAsset, Math.random() * 2048, Math.random() * 2732, 0.2 + Math.random() * 0.8, (Math.random() - 0.5) * 0.02); backgroundElements.push(bgElement); game.addChild(bgElement); } // Update displays after loading saved data for (var i = 0; i < businesses.length; i++) { businesses[i].updateDisplay(); } updateMoneyDisplay(); updateIncomeDisplay(); updateConnections(); // Play background music LK.playMusic('bgmusic', { fade: { start: 0, end: 0.3, duration: 2000 } }); // Create gradient overlay for visual depth var gradientOverlay = LK.getAsset('upgradeButton', { anchorX: 0, anchorY: 0, scaleX: 3.5, scaleY: 4.5 }); gradientOverlay.tint = 0x0f1419; gradientOverlay.alpha = 0.4; gradientOverlay.x = 0; gradientOverlay.y = 0; game.addChild(gradientOverlay); function createConnectionLine(fromBusiness, toBusiness) { var line = new Container(); var connectionShape = line.attachAsset('upgradeButton', { anchorX: 0.5, anchorY: 0.5, scaleX: 0.1, scaleY: 0.5 }); connectionShape.tint = 0x27ae60; connectionShape.alpha = 0.3; var midX = (fromBusiness.x + toBusiness.x) / 2; var midY = (fromBusiness.y + toBusiness.y) / 2; line.x = midX; line.y = midY; var angle = Math.atan2(toBusiness.y - fromBusiness.y, toBusiness.x - fromBusiness.x); line.rotation = angle; game.addChild(line); connectionLines.push(line); return line; } function updateConnections() { // Clear existing connections for (var i = 0; i < connectionLines.length; i++) { connectionLines[i].destroy(); } connectionLines = []; // Create new connections based on synergies for (var i = 0; i < businesses.length; i++) { var business = businesses[i]; var data = businessData[i]; if (business.level > 0 && data.synergies) { for (var j = 0; j < data.synergies.length; j++) { var synergyType = data.synergies[j]; for (var k = 0; k < businesses.length; k++) { if (businessData[k].type === synergyType && businesses[k].level > 0) { var line = createConnectionLine(business, businesses[k]); tween(line, { alpha: 0.6 }, { duration: 500 }); break; } } } } } } var hasWon = false; var lastIncomeUpdate = 0; game.update = function () { if (LK.ticks % 60 === 0) { var totalIncome = 0; for (var i = 0; i < businesses.length; i++) { var baseIncome = businesses[i].income; var synergyMultiplier = calculateSynergyBonus(i); var finalIncome = baseIncome * synergyMultiplier * prestigeMultiplier; totalIncome += finalIncome; } if (totalIncome > 0) { money += totalIncome; totalEarned += totalIncome; updateMoneyDisplay(); } if (totalIncome !== lastIncomeUpdate) { updateIncomeDisplay(); lastIncomeUpdate = totalIncome; } } // Game only ends when 5 prestiges are completed (handled in PrestigeButton) if (LK.ticks % 300 === 0) { storage.money = money; storage.tapValue = tapValue; storage.prestigeMultiplier = prestigeMultiplier; storage.totalEarned = totalEarned; storage.prestigeCount = prestigeCount; // Save business data for (var i = 0; i < businesses.length; i++) { storage['business_' + i + '_level'] = businesses[i].level; storage['business_' + i + '_cost'] = businesses[i].cost; } } };
===================================================================
--- original.js
+++ change.js
@@ -651,18 +651,9 @@
updateIncomeDisplay();
lastIncomeUpdate = totalIncome;
}
}
- if (!hasWon && totalEarned >= 1000000) {
- hasWon = true;
- tween(winText, {
- alpha: 1
- }, {
- duration: 1000
- });
- LK.effects.flashScreen(0x00ff00, 2000);
- LK.showYouWin();
- }
+ // Game only ends when 5 prestiges are completed (handled in PrestigeButton)
if (LK.ticks % 300 === 0) {
storage.money = money;
storage.tapValue = tapValue;
storage.prestigeMultiplier = prestigeMultiplier;
Üzerinde yazılara benzer çizgiler olan gazete. In-Game asset. 2d. High contrast. No shadows
Mavi arabayı kırmızı yıkama pompası ile yıkama logosu. In-Game asset. 2d. High contrast. No shadows
1 dolar. In-Game asset. 2d. High contrast. No shadows
Üstünde dolar logosu olan banka. In-Game asset. 2d. High contrast. No shadows
Fabrika logosu. In-Game asset. 2d. High contrast. No shadows
Restoran logosu. In-Game asset. 2d. High contrast. No shadows
teknoloji şirketi logosu. In-Game asset. 2d. High contrast. No shadows
içinde limon dilimleri, buz ve pipet olan bir limonata bardağı. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat