User prompt
Please fix the bug: 'Error: Invalid value. Only literals or 1-level deep objects/arrays containing literals are allowed.' in or related to this line: 'storage.achievements = achievements;' Line Number: 1026 ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Add everything a clicker could possibly need ↪💡 Consider importing and using the following plugins: @upit/tween.v1, @upit/storage.v1
User prompt
Add a REALLY cool update so this update looks like something new was added ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
I still see the gun bro remove it from the game completely
User prompt
Make the gun invisible into 100 clicks
User prompt
Also make sure the gun isn’t the default skin. Make sure it only unlocks at 100 clicks.
User prompt
Little bit more to the left then a little bit down
User prompt
To the left
User prompt
Move it to the right until it hits the border of the dog
User prompt
Move the gun outside of the dog picture, but put it ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Remove gun barrel
User prompt
I still have eight points at the start make this say zero
User prompt
Make it so the dog skin changes every big amount of clicks the first skin will be the dog holding a gun make a gun and assets ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
On a multiplier, make sure it counts up to the number not just like teleport to the number ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Move the dog, a little bit to the left
User prompt
Make sure every upgrade isn’t the same price
User prompt
Make sure every single upgrade goes from cheap to expensive
User prompt
Put the upgrades a little bit more to the right
User prompt
Make the UI slightly bigger
User prompt
Fit every text in the box. Also move the summer clicker text slightly to the left.
User prompt
OK, make everything in the UI bigger
User prompt
Make the third upgrade a little bit more expensive
User prompt
Make the precious little bit more spaced
User prompt
Add peaceful background music
User prompt
But obviously make the points go up when I click the dog just make it so I start off at zero, but then when I click get more, but when I start the game when I opened the game zero but when I click build up one, then I get enough for an upgrade and it builds up to the multiplier then that’s how clickers work
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); var storage = LK.import("@upit/storage.v1"); /**** * Classes ****/ var ClickEffect = Container.expand(function () { var self = Container.call(this); var effectGraphics = self.attachAsset('clickEffect', { anchorX: 0.5, anchorY: 0.5, alpha: 0.8, scaleX: 0.3, scaleY: 0.3 }); self.animate = function () { tween(effectGraphics, { scaleX: 1.5, scaleY: 1.5, alpha: 0 }, { duration: 400, easing: tween.easeOut, onFinish: function onFinish() { self.destroy(); } }); }; return self; }); var DogPark = Container.expand(function () { var self = Container.call(this); var dogParkGraphics = self.attachAsset('dogPark', { anchorX: 0.5, anchorY: 0.5 }); self.updateSkin = function () { // Skin system exists but no visual changes needed }; self.bounce = function () { tween(dogParkGraphics, { scaleX: 1.2, scaleY: 1.2 }, { duration: 100, easing: tween.easeOut, onFinish: function onFinish() { tween(dogParkGraphics, { scaleX: 1, scaleY: 1 }, { duration: 100, easing: tween.easeOut }); } }); }; self.down = function (x, y, obj) { var basePoints = (1 + pointsPerClick) * prestigeMultiplier; points += basePoints; totalClicks += 1; checkSkinUnlock(); self.bounce(); LK.getSound('click').play(); var effect = new ClickEffect(); effect.x = x; effect.y = y; game.addChild(effect); effect.animate(); updateUI(); saveGame(); }; return self; }); var MultiplierOrb = Container.expand(function () { var self = Container.call(this); var orbGraphics = self.attachAsset('multiplierOrb', { anchorX: 0.5, anchorY: 0.5, alpha: 0.8 }); self["float"] = function () { tween(orbGraphics, { y: orbGraphics.y - 20 }, { duration: 1500, easing: tween.easeInOut, onFinish: function onFinish() { tween(orbGraphics, { y: orbGraphics.y + 20 }, { duration: 1500, easing: tween.easeInOut, onFinish: function onFinish() { self["float"](); } }); } }); }; return self; }); var PrestigeButton = Container.expand(function () { var self = Container.call(this); var buttonGraphics = self.attachAsset('prestigeButton', { anchorX: 0.5, anchorY: 0.5, scaleX: 0.95, scaleY: 1.0 }); var titleText = new Text2('PRESTIGE', { size: 48, fill: 0x000000 }); titleText.anchor.set(0.5, 0.5); titleText.y = -25; self.addChild(titleText); var rewardText = new Text2('Reset for +' + calculatePrestigeReward() + 'x multiplier', { size: 32, fill: 0x8B0000 }); rewardText.anchor.set(0.5, 0.5); rewardText.y = 15; self.addChild(rewardText); var costText = new Text2('Requires: 1M total clicks', { size: 28, fill: 0x444444 }); costText.anchor.set(0.5, 0.5); costText.y = 45; self.addChild(costText); self.updateDisplay = function () { var reward = calculatePrestigeReward(); rewardText.setText('Reset for +' + reward + 'x multiplier'); if (totalClicks >= 1000000) { buttonGraphics.tint = 0xFFFFFF; titleText.tint = 0x000000; } else { buttonGraphics.tint = 0x666666; titleText.tint = 0x999999; } }; self.down = function (x, y, obj) { if (totalClicks >= 1000000) { performPrestige(); } }; return self; }); var PrestigeParticle = Container.expand(function () { var self = Container.call(this); var particleGraphics = self.attachAsset('prestigeParticle', { anchorX: 0.5, anchorY: 0.5, alpha: 1.0, scaleX: 0.5, scaleY: 0.5 }); self.animate = function () { var randomX = (Math.random() - 0.5) * 800; var randomY = -Math.random() * 400 - 200; tween(self, { x: self.x + randomX, y: self.y + randomY }, { duration: 2000, easing: tween.easeOut }); tween(particleGraphics, { scaleX: 1.5, scaleY: 1.5, alpha: 0 }, { duration: 2000, easing: tween.easeOut, onFinish: function onFinish() { self.destroy(); } }); }; return self; }); var UpgradeButton = Container.expand(function (upgradeData) { var self = Container.call(this); var buttonGraphics = self.attachAsset('upgradeButton', { anchorX: 0.5, anchorY: 0.5, scaleX: 0.9, scaleY: 1.0 }); self.upgradeData = upgradeData; var nameText = new Text2(upgradeData.name, { size: 36, fill: 0xFFFFFF }); nameText.anchor.set(0, 0.5); nameText.x = -200; nameText.y = -20; self.addChild(nameText); var costText = new Text2('Cost: ' + upgradeData.cost, { size: 28, fill: 0xFFFF00 }); costText.anchor.set(0, 0.5); costText.x = -200; costText.y = 10; self.addChild(costText); var countText = new Text2('Owned: ' + upgradeData.owned, { size: 24, fill: 0xCCCCCC }); countText.anchor.set(1, 0.5); countText.x = 200; countText.y = 0; self.addChild(countText); self.updateDisplay = function () { costText.setText('Cost: ' + upgradeData.cost); countText.setText('Owned: ' + upgradeData.owned); if (points >= upgradeData.cost) { buttonGraphics.tint = 0xFFFFFF; // Bright white when affordable } else { buttonGraphics.tint = 0x666666; // Dark gray when not affordable } }; self.down = function (x, y, obj) { if (points >= upgradeData.cost) { points -= upgradeData.cost; upgradeData.owned++; if (upgradeData.type === 'click') { pointsPerClick += upgradeData.power; } else if (upgradeData.type === 'auto') { pointsPerSecond += upgradeData.power; } // Exponential cost increase formula upgradeData.cost = Math.floor(upgradeData.baseCost * Math.pow(1.15, upgradeData.owned)); // Play cash register sound LK.getSound('cashRegister').play(); // Flash button pink tween(buttonGraphics, { tint: 0xFF69B4 }, { duration: 200, easing: tween.easeOut, onFinish: function onFinish() { updateUI(); } }); saveGame(); } }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x8B4B9C }); /**** * Game Code ****/ // Game state variables var points = 0; var pointsPerClick = 0; // Always start at 0, will be calculated from upgrades var pointsPerSecond = 0; // Always start at 0, will be calculated from upgrades var totalClicks = storage.totalClicks || 0; var currentSkin = storage.currentSkin || 0; var skinMilestones = [0, 100, 500, 1000, 2500, 5000, 10000, 25000, 50000, 100000]; // Prestige system variables var prestigeLevel = storage.prestigeLevel || 0; var prestigeMultiplier = 1 + prestigeLevel * 0.5; // +50% per prestige level var multiplierOrbs = []; function calculatePrestigeReward() { return Math.floor(totalClicks / 1000000) * 0.5; } function createPrestigeParticles(centerX, centerY) { for (var i = 0; i < 15; i++) { var particle = new PrestigeParticle(); particle.x = centerX + (Math.random() - 0.5) * 100; particle.y = centerY + (Math.random() - 0.5) * 100; game.addChild(particle); particle.animate(); } } function performPrestige() { var reward = calculatePrestigeReward(); prestigeLevel += reward; prestigeMultiplier = 1 + prestigeLevel * 0.5; // Create particle explosion createPrestigeParticles(dogPark.x, dogPark.y); // Flash screen gold LK.effects.flashScreen(0xffd700, 1500); // Reset game state but keep prestige bonuses points = 0; pointsPerClick = 0; pointsPerSecond = 0; totalClicks = 0; currentSkin = 0; // Reset all upgrades for (var i = 0; i < upgrades.length; i++) { upgrades[i].owned = 0; upgrades[i].cost = upgrades[i].baseCost; } // Create multiplier orbs around dog createMultiplierOrbs(); // Update everything updateUI(); dogPark.updateSkin(); saveGame(); } function createMultiplierOrbs() { // Clear existing orbs for (var i = 0; i < multiplierOrbs.length; i++) { multiplierOrbs[i].destroy(); } multiplierOrbs = []; // Create new orbs based on prestige level var orbCount = Math.min(prestigeLevel, 8); for (var i = 0; i < orbCount; i++) { var orb = new MultiplierOrb(); var angle = i / orbCount * Math.PI * 2; orb.x = dogPark.x + Math.cos(angle) * 300; orb.y = dogPark.y + Math.sin(angle) * 200; multiplierOrbs.push(orb); game.addChild(orb); orb["float"](); // Animate orb appearance orb.alpha = 0; orb.scaleX = 0; orb.scaleY = 0; tween(orb, { alpha: 0.8, scaleX: 1, scaleY: 1 }, { duration: 800, easing: tween.elasticOut }); } } // Upgrade definitions with exponential growth - ordered from cheapest to most expensive var upgrades = [{ name: 'Squeaky Toy', type: 'click', cost: storage.squeakyToyCost || 15, baseCost: 15, power: 1, owned: storage.squeakyToyOwned || 0 }, { name: 'Dog Walker', type: 'auto', cost: storage.dogWalkerCost || 50, baseCost: 50, power: 1, owned: storage.dogWalkerOwned || 0 }, { name: 'Tennis Ball', type: 'click', cost: storage.tennisBallCost || 100, baseCost: 100, power: 5, owned: storage.tennisBallOwned || 0 }, { name: 'Poop Bag Station', type: 'auto', cost: storage.poopBagStationCost || 500, baseCost: 500, power: 8, owned: storage.poopBagStationOwned || 0 }, { name: 'Premium Treats', type: 'click', cost: storage.premiumTreatsCost || 1200, baseCost: 1200, power: 47, owned: storage.premiumTreatsOwned || 0 }, { name: 'Dog Fountain', type: 'auto', cost: storage.dogFountainCost || 8000, baseCost: 8000, power: 47, owned: storage.dogFountainOwned || 0 }, { name: 'Chew Bone', type: 'click', cost: storage.chewBoneCost || 15000, baseCost: 15000, power: 260, owned: storage.chewBoneOwned || 0 }, { name: 'Agility Course', type: 'auto', cost: storage.agilityCourseC || 90000, baseCost: 90000, power: 260, owned: storage.agilityCourseo || 0 }, { name: 'Diamond Collar', type: 'click', cost: storage.diamondCollarCost || 180000, baseCost: 180000, power: 1400, owned: storage.diamondCollarOwned || 0 }, { name: 'Dog Daycare', type: 'auto', cost: storage.dogDaycareCost || 900000, baseCost: 900000, power: 1400, owned: storage.dogDaycareOwned || 0 }, { name: 'Golden Leash', type: 'click', cost: storage.goldenLeashCost || 1800000, baseCost: 1800000, power: 7800, owned: storage.goldenLeashOwned || 0 }, { name: 'Mobile Grooming Van', type: 'auto', cost: storage.mobileGroomingVanCost || 9000000, baseCost: 9000000, power: 7800, owned: storage.mobileGroomingVanOwned || 0 }, { name: 'Laser Pointer', type: 'click', cost: storage.laserPointerCost || 27000000, baseCost: 27000000, power: 44000, owned: storage.laserPointerOwned || 0 }, { name: 'Dog Hotel', type: 'auto', cost: storage.dogHotelCost || 135000000, baseCost: 135000000, power: 44000, owned: storage.dogHotelOwned || 0 }, { name: 'Robotic Paw', type: 'click', cost: storage.roboticPawCost || 540000000, baseCost: 540000000, power: 260000, owned: storage.roboticPawOwned || 0 }, { name: 'Bark Park', type: 'auto', cost: storage.barkParkCost || 2700000000, baseCost: 2700000000, power: 260000, owned: storage.barkParkOwned || 0 }, { name: 'Tail Wag Generator', type: 'click', cost: storage.tailWagGeneratorCost || 8100000000, baseCost: 8100000000, power: 1600000, owned: storage.tailWagGeneratorOwned || 0 }, { name: 'Doggy Resort Chain', type: 'auto', cost: storage.doggyResortChainCost || 40500000000, baseCost: 40500000000, power: 1600000, owned: storage.doggyResortChainOwned || 0 }, { name: 'Frisbee Factory', type: 'click', cost: storage.frisbeeFactoryCost || 121500000000, baseCost: 121500000000, power: 10000000, owned: storage.frisbeeFactoryOwned || 0 }, { name: 'Canine Island', type: 'auto', cost: storage.canineIslandCost || 607500000000, baseCost: 607500000000, power: 10000000, owned: storage.canineIslandOwned || 0 }, { name: 'Doghouse Empire', type: 'click', cost: storage.doghouseEmpireCost || 1822500000000, baseCost: 1822500000000, power: 65000000, owned: storage.doghouseEmpireOwned || 0 }, { name: 'Puppy Planet', type: 'auto', cost: storage.puppyPlanetCost || 9112500000000, baseCost: 9112500000000, power: 65000000, owned: storage.puppyPlanetOwned || 0 }, { name: 'Biscuit Factory', type: 'auto', cost: storage.biscuitFactoryCost || 136687500000000, baseCost: 136687500000000, power: 430000000, owned: storage.biscuitFactoryOwned || 0 }, { name: 'Fetch Robot Workshop', type: 'auto', cost: storage.fetchRobotWorkshopCost || 2733750000000000, baseCost: 2733750000000000, power: 2900000000, owned: storage.fetchRobotWorkshopOwned || 0 }, { name: 'Treat Plantation', type: 'auto', cost: storage.treatPlantationCost || 41006250000000000, baseCost: 41006250000000000, power: 21000000000, owned: storage.treatPlantationOwned || 0 }, { name: 'Doggy Spa Chain', type: 'auto', cost: storage.doggySpaChainCost || 615093750000000000, baseCost: 615093750000000000, power: 150000000000, owned: storage.doggySpaChainOwned || 0 }, { name: 'Canine Universe', type: 'auto', cost: storage.canineUniverseCost || 9226406250000000000, baseCost: 9226406250000000000, power: 1100000000000, owned: storage.canineUniverseOwned || 0 }]; // Sort upgrades from cheapest to most expensive upgrades.sort(function (a, b) { return a.baseCost - b.baseCost; }); // Load saved upgrade states for (var i = 0; i < upgrades.length; i++) { var upgrade = upgrades[i]; if (upgrade.type === 'click') { pointsPerClick += upgrade.owned * upgrade.power; } else if (upgrade.type === 'auto') { pointsPerSecond += upgrade.owned * upgrade.power; } } // UI Elements var pointsDisplay = new Text2('Points: ' + Math.floor(points), { size: 90, fill: 0xFFFFFF }); pointsDisplay.anchor.set(0.5, 0); LK.gui.top.addChild(pointsDisplay); var displayPerSecond = pointsPerSecond; // Track the displayed value for animation var perSecondDisplay = new Text2('Per Second: ' + displayPerSecond, { size: 70, fill: 0xFFFF00 }); perSecondDisplay.anchor.set(0.5, 0); perSecondDisplay.y = 110; LK.gui.top.addChild(perSecondDisplay); // Dog Park title var dogParkTitle = new Text2('Summer Clicker', { size: 150, fill: 0x000000 }); dogParkTitle.anchor.set(0.5, 0.5); dogParkTitle.x = 900; dogParkTitle.y = 550; game.addChild(dogParkTitle); // Prestige display var prestigeDisplay = new Text2('Prestige Level: ' + prestigeLevel + ' (x' + prestigeMultiplier.toFixed(1) + ')', { size: 60, fill: 0xffd700 }); prestigeDisplay.anchor.set(0.5, 0); prestigeDisplay.y = 190; LK.gui.top.addChild(prestigeDisplay); // Prestige button var prestigeButton = new PrestigeButton(); prestigeButton.x = 300; prestigeButton.y = 1800; game.addChild(prestigeButton); // Main dog park var dogPark = game.addChild(new DogPark()); dogPark.x = 900; dogPark.y = 1366; // Initialize current skin dogPark.updateSkin(); // Create scrollable upgrade container var upgradeContainer = new Container(); upgradeContainer.x = 1700; upgradeContainer.y = 400; game.addChild(upgradeContainer); // Upgrade buttons var upgradeButtons = []; for (var i = 0; i < upgrades.length; i++) { var button = new UpgradeButton(upgrades[i]); button.x = 0; button.y = i * 200; upgradeButtons.push(button); upgradeContainer.addChild(button); } // Scroll variables var scrollY = 0; var maxScroll = Math.max(0, upgrades.length * 200 - 1800); var lastTouchY = 0; var isDragging = false; // Auto-clicker timer var autoClickTimer = 0; function updateUI() { pointsDisplay.setText('Points: ' + Math.floor(points)); prestigeDisplay.setText('Prestige Level: ' + prestigeLevel + ' (x' + prestigeMultiplier.toFixed(1) + ')'); // Animate per second display if value changed var adjustedPerSecond = Math.floor(pointsPerSecond * prestigeMultiplier); if (displayPerSecond !== adjustedPerSecond) { tween.stop({ displayPerSecond: true }); // Stop any existing tween tween({ displayPerSecond: displayPerSecond }, { displayPerSecond: adjustedPerSecond }, { duration: 800, easing: tween.easeOut, onUpdate: function onUpdate() { perSecondDisplay.setText('Per Second: ' + Math.floor(displayPerSecond)); }, onFinish: function onFinish() { displayPerSecond = adjustedPerSecond; perSecondDisplay.setText('Per Second: ' + adjustedPerSecond); } }); } else { perSecondDisplay.setText('Per Second: ' + adjustedPerSecond); } for (var i = 0; i < upgradeButtons.length; i++) { upgradeButtons[i].updateDisplay(); } prestigeButton.updateDisplay(); } function checkSkinUnlock() { for (var i = skinMilestones.length - 1; i >= 0; i--) { if (totalClicks >= skinMilestones[i] && currentSkin < i) { currentSkin = i; dogPark.updateSkin(); // Flash effect for skin unlock LK.effects.flashScreen(0x00ff00, 500); break; } } } function saveGame() { storage.points = points; storage.totalClicks = totalClicks; storage.currentSkin = currentSkin; storage.prestigeLevel = prestigeLevel; // Don't save pointsPerClick or pointsPerSecond - they should be calculated from upgrades for (var i = 0; i < upgrades.length; i++) { var upgrade = upgrades[i]; var baseName = upgrade.name.replace(/\s+/g, ''); storage[baseName.toLowerCase() + 'Cost'] = upgrade.cost; storage[baseName.toLowerCase() + 'Owned'] = upgrade.owned; } } // Initialize prestige orbs if player has prestige levels if (prestigeLevel > 0) { createMultiplierOrbs(); } // Initial UI update updateUI(); // Start peaceful background music LK.playMusic('peacefulBgMusic'); // Touch controls for scrolling game.down = function (x, y, obj) { if (x > 1300) { isDragging = true; lastTouchY = y; } }; game.up = function (x, y, obj) { isDragging = false; }; game.move = function (x, y, obj) { if (isDragging && x > 1300) { var deltaY = y - lastTouchY; scrollY = Math.max(0, Math.min(maxScroll, scrollY - deltaY)); upgradeContainer.y = 400 - scrollY; lastTouchY = y; } }; game.update = function () { // Auto-clicker logic autoClickTimer++; if (autoClickTimer >= 60) { // Every second at 60 FPS points += pointsPerSecond * prestigeMultiplier; autoClickTimer = 0; updateUI(); if (pointsPerSecond > 0) { saveGame(); } } // Save periodically if (LK.ticks % 300 === 0) { // Every 5 seconds saveGame(); } };
===================================================================
--- original.js
+++ change.js
@@ -58,9 +58,10 @@
}
});
};
self.down = function (x, y, obj) {
- points += 1 + pointsPerClick; // Base 1 point per click + upgrade bonuses
+ var basePoints = (1 + pointsPerClick) * prestigeMultiplier;
+ points += basePoints;
totalClicks += 1;
checkSkinUnlock();
self.bounce();
LK.getSound('click').play();
@@ -73,8 +74,116 @@
saveGame();
};
return self;
});
+var MultiplierOrb = Container.expand(function () {
+ var self = Container.call(this);
+ var orbGraphics = self.attachAsset('multiplierOrb', {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ alpha: 0.8
+ });
+ self["float"] = function () {
+ tween(orbGraphics, {
+ y: orbGraphics.y - 20
+ }, {
+ duration: 1500,
+ easing: tween.easeInOut,
+ onFinish: function onFinish() {
+ tween(orbGraphics, {
+ y: orbGraphics.y + 20
+ }, {
+ duration: 1500,
+ easing: tween.easeInOut,
+ onFinish: function onFinish() {
+ self["float"]();
+ }
+ });
+ }
+ });
+ };
+ return self;
+});
+var PrestigeButton = Container.expand(function () {
+ var self = Container.call(this);
+ var buttonGraphics = self.attachAsset('prestigeButton', {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ scaleX: 0.95,
+ scaleY: 1.0
+ });
+ var titleText = new Text2('PRESTIGE', {
+ size: 48,
+ fill: 0x000000
+ });
+ titleText.anchor.set(0.5, 0.5);
+ titleText.y = -25;
+ self.addChild(titleText);
+ var rewardText = new Text2('Reset for +' + calculatePrestigeReward() + 'x multiplier', {
+ size: 32,
+ fill: 0x8B0000
+ });
+ rewardText.anchor.set(0.5, 0.5);
+ rewardText.y = 15;
+ self.addChild(rewardText);
+ var costText = new Text2('Requires: 1M total clicks', {
+ size: 28,
+ fill: 0x444444
+ });
+ costText.anchor.set(0.5, 0.5);
+ costText.y = 45;
+ self.addChild(costText);
+ self.updateDisplay = function () {
+ var reward = calculatePrestigeReward();
+ rewardText.setText('Reset for +' + reward + 'x multiplier');
+ if (totalClicks >= 1000000) {
+ buttonGraphics.tint = 0xFFFFFF;
+ titleText.tint = 0x000000;
+ } else {
+ buttonGraphics.tint = 0x666666;
+ titleText.tint = 0x999999;
+ }
+ };
+ self.down = function (x, y, obj) {
+ if (totalClicks >= 1000000) {
+ performPrestige();
+ }
+ };
+ return self;
+});
+var PrestigeParticle = Container.expand(function () {
+ var self = Container.call(this);
+ var particleGraphics = self.attachAsset('prestigeParticle', {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ alpha: 1.0,
+ scaleX: 0.5,
+ scaleY: 0.5
+ });
+ self.animate = function () {
+ var randomX = (Math.random() - 0.5) * 800;
+ var randomY = -Math.random() * 400 - 200;
+ tween(self, {
+ x: self.x + randomX,
+ y: self.y + randomY
+ }, {
+ duration: 2000,
+ easing: tween.easeOut
+ });
+ tween(particleGraphics, {
+ scaleX: 1.5,
+ scaleY: 1.5,
+ alpha: 0
+ }, {
+ duration: 2000,
+ easing: tween.easeOut,
+ onFinish: function onFinish() {
+ self.destroy();
+ }
+ });
+ };
+ return self;
+});
var UpgradeButton = Container.expand(function (upgradeData) {
var self = Container.call(this);
var buttonGraphics = self.attachAsset('upgradeButton', {
anchorX: 0.5,
@@ -161,8 +270,80 @@
var pointsPerSecond = 0; // Always start at 0, will be calculated from upgrades
var totalClicks = storage.totalClicks || 0;
var currentSkin = storage.currentSkin || 0;
var skinMilestones = [0, 100, 500, 1000, 2500, 5000, 10000, 25000, 50000, 100000];
+// Prestige system variables
+var prestigeLevel = storage.prestigeLevel || 0;
+var prestigeMultiplier = 1 + prestigeLevel * 0.5; // +50% per prestige level
+var multiplierOrbs = [];
+function calculatePrestigeReward() {
+ return Math.floor(totalClicks / 1000000) * 0.5;
+}
+function createPrestigeParticles(centerX, centerY) {
+ for (var i = 0; i < 15; i++) {
+ var particle = new PrestigeParticle();
+ particle.x = centerX + (Math.random() - 0.5) * 100;
+ particle.y = centerY + (Math.random() - 0.5) * 100;
+ game.addChild(particle);
+ particle.animate();
+ }
+}
+function performPrestige() {
+ var reward = calculatePrestigeReward();
+ prestigeLevel += reward;
+ prestigeMultiplier = 1 + prestigeLevel * 0.5;
+ // Create particle explosion
+ createPrestigeParticles(dogPark.x, dogPark.y);
+ // Flash screen gold
+ LK.effects.flashScreen(0xffd700, 1500);
+ // Reset game state but keep prestige bonuses
+ points = 0;
+ pointsPerClick = 0;
+ pointsPerSecond = 0;
+ totalClicks = 0;
+ currentSkin = 0;
+ // Reset all upgrades
+ for (var i = 0; i < upgrades.length; i++) {
+ upgrades[i].owned = 0;
+ upgrades[i].cost = upgrades[i].baseCost;
+ }
+ // Create multiplier orbs around dog
+ createMultiplierOrbs();
+ // Update everything
+ updateUI();
+ dogPark.updateSkin();
+ saveGame();
+}
+function createMultiplierOrbs() {
+ // Clear existing orbs
+ for (var i = 0; i < multiplierOrbs.length; i++) {
+ multiplierOrbs[i].destroy();
+ }
+ multiplierOrbs = [];
+ // Create new orbs based on prestige level
+ var orbCount = Math.min(prestigeLevel, 8);
+ for (var i = 0; i < orbCount; i++) {
+ var orb = new MultiplierOrb();
+ var angle = i / orbCount * Math.PI * 2;
+ orb.x = dogPark.x + Math.cos(angle) * 300;
+ orb.y = dogPark.y + Math.sin(angle) * 200;
+ multiplierOrbs.push(orb);
+ game.addChild(orb);
+ orb["float"]();
+ // Animate orb appearance
+ orb.alpha = 0;
+ orb.scaleX = 0;
+ orb.scaleY = 0;
+ tween(orb, {
+ alpha: 0.8,
+ scaleX: 1,
+ scaleY: 1
+ }, {
+ duration: 800,
+ easing: tween.elasticOut
+ });
+ }
+}
// Upgrade definitions with exponential growth - ordered from cheapest to most expensive
var upgrades = [{
name: 'Squeaky Toy',
type: 'click',
@@ -389,8 +570,21 @@
dogParkTitle.anchor.set(0.5, 0.5);
dogParkTitle.x = 900;
dogParkTitle.y = 550;
game.addChild(dogParkTitle);
+// Prestige display
+var prestigeDisplay = new Text2('Prestige Level: ' + prestigeLevel + ' (x' + prestigeMultiplier.toFixed(1) + ')', {
+ size: 60,
+ fill: 0xffd700
+});
+prestigeDisplay.anchor.set(0.5, 0);
+prestigeDisplay.y = 190;
+LK.gui.top.addChild(prestigeDisplay);
+// Prestige button
+var prestigeButton = new PrestigeButton();
+prestigeButton.x = 300;
+prestigeButton.y = 1800;
+game.addChild(prestigeButton);
// Main dog park
var dogPark = game.addChild(new DogPark());
dogPark.x = 900;
dogPark.y = 1366;
@@ -418,34 +612,37 @@
// Auto-clicker timer
var autoClickTimer = 0;
function updateUI() {
pointsDisplay.setText('Points: ' + Math.floor(points));
+ prestigeDisplay.setText('Prestige Level: ' + prestigeLevel + ' (x' + prestigeMultiplier.toFixed(1) + ')');
// Animate per second display if value changed
- if (displayPerSecond !== pointsPerSecond) {
+ var adjustedPerSecond = Math.floor(pointsPerSecond * prestigeMultiplier);
+ if (displayPerSecond !== adjustedPerSecond) {
tween.stop({
displayPerSecond: true
}); // Stop any existing tween
tween({
displayPerSecond: displayPerSecond
}, {
- displayPerSecond: pointsPerSecond
+ displayPerSecond: adjustedPerSecond
}, {
duration: 800,
easing: tween.easeOut,
onUpdate: function onUpdate() {
perSecondDisplay.setText('Per Second: ' + Math.floor(displayPerSecond));
},
onFinish: function onFinish() {
- displayPerSecond = pointsPerSecond;
- perSecondDisplay.setText('Per Second: ' + pointsPerSecond);
+ displayPerSecond = adjustedPerSecond;
+ perSecondDisplay.setText('Per Second: ' + adjustedPerSecond);
}
});
} else {
- perSecondDisplay.setText('Per Second: ' + pointsPerSecond);
+ perSecondDisplay.setText('Per Second: ' + adjustedPerSecond);
}
for (var i = 0; i < upgradeButtons.length; i++) {
upgradeButtons[i].updateDisplay();
}
+ prestigeButton.updateDisplay();
}
function checkSkinUnlock() {
for (var i = skinMilestones.length - 1; i >= 0; i--) {
if (totalClicks >= skinMilestones[i] && currentSkin < i) {
@@ -460,16 +657,21 @@
function saveGame() {
storage.points = points;
storage.totalClicks = totalClicks;
storage.currentSkin = currentSkin;
+ storage.prestigeLevel = prestigeLevel;
// Don't save pointsPerClick or pointsPerSecond - they should be calculated from upgrades
for (var i = 0; i < upgrades.length; i++) {
var upgrade = upgrades[i];
var baseName = upgrade.name.replace(/\s+/g, '');
storage[baseName.toLowerCase() + 'Cost'] = upgrade.cost;
storage[baseName.toLowerCase() + 'Owned'] = upgrade.owned;
}
}
+// Initialize prestige orbs if player has prestige levels
+if (prestigeLevel > 0) {
+ createMultiplierOrbs();
+}
// Initial UI update
updateUI();
// Start peaceful background music
LK.playMusic('peacefulBgMusic');
@@ -495,9 +697,9 @@
// Auto-clicker logic
autoClickTimer++;
if (autoClickTimer >= 60) {
// Every second at 60 FPS
- points += pointsPerSecond;
+ points += pointsPerSecond * prestigeMultiplier;
autoClickTimer = 0;
updateUI();
if (pointsPerSecond > 0) {
saveGame();