User prompt
Make ascending availeble for infinite times
User prompt
Give only +1 score per click without upgrades
User prompt
Ascend multiplier activates when you ascend
User prompt
Give +1 per click with out upgrades
User prompt
Make Ascend multiplier to not add up
User prompt
Make +1 score for clicking the button
User prompt
Apply ascend after first ascend
User prompt
Make ascend multiplier multiply final score got for pressing the button (upgrade bonuses included)
User prompt
Don't multiply upgrade5 from multiplier
User prompt
Make the upgrades +score multiply from multiplier
User prompt
Change upgrade5 multiply score gain for clicking the button by x1.1
User prompt
Change ascend multiplier gain *score)^0.25*
User prompt
Do not stack multipliers from ascends
User prompt
Change ascend multiplier gain *score)^0.1*
User prompt
Chance upgrade5 multiply score gain for pressing the button by x1.01
User prompt
Chance ascend multiplier gain *score)^0.05*
User prompt
Chance ascend multiplier gain *score)^0.15
User prompt
Use sientific notation
User prompt
Fix bug not allowing to go over +9.99e+20 score for pressing the button
User prompt
Remove score cap
User prompt
When score goes over 1.80e+308 use scientific notation
User prompt
Fix crash at score going over 9.99e+20
User prompt
Make score for pressing the button cap 1e+308
User prompt
Make score cap 1e+308
User prompt
Fix game bug after reaching 1e+21
/**** * 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 multiplier = Math.pow(LK.getScore(), 0.15); if (multiplier > 1e+20) { multiplierTxt.setText('x' + multiplier.toExponential(2)); } else { multiplierTxt.setText('x' + multiplier.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 multiplier = Math.pow(LK.getScore(), 0.15); circle.coinsPerClick *= multiplier; 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); var score = LK.getScore(); scoreTxt.setText(score > 1e+20 ? score.toExponential(2) : score); }; }); 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()); // Multiply coins per click by 1.1 when the upgrade5 is clicked circle.coinsPerClick *= 1.02; // 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; game.update = function () { ascend.updateMultiplierText(); };
===================================================================
--- original.js
+++ change.js
@@ -13,9 +13,9 @@
size: 50,
fill: 0x000000
});
self.updateMultiplierText = function () {
- var multiplier = Math.pow(LK.getScore(), 0.25);
+ var multiplier = Math.pow(LK.getScore(), 0.15);
if (multiplier > 1e+20) {
multiplierTxt.setText('x' + multiplier.toExponential(2));
} else {
multiplierTxt.setText('x' + multiplier.toFixed(2));
@@ -26,9 +26,9 @@
// 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 multiplier = Math.pow(LK.getScore(), 0.25);
+ var multiplier = Math.pow(LK.getScore(), 0.15);
circle.coinsPerClick *= multiplier;
LK.setScore(0); // Reset score after applying multiplier
self.updateMultiplierText();
}
@@ -49,9 +49,9 @@
self.down = function (x, y, obj) {
// Increase score by coinsPerClick when the circle is clicked
LK.setScore(LK.getScore() + self.coinsPerClick);
var score = LK.getScore();
- scoreTxt.setText(score > 9.99e+20 ? score.toExponential(2) : score.toString());
+ scoreTxt.setText(score > 1e+20 ? score.toExponential(2) : score);
};
});
var Upgrade = Container.expand(function () {
var self = Container.call(this);
@@ -73,9 +73,9 @@
// 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() > 9.99e+20 ? LK.getScore().toExponential(2) : LK.getScore().toString());
+ 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());
@@ -102,9 +102,9 @@
// 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() > 9.99e+20 ? LK.getScore().toExponential(2) : LK.getScore().toString());
+ 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());
@@ -131,9 +131,9 @@
// 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() > 9.99e+20 ? LK.getScore().toExponential(2) : LK.getScore().toString());
+ 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());
@@ -160,9 +160,9 @@
// 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() > 9.99e+20 ? LK.getScore().toExponential(2) : LK.getScore().toString());
+ 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());
@@ -189,9 +189,9 @@
// 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() > 9.99e+20 ? LK.getScore().toExponential(2) : LK.getScore().toString());
+ scoreTxt.setText(LK.getScore());
// Multiply coins per click by 1.1 when the upgrade5 is clicked
circle.coinsPerClick *= 1.02;
// Update the cost text
costTxt.setText(self.cost.toString());