From 343a67100e3ba4ae0013450162b5883436a82834 Mon Sep 17 00:00:00 2001 From: TJCgames Date: Wed, 27 Mar 2024 19:28:39 +0000 Subject: [PATCH] 1.6 --- js/data/achievements.js | 8 ++++---- js/data/files.js | 16 +++++++++------- js/data/tree.js | 4 +++- js/mod.js | 6 +++++- js/utils.js | 11 ++++++++++- 5 files changed, 31 insertions(+), 14 deletions(-) diff --git a/js/data/achievements.js b/js/data/achievements.js index a8fc468..5126e8f 100644 --- a/js/data/achievements.js +++ b/js/data/achievements.js @@ -134,8 +134,8 @@ addLayer("ach", { }, 54: { name: "Retention!", - done() { return hasMilestone('f', 2) }, - tooltip: "Earn Filestone 3." + done() { return hasMilestone('f', 3) }, + tooltip: "Earn Filestone 4." }, 55: { name: "Well that was useful", @@ -179,8 +179,8 @@ addLayer("ach", { }, 73: { name: "And then comes the prestige layer", - done() { return player.points.log(2).gte(128) }, - tooltip: "Reach " + format(Decimal.pow(2, 128)) + " points" + done() { return player.points.log(2).gte(127.9) }, + tooltip: "Reach " + format(Decimal.pow(2, 127.9)) + " points" }, }, tabFormat: [ diff --git a/js/data/files.js b/js/data/files.js index 86a2a6d..ee31cc6 100644 --- a/js/data/files.js +++ b/js/data/files.js @@ -31,18 +31,20 @@ addLayer("f", { getResetGain(canMax = tmp[this.layer].canBuyMax) { let tlyr = tmp[this.layer] let plyr = player[this.layer] - let amount = tlyr.baseAmount.div(tlyr.requires).log(tlyr.base).pow(Decimal.div(1, tlyr.exponent)).add(1) + let amount = tlyr.baseAmount.div(tlyr.requires).log(tlyr.base) + if (amount.gte(0)) amount = amount.root(tlyr.exponent).add(1) .sub(plyr.points.mul(2).add(plyr.total).div(3)).sqrt().floor().max(0) if (isNaN(amount)) return new Decimal(0) if (!canMax && amount.gte(1)) return new Decimal(1) - return amount + return amount.max(0) }, getNextAt(canMax = tmp[this.layer].canBuyMax) { let tlyr = tmp[this.layer] let plyr = player[this.layer] - if (!canMax) return plyr.points.mul(2).add(plyr.total).div(3).pow(tlyr.exponent).pow_base(tlyr.base).mul(tlyr.requires) - return tlyr.getResetGain.pow(2).add(plyr.points).mul(2).add(plyr.total).div(3).pow(tlyr.exponent) + if (!canMax) return plyr.points.mul(2).add(plyr.total).div(3).pow(tlyr.exponent) .pow_base(tlyr.base).mul(tlyr.requires) + return tlyr.getResetGain.plus(1).pow(2).add(plyr.points.mul(2).add(plyr.total).div(3)) + .minus(1).pow(tlyr.exponent).pow_base(tlyr.base).mul(tlyr.requires) }, canReset() { return tmp[this.layer].getResetGain.gte(1) @@ -80,12 +82,12 @@ addLayer("f", { }, done() { return player.f.total.gte(2) } }, - 3: { + 2: { requirementDescription: "3 total Files.", effectDescription: "Halve PP req.", done() { return player.f.total.gte(3) } }, - 2: { + 3: { requirementDescription: "4 total Files.", effectDescription: "SPP no longer resets PP.", done() { return player.f.total.gte(4) } @@ -284,7 +286,7 @@ addLayer("f", { } } }, - layerShown(){ return player.sp.points.gte(400) || player[this.layer].unlocked }, + layerShown(){ return player.sp.points.gte(200) || player[this.layer].unlocked }, branches: ['p'], tabFormat: { filestones: { diff --git a/js/data/tree.js b/js/data/tree.js index 4b24f8c..d6c0fff 100644 --- a/js/data/tree.js +++ b/js/data/tree.js @@ -17,7 +17,9 @@ addNode("blank", { addLayer("tree-tab", { - tabFormat: [["tree", function() {return (layoutInfo.treeLayout ? layoutInfo.treeLayout : TREE_LAYERS)}]], + tabFormat: [ + ["tree", [["p", "sp", "f"], ["i"]]] + ], previousTab: "", leftTab: true, }) \ No newline at end of file diff --git a/js/mod.js b/js/mod.js index c124cbb..5501dd8 100644 --- a/js/mod.js +++ b/js/mod.js @@ -13,11 +13,15 @@ let modInfo = { // Set your version in num and name let VERSION = { - num: "1.5", + num: "1.6", name: "The great rebalancing", } let changelog = `

Changelog:



+

v1.6


+ - General bugfixing.
+ - Made the tree manually generated.
+ - Fixed the .

v1.5


- Clarified some effects.
- Decreased SPP requirement.
diff --git a/js/utils.js b/js/utils.js index d6104e3..f7c96b6 100644 --- a/js/utils.js +++ b/js/utils.js @@ -411,8 +411,17 @@ function gridRun(layer, func, data, id) { return layers[layer].grid[func]; } -// Small functions +/****************** + * CUSTOM METHODS * +*******************/ + function softcap(number, after, method, delta = new Decimal(0)) { if (Decimal.add(number, delta).lt(after)) { return new Decimal(number) } else { return method(Decimal.add(number, delta).sub(after)).add(after).sub(delta) } +} +function unlockAll() { + player.sp.unlocked = true + player.f.unlocked = true + player.f.milestones.push("8") + player.i.unlocked = true } \ No newline at end of file -- 2.45.2