User prompt
Fix the bug that score doesn't go higher than 9.99e+20
User prompt
Chance upgrade5 multplier to x1.02
User prompt
When ascend multiplier gain goes over 1e+20 use scientific notation in the text
User prompt
When score goes over 1e+20 use scientific notation
User prompt
Make upgrade5 multiply score gian for pressing the button by x1.1
User prompt
Make ascend multiplier gain *score )^ 0.25*
User prompt
Make ascend multiplier gain *score )^ 0.5*
User prompt
Make ascend multiplier (score power to 0.50)
User prompt
Remove prestige
User prompt
Ascend text shows how much multiplier you get if you ascend
User prompt
Prestige resets score
User prompt
You can prestige when you have 10000000 score
User prompt
Remove text *Prestige*. Add how much multiplier you are getting in prestige
User prompt
Please fix the bug: 'TypeError: prestige.children[0].setText is not a function' in or related to this line: 'prestige.children[0].setText('Prestige x' + prestigeMultiplier.toFixed(2));' Line Number: 287
User prompt
Please fix the bug: 'TypeError: prestige.children[0].setText is not a function' in or related to this line: 'prestige.children[0].setText('Prestige x' + prestigeMultiplier.toFixed(2).toString());' Line Number: 287
User prompt
Please fix the bug: 'TypeError: prestige.children[0].setText is not a function' in or related to this line: 'prestige.children[0].setText('Prestige x' + prestigeMultiplier.toFixed(2));' Line Number: 287
User prompt
Please fix the bug: 'TypeError: prestige.children[0].setText is not a function' in or related to this line: 'prestige.children[0].setText('Prestige x' + prestigeMultiplier.toFixed(2).toString());' Line Number: 287
User prompt
Please fix the bug: 'TypeError: prestige.children[0].setText is not a function' in or related to this line: 'prestige.children[0].setText('Prestige x' + prestigeMultiplier.toFixed(2));' Line Number: 287
User prompt
Please fix the bug: 'TypeError: prestigeMultiplier.toFixed is not a function' in or related to this line: 'prestige.children[0].setText('Prestige x' + prestigeMultiplier.toFixed(2));' Line Number: 287
User prompt
Please fix the bug: 'TypeError: prestige.children[0].setText is not a function' in or related to this line: 'prestige.children[0].setText('Prestige x' + prestigeMultiplier);' Line Number: 287
User prompt
Show how much multiplier you are getting in prestige
User prompt
Make prestige multiply ascend gain. Prestige (ScoreĆ·10000000=x1.00)
User prompt
Make prestige multiply ascend multiplier gain
User prompt
Put prestige next to ascend
User prompt
Make the text in ascend button show how much multiplier you are getting
/**** * Classes ****/ var Ascend = Container.expand(function () { var self = Container.call(this); // Create and attach an ascend asset var ascendGraphics = self.attachAsset('Ascend', { anchorX: 0.5, anchorY: 0.5 }); // Add multiplier text to the ascend button var multiplierTxt = new Text2('x' + (LK.getScore() / 100000).toFixed(2), { size: 50, fill: 0x000000 }); self.updateMultiplierText = function () { var ascendMultiplier = LK.getScore() / 100000; var prestigeMultiplier = LK.getScore() / 10000000; var totalMultiplier = ascendMultiplier * prestigeMultiplier; multiplierTxt.setText('x' + totalMultiplier.toFixed(2)); }; multiplierTxt.anchor.set(0.5, 0.5); self.addChild(multiplierTxt); // Event handler for when the ascend is clicked self.down = function (x, y, obj) { // Check if the score is over 100000 before allowing ascend if (LK.getScore() > 100000) { var ascendMultiplier = LK.getScore() / 100000; var prestigeMultiplier = LK.getScore() / 10000000; var totalMultiplier = ascendMultiplier * prestigeMultiplier; circle.coinsPerClick *= totalMultiplier; LK.setScore(0); // Reset score after applying multiplier self.updateMultiplierText(); } }; }); //<Assets used in the game will automatically appear here> //<Write imports for supported plugins here> // Define a ClickableCircle class var ClickableCircle = Container.expand(function () { var self = Container.call(this); self.coinsPerClick = 1; // Create and attach a circle asset var circleGraphics = self.attachAsset('circle', { anchorX: 0.5, anchorY: 0.5 }); // Event handler for when the circle is clicked self.down = function (x, y, obj) { // Increase score by coinsPerClick when the circle is clicked LK.setScore(LK.getScore() + self.coinsPerClick); scoreTxt.setText(LK.getScore()); }; }); var Prestige = Container.expand(function () { var self = Container.call(this); // Create and attach a prestige asset var prestigeGraphics = self.attachAsset('Prestige', { anchorX: 0.5, anchorY: 0.5 }); // Add text to the prestige button var prestigeMultiplier = (LK.getScore() / 10000000).toFixed(2); var prestigeTxt = new Text2('Prestige x' + prestigeMultiplier, { size: 50, fill: 0x000000 }); prestigeTxt.anchor.set(0.5, 0.5); self.addChild(prestigeTxt); // Event handler for when the prestige is clicked self.down = function (x, y, obj) { // Implement prestige logic here console.log("Prestige button clicked"); }; }); var Upgrade = Container.expand(function () { var self = Container.call(this); self.cost = 20; // Create and attach an upgrade asset var upgradeGraphics = self.attachAsset('Upgrade', { anchorX: 0.5, anchorY: 0.5 }); // Add cost text to the upgrade button var costTxt = new Text2(self.cost.toString(), { size: 100, fill: 0x000000 }); costTxt.anchor.set(0.5, 0.5); self.addChild(costTxt); // Event handler for when the upgrade is clicked self.down = function (x, y, obj) { // Check if the player has enough score to purchase the upgrade if (LK.getScore() >= self.cost) { // Deduct the cost of the upgrade from the score LK.setScore(LK.getScore() - self.cost); scoreTxt.setText(LK.getScore()); // Increase coins per click by 1 when the upgrade is clicked circle.coinsPerClick += 1; // Update the cost text costTxt.setText(self.cost.toString()); } }; }); var Upgrade2 = Container.expand(function () { var self = Container.call(this); self.cost = 200; // Create and attach an upgrade2 asset var upgrade2Graphics = self.attachAsset('Upgrade2', { anchorX: 0.5, anchorY: 0.5 }); // Add cost text to the upgrade2 button var costTxt = new Text2(self.cost.toString(), { size: 100, fill: 0x000000 }); costTxt.anchor.set(0.5, 0.5); self.addChild(costTxt); // Event handler for when the upgrade2 is clicked self.down = function (x, y, obj) { // Check if the player has enough score to purchase the upgrade2 if (LK.getScore() >= self.cost) { // Deduct the cost of the upgrade2 from the score LK.setScore(LK.getScore() - self.cost); scoreTxt.setText(LK.getScore()); // Increase coins per click by 5 when the upgrade2 is clicked circle.coinsPerClick += 5; // Update the cost text costTxt.setText(self.cost.toString()); } }; }); var Upgrade3 = Container.expand(function () { var self = Container.call(this); self.cost = 2500; // Create and attach an upgrade3 asset var upgrade3Graphics = self.attachAsset('Upgrade3', { anchorX: 0.5, anchorY: 0.5 }); // Add cost text to the upgrade3 button var costTxt = new Text2(self.cost.toString(), { size: 100, fill: 0x000000 }); costTxt.anchor.set(0.5, 0.5); self.addChild(costTxt); // Event handler for when the upgrade3 is clicked self.down = function (x, y, obj) { // Check if the player has enough score to purchase the upgrade3 if (LK.getScore() >= self.cost) { // Deduct the cost of the upgrade3 from the score LK.setScore(LK.getScore() - self.cost); scoreTxt.setText(LK.getScore()); // Increase coins per click by 25 when the upgrade3 is clicked circle.coinsPerClick += 25; // Update the cost text costTxt.setText(self.cost.toString()); } }; }); var Upgrade4 = Container.expand(function () { var self = Container.call(this); self.cost = 25000; // Create and attach an upgrade4 asset var upgrade4Graphics = self.attachAsset('Upgrade4', { anchorX: 0.5, anchorY: 0.5 }); // Add cost text to the upgrade4 button var costTxt = new Text2(self.cost.toString(), { size: 100, fill: 0x000000 }); costTxt.anchor.set(0.5, 0.5); self.addChild(costTxt); // Event handler for when the upgrade4 is clicked self.down = function (x, y, obj) { // Check if the player has enough score to purchase the upgrade4 if (LK.getScore() >= self.cost) { // Deduct the cost of the upgrade4 from the score LK.setScore(LK.getScore() - self.cost); scoreTxt.setText(LK.getScore()); // Increase coins per click by 100 when the upgrade4 is clicked circle.coinsPerClick += 100; // Update the cost text costTxt.setText(self.cost.toString()); } }; }); var Upgrade5 = Container.expand(function () { var self = Container.call(this); self.cost = 100000; // Create and attach an upgrade5 asset var upgrade5Graphics = self.attachAsset('Upgrade5', { anchorX: 0.5, anchorY: 0.5 }); // Add cost text to the upgrade5 button var costTxt = new Text2(self.cost.toString(), { size: 100, fill: 0x000000 }); costTxt.anchor.set(0.5, 0.5); self.addChild(costTxt); // Event handler for when the upgrade5 is clicked self.down = function (x, y, obj) { // Check if the player has enough score to purchase the upgrade5 if (LK.getScore() >= self.cost) { // Deduct the cost of the upgrade5 from the score LK.setScore(LK.getScore() - self.cost); scoreTxt.setText(LK.getScore()); // Increase coins per click by 300 when the upgrade5 is clicked circle.coinsPerClick += 300; // Update the cost text costTxt.setText(self.cost.toString()); } }; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x000000 //Init game with black background }); /**** * Game Code ****/ // Initialize score text var scoreTxt = new Text2('0', { size: 150, fill: 0xFFFFFF }); scoreTxt.anchor.set(0.5, 0); LK.gui.top.addChild(scoreTxt); // Create a clickable circle and add it to the game var circle = game.addChild(new ClickableCircle()); circle.x = 2048 / 2; circle.y = 2732 / 2; // Create an upgrade and add it to the game var upgrade = game.addChild(new Upgrade()); upgrade.x = 2048 / 2 - 700; upgrade.y = 2732 / 3; // Create an upgrade2 and add it to the game var upgrade2 = game.addChild(new Upgrade2()); upgrade2.x = upgrade.x + upgrade.width + 50; upgrade2.y = upgrade.y; // Update function called every game tick // Create an upgrade3 and add it to the game var upgrade3 = game.addChild(new Upgrade3()); upgrade3.x = upgrade2.x + upgrade2.width + 50; upgrade3.y = upgrade2.y; // Create an upgrade4 and add it to the game var upgrade4 = game.addChild(new Upgrade4()); upgrade4.x = upgrade3.x + upgrade3.width + 50; upgrade4.y = upgrade3.y; // Create an upgrade5 and add it to the game var upgrade5 = game.addChild(new Upgrade5()); upgrade5.x = upgrade4.x + upgrade4.width + 50; upgrade5.y = upgrade4.y; // Create an ascend and add it to the game var ascend = game.addChild(new Ascend()); ascend.x = 2048 / 2; ascend.y = upgrade5.y + upgrade5.height + 650; // Create a prestige and add it to the game var prestige = game.addChild(new Prestige()); prestige.x = ascend.x + ascend.width + 50; prestige.y = ascend.y; game.update = function () { ascend.updateMultiplierText(); var prestigeMultiplier = LK.getScore() / 10000000; prestige.children[0].setText('Prestige x' + prestigeMultiplier.toFixed(2)); };
===================================================================
--- original.js
+++ change.js
@@ -271,6 +271,6 @@
prestige.y = ascend.y;
game.update = function () {
ascend.updateMultiplierText();
var prestigeMultiplier = LK.getScore() / 10000000;
- prestige.children[0].setText('Prestige x' + prestigeMultiplier.toFixed(2).toString());
+ prestige.children[0].setText('Prestige x' + prestigeMultiplier.toFixed(2));
};
\ No newline at end of file