From 38c2785d308905aeb2a7dd246a63f75f367fd03c Mon Sep 17 00:00:00 2001 From: wktr <94459237+WiktorProj@users.noreply.github.com> Date: Tue, 10 Sep 2024 16:34:03 +0200 Subject: [PATCH] 0.4_1/2.1 --- MeTMT/js/layers.js | 23 +++++++++++++++++++++-- MeTMT/js/mod.js | 8 ++++++-- MeTMT/js/utils/NumberFormating.js | 19 +++++++++++-------- 3 files changed, 38 insertions(+), 12 deletions(-) diff --git a/MeTMT/js/layers.js b/MeTMT/js/layers.js index 92ffdda..d5e05f7 100644 --- a/MeTMT/js/layers.js +++ b/MeTMT/js/layers.js @@ -66,7 +66,8 @@ addLayer("+", { ["display-text", "

Please like this game the colors took so long ;-;

" ], - ['infobox', 'help'] + ['infobox', 'help'], + ['infobox', 'cap'] ], }, }, @@ -74,7 +75,20 @@ addLayer("+", { help: { title: "Help for colors and sizes", body() { - return "

Big text

means that something is dynamic
Colored text with a shadow mean layers/layer points
There are currently 7 colors that mean something:
Points
Addition layer
" + (player['+'].points.gte(1) ? "Prestige" : makeid(8)) + " layer
" + (player['+'].points.gte(5) ? "Rebirth" : makeid(7)) + " layer
" + (player['+'].points.gte(8) ? "Mega" : makeid(4)) + " layer
" + (player['+'].points.gte(11) ? "Ultra" : makeid(5)) + " layer
" + (player['+'].points.gte(19) ? "Infinity" : makeid(8)) + " layer
Colored dynamic text means that it uses a formula based off of the colors above" }, + return "

Big text

means that something is dynamic
Colored text with a shadow mean layers/layer points
There are currently 7 colors that mean something:
Points
Addition layer
" + (player['+'].points.gte(1) ? "Prestige" : makeid(8)) + " layer
" + (player['+'].points.gte(5) ? "Rebirth" : makeid(7)) + " layer
" + (player['+'].points.gte(8) ? "Mega" : makeid(4)) + " layer
" + (player['+'].points.gte(11) ? "Ultra" : makeid(5)) + " layer
" + (player['+'].points.gte(19) ? "Infinity" : makeid(8)) + " layer
Colored dynamic text means that it uses a formula based off of the colors above" + }, + }, + cap: { + title: "Addition cap", + body() { + return "Addition cap is currently " + format(additionCap) + } + } + }, + automate() { + if (player['+'].points.gt(additionCap)) { + player['+'].points = new Decimal(additionCap) + overginded = true } }, gainMult() { // Calculate the multiplier for main currency from bonuses @@ -202,6 +216,11 @@ addLayer("a", { done() {return hasUpgrade('i', 17)} }, 31: { + name: "You tried ¯\\_(ツ)_/¯", + tooltip: "Try to overgrind for additions", + done() {return overginded} + }, + 32: { name: "Infinity of infinities", tooltip: "Get 2^1024 infinities", done() {return player['i'].points.gte(new Decimal(2).pow(1024))} diff --git a/MeTMT/js/mod.js b/MeTMT/js/mod.js index 0ca549d..5f50211 100644 --- a/MeTMT/js/mod.js +++ b/MeTMT/js/mod.js @@ -13,14 +13,16 @@ let modInfo = { // Set your version in num and name let VERSION = { - num: "0.4½", - name: "The option update", + num: "0.4½.1", + name: "The option update T1", } let changelog = `galaxy has a changelog you don't need this one!` let winText = `Wow! You won! But there will be more soon...` +let additionCap = 20 + // If you add new functions anywhere inside of a layer, and those functions have an effect when called, add them here. // (The ones here are examples, all official functions are already taken care of) var doNotCallTheseFunctionsEveryTick = ["blowUpEverything"] @@ -34,6 +36,8 @@ function canGenPoints(){ return true } +overginded = false + // Calculate points/sec! function getPointGen() { if(!canGenPoints()) return new Decimal(0) diff --git a/MeTMT/js/utils/NumberFormating.js b/MeTMT/js/utils/NumberFormating.js index 18999ef..7993bb4 100644 --- a/MeTMT/js/utils/NumberFormating.js +++ b/MeTMT/js/utils/NumberFormating.js @@ -147,14 +147,17 @@ function standardFormat(decimal) { if (decimal.eq(0)) return "0" e = decimal.log10().div(3).floor().clampMin(0) prefix = "" - prefix += symbols[0][e.div(10000).floor().mod(10)] - prefix += symbols[1][e.div(100000).floor().mod(10)] - prefix += symbols[2][e.div(1000000).floor().mod(10)] - prefix += e.div(1000).floor().mod(10).neq(0) ? "Mi" : "" - prefix += symbols[0][e.mod(10)] - prefix += symbols[1][e.div(10).floor().mod(10)] - prefix += symbols[2][e.div(100).floor().mod(10)] - if (first[e] != undefined) prefix = first[e] + if (first[e] != undefined) { prefix = first[e] } else { + decimal = decimal.div(1000) + e = decimal.log10().div(3).floor().clampMin(0) + prefix += symbols[0][e.div(10000).floor().mod(10)] + prefix += symbols[1][e.div(100000).floor().mod(10)] + prefix += symbols[2][e.div(1000000).floor().mod(10)] + prefix += e.div(1000).floor().mod(10).neq(0) ? "Mi" : "" + prefix += symbols[0][e.mod(10)] + prefix += symbols[1][e.div(10).floor().mod(10)] + prefix += symbols[2][e.div(100).floor().mod(10)] + } return (e.lt(3000) ? defaultFormat(decimal.div(new Decimal(10).pow(e.times(3)))) : "1") + prefix }