From a50ed331bf48a6a876e92dbf7e372ac6ce7dcb3a Mon Sep 17 00:00:00 2001 From: Acamaeda Date: Sat, 17 Oct 2020 17:14:32 -0400 Subject: [PATCH] We're in the endgame now --- changelog.md | 1 + js/game.js | 5 ++--- js/mod.js | 9 ++++++++- js/v.js | 1 - 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/changelog.md b/changelog.md index f683093..9eb2e2b 100644 --- a/changelog.md +++ b/changelog.md @@ -5,6 +5,7 @@ - Added getStartPoints() - Added the ability to store non-layer-related data - Added the ability to display more things at the top of the tree tab below points. +- Made the endgame condition customizable - Added "sell one" and "sell all" buttons for buyables. - Fixed issues with version number - Fixed number formatting issue making things like "10e9" appear. diff --git a/js/game.js b/js/game.js index aeaeafb..2a845e3 100644 --- a/js/game.js +++ b/js/game.js @@ -6,7 +6,7 @@ var gameEnded = false; // Don't change this const TMT_VERSION = { tmtNum: "2.1", - tmtName: "Non-nonsensical" + tmtName: "We should have thought of this sooner!" } function getResetGain(layer, useType = null) { @@ -267,10 +267,9 @@ VERSION.withoutName = "v" + VERSION.num + (VERSION.pre ? " Pre-Release " + VERSI VERSION.withName = VERSION.withoutName + (VERSION.name ? ": " + VERSION.name : "") -const ENDGAME = new Decimal("e280000000"); function gameLoop(diff) { - if (player.points.gte(ENDGAME) || gameEnded) gameEnded = 1 + if (isEndgame() || gameEnded) gameEnded = 1 if (isNaN(diff)) diff = 0 if (gameEnded && !player.keepGoing) { diff --git a/js/mod.js b/js/mod.js index ec83bec..3baf90e 100644 --- a/js/mod.js +++ b/js/mod.js @@ -12,7 +12,7 @@ let modInfo = { // Set your version in num and name let VERSION = { num: "2.1", - name: "Non-nonsensical!", + name: " We should have thought of this sooner!", } // If you add new functions anywhere inside of a layer, and those functions have an effect when called, add them here. @@ -51,6 +51,13 @@ var displayThings = [ function() {if (inChallenge("c", 11)) return "The game is currently

0%

harder."}, ] +// Determines when the game "ends" +function isEndgame() { + return player.points.gte(new Decimal("e280000000")) +} + + + // Less important things beyond this point! // You can change this if you have things that can be messed up by long tick lengths diff --git a/js/v.js b/js/v.js index a499fc7..0ce8f96 100644 --- a/js/v.js +++ b/js/v.js @@ -412,7 +412,6 @@ function loadVue() { milestoneShown, keepGoing, VERSION, - ENDGAME, LAYERS, hotkeys },