Compare commits

..

No commits in common. "d7ea11fff89ed9b47e9ea1b929a05515c36995a2" and "415b2c2cda29112c8abb22b75302b781f6dcd5ab" have entirely different histories.

10 changed files with 72 additions and 295 deletions

View file

@ -5,8 +5,7 @@ addLayer("ach", {
startData() { return { startData() { return {
unlocked: true, unlocked: true,
has45: false, has45: false,
has55: false, has55: false
has75: false
}}, }},
color: "#9d750d", color: "#9d750d",
effect() { effect() {
@ -174,35 +173,15 @@ addLayer("ach", {
tooltip: "Get all row 6 directory upgrades." tooltip: "Get all row 6 directory upgrades."
}, },
72: { 72: {
name: "I guess one last buyable?", name: "I guess one last achivement?",
done() { return getBuyableAmount('f', 11).gte(10) }, done() { return getBuyableAmount('f', 11).gte(5) },
tooltip: "Get 10 <b>The finale of the intro</b> buyables." tooltip: "Get 5 <b>The finale of the intro</b> buyables."
}, },
73: { 73: {
name: "FOR THE LOVE OF GOD JUST GET BIGGER",
done() { return hasMilestone('f', 13) },
tooltip: "Reach Filestone 14"
},
74: {
name: "And then comes the prestige layer", name: "And then comes the prestige layer",
done() { return player.points.log(2).gte(127.9) }, done() { return player.points.log(2).gte(127.9) },
tooltip: "Reach " + format(Decimal.pow(2, 127.9)) + " points" tooltip: "Reach " + format(Decimal.pow(2, 127.9)) + " points"
}, },
81: {
name: "Is this even balanced?",
done() { return hasMilestone('i', 1) },
tooltip: "Reach Integral milestone 2"
},
75: {
name: "Another one of these?",
done() { return player[this.layer].has75 },
tooltip: "Respec number buyables when you have none."
},
82: {
name: "A... number?",
done() { return hasMilestone('i', 2) },
tooltip: "Reach Integral milestone 3"
},
}, },
tabFormat: [ tabFormat: [
"blank", "blank",

View file

@ -28,23 +28,23 @@ addLayer("f", {
if (hasUpgrade(this.layer, 41)) base **= 0.95 if (hasUpgrade(this.layer, 41)) base **= 0.95
return base return base
}, },
effective() {
let plyr = player[this.layer]
return plyr.points.mul(2).add(plyr.total.div(1+hasMilestone('i',0)).div(10**hasMilestone('f',14))).div(3)
},
getResetGain(canMax = tmp[this.layer].canBuyMax) { getResetGain(canMax = tmp[this.layer].canBuyMax) {
let tlyr = tmp[this.layer] let tlyr = tmp[this.layer]
let plyr = player[this.layer]
let amount = tlyr.baseAmount.div(tlyr.requires).log(tlyr.base) let amount = tlyr.baseAmount.div(tlyr.requires).log(tlyr.base)
if (amount.gte(0)) amount = amount.root(tlyr.exponent).add(1).sub(tlyr.effective).sqrt().floor().max(0) 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 (isNaN(amount)) return new Decimal(0)
if (!canMax && amount.gte(1)) return new Decimal(tlyr.directMult) if (!canMax && amount.gte(1)) return new Decimal(1)
return amount.max(0).mul(tlyr.directMult) return amount.max(0)
}, },
getNextAt(canMax = tmp[this.layer].canBuyMax) { getNextAt(canMax = tmp[this.layer].canBuyMax) {
let tlyr = tmp[this.layer] let tlyr = tmp[this.layer]
if (!canMax) return tlyr.effective.pow(tlyr.exponent).pow_base(tlyr.base).mul(tlyr.requires) let plyr = player[this.layer]
return tlyr.getResetGain.div(tlyr.directMult).floor().plus(1).pow(2).add(tlyr.effective).sub(1) if (!canMax) return plyr.points.mul(2).add(plyr.total).div(3).pow(tlyr.exponent)
.pow(tlyr.exponent).pow_base(tlyr.base).mul(tlyr.requires) .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() { canReset() {
return tmp[this.layer].getResetGain.gte(1) return tmp[this.layer].getResetGain.gte(1)
@ -60,9 +60,6 @@ addLayer("f", {
gainExp() { // Calculate the exponent on main currency from bonuses gainExp() { // Calculate the exponent on main currency from bonuses
return new Decimal(1) return new Decimal(1)
}, },
directMult() { // Calculate the multiplier for main currency from bonuses
return new Decimal(1).add(hasMilestone('i', 0) ? 1 : 0)
},
canBuyMax() { canBuyMax() {
return hasMilestone(this.layer, 8) return hasMilestone(this.layer, 8)
}, },
@ -71,17 +68,11 @@ addLayer("f", {
hotkeys: [ hotkeys: [
{key: "f", description: "F: Reset for files", onPress(){if (canReset(this.layer)) doReset(this.layer)}}, {key: "f", description: "F: Reset for files", onPress(){if (canReset(this.layer)) doReset(this.layer)}},
], ],
doReset(resettingLayer) {
if (layers[resettingLayer].row <= this.row) return;
let keep = []
layerDataReset(this.layer, keep)
if (hasMilestone('i', 1)) player[this.layer].total = player[this.layer].points = player[this.layer].points.max(5)
},
milestones: { milestones: {
0: { 0: {
requirementDescription: "1 total File.", requirementDescription: "1 total File.",
effectDescription: "Triple PP and SPP gen.", effectDescription: "Triple PP and SPP gen.",
done() { return player[this.layer].total.gte(1) } done() { return player.f.total.gte(1) }
}, },
1: { 1: {
requirementDescription: "2 total Files.", requirementDescription: "2 total Files.",
@ -89,88 +80,62 @@ addLayer("f", {
return "Total levels and super levels boost point gen.<br>Effect: x" return "Total levels and super levels boost point gen.<br>Effect: x"
+ format(getTotalLevel().add(getTotalSuperLevel()).add(7).log(2)) + "." + format(getTotalLevel().add(getTotalSuperLevel()).add(7).log(2)) + "."
}, },
done() { return player[this.layer].total.gte(2) } done() { return player.f.total.gte(2) }
}, },
2: { 2: {
requirementDescription: "3 total Files.", requirementDescription: "3 total Files.",
effectDescription: "Halve PP req.", effectDescription: "Halve PP req.",
done() { return player[this.layer].total.gte(3) } done() { return player.f.total.gte(3) }
}, },
3: { 3: {
requirementDescription: "4 total Files.", requirementDescription: "4 total Files.",
effectDescription: "SPP no longer resets PP.", effectDescription: "SPP no longer resets PP.",
done() { return player[this.layer].total.gte(4) } done() { return player.f.total.gte(4) }
}, },
4: { 4: {
requirementDescription: "5 total Files.", requirementDescription: "5 total Files.",
effectDescription: "Unlock the Directory.", effectDescription: "Unlock the Directory.",
done() { return player[this.layer].total.gte(5) } done() { return player.f.total.gte(5) }
}, },
5: { 5: {
requirementDescription: "6 total Files.", requirementDescription: "6 total Files.",
effectDescription: "Autobuy all PP buyables.", effectDescription: "You can now get fractional levels.",
done() { return player[this.layer].total.gte(6) } done() { return player.f.total.gte(6) }
}, },
6: { 6: {
requirementDescription: "8 total Files.", requirementDescription: "8 total Files.",
effectDescription() { effectDescription() {
return "Total Files boost point gen.<br>Effect: x" + format(player[this.layer].total.div(2).add(1)) + "." return "Total Files boost point gen.<br>Effect: x" + format(player[this.layer].total.div(2).add(1)) + "."
}, },
done() { return player[this.layer].total.gte(8) } done() { return player.f.total.gte(8) }
}, },
7: { 7: {
requirementDescription: "10 total Files.", requirementDescription: "10 total Files.",
effectDescription: "You can now get fractional levels.", effectDescription: "Autobuy all PP buyables.",
done() { return player[this.layer].total.gte(10) } done() { return player.f.total.gte(10) }
}, },
8: { 8: {
requirementDescription: "15 total Files.", requirementDescription: "15 total Files.",
effectDescription: "You can buy max files.", effectDescription: "You can buy max files.",
done() { return player[this.layer].total.gte(15) } done() { return player.f.total.gte(15) }
}, },
9: { 9: {
requirementDescription: "20 total Files.", requirementDescription: "20 total Files.",
effectDescription: "Halve base file cost.", effectDescription: "Halve base file cost.",
done() { return player[this.layer].total.gte(20) } done() { return player.f.total.gte(20) }
}, },
10: { 10: {
requirementDescription: "25 total Files.", requirementDescription: "25 total Files.",
effectDescription: "Autobuy both SPP buyables.", effectDescription: "Autobuy both SPP buyables.",
done() { return player[this.layer].total.gte(25) } done() { return player.f.total.gte(25) }
}, },
11: { 11: {
requirementDescription: "40 total Files.", requirementDescription: "50 total Files.",
effectDescription() { effectDescription() {
return "Total super levels increase second softcap's start.<br>Effect: ^" return "Total super levels boost second softcap.<br>Effect: ^"
+ format(getTotalSuperLevel().pow(1/10).add(1).log(10).add(1)) + "." + format(getTotalSuperLevel().pow(1/10).add(1).log(10).add(1)) + "."
}, },
done() { return player[this.layer].total.gte(40) } done() { return player.f.total.gte(50) }
},
12: {
requirementDescription: "70 total Files.",
effectDescription() {
return "SPP boosts point gen.<br>Effect: x"
+ format(player.sp.points.add(1).log(250).add(1)) + "."
},
done() { return player[this.layer].total.gte(75) }
},
13: {
requirementDescription: "150 total Files.",
effectDescription() {
return "PP boosts point gen.<br>Effect: ^"
+ format(player.p.points.sqrt()) + "."
},
done() { return player[this.layer].total.gte(150) }
},
14: {
requirementDescription: "300 total Files.",
effectDescription: "Total File effect on File cost drastically reduced.",
done() { return player[this.layer].total.gte(300) }
},
15: {
requirementDescription: "500 total Files.",
effectDescription: "First softcap start x1e5.",
done() { return player[this.layer].total.gte(500) }
}, },
}, },
upgrades: { upgrades: {
@ -259,7 +224,7 @@ addLayer("f", {
description: "Total files boost point gen.", description: "Total files boost point gen.",
cost: 14, cost: 14,
canAfford() { return hasUpgrade(this.layer, 43) }, canAfford() { return hasUpgrade(this.layer, 43) },
effect() { return player[this.layer].total.log(10).add(1) }, effect() { return player[this.layer].points.log(10).add(1) },
effectDisplay() { return "^" + format(this.effect()) + "." }, effectDisplay() { return "^" + format(this.effect()) + "." },
branches: [43] branches: [43]
}, },
@ -285,12 +250,11 @@ addLayer("f", {
buyables: { buyables: {
11: { 11: {
title: "The finale of the intro", title: "The finale of the intro",
effect() { return Decimal.pow(3, getBuyableAmount(this.layer, this.id)) }, effect() { return Decimal.pow(1.5, getBuyableAmount(this.layer, this.id)) },
cost() { return Decimal.add(getBuyableAmount(this.layer, this.id), 1).mul(5) }, cost() { return Decimal.mul(getBuyableAmount(this.layer, this.id), 10) },
display() { display() {
return "Increase point gen. after second softcap.<br><br>Amount: " return "Increase point gen.<br><br>Amount: " + format(getBuyableAmount(this.layer, this.id))
+ format(getBuyableAmount(this.layer, this.id)) + ".<br>Effect: x" + ".<br>Effect: x" + format(this.effect(getBuyableAmount(this.layer, this.id))) + ".<br>Cost: "
+ format(this.effect(getBuyableAmount(this.layer, this.id))) + ".<br>Cost: "
+ format(this.cost(getBuyableAmount(this.layer, this.id))) + " Files." + format(this.cost(getBuyableAmount(this.layer, this.id))) + " Files."
}, },
canAfford() { canAfford() {
@ -298,8 +262,8 @@ addLayer("f", {
&& hasUpgrade(this.layer, 61) && hasUpgrade(this.layer, 62) && hasUpgrade(this.layer, 61) && hasUpgrade(this.layer, 62)
}, },
buy() { buy() {
player[this.layer].points = player[this.layer].points.sub(this.cost())
addBuyables(this.layer, this.id, 1) addBuyables(this.layer, this.id, 1)
player[this.layer].points = player[this.layer].points.sub(this.cost())
} }
} }
}, },
@ -323,7 +287,7 @@ addLayer("f", {
} }
}, },
layerShown(){ return player.sp.points.gte(200) || player[this.layer].unlocked }, layerShown(){ return player.sp.points.gte(200) || player[this.layer].unlocked },
branches: ['sp'], branches: ['p'],
tabFormat: { tabFormat: {
filestones: { filestones: {
content: [ content: [
@ -333,8 +297,8 @@ addLayer("f", {
"blank", "blank",
"blank", "blank",
["row", [ ["row", [
["milestones", [0, 2, 4, 6, 8, 10, 12, 14]], ["milestones", [0, 2, 4, 6, 8, 10]],
["milestones", [1, 3, 5, 7, 9, 11, 13, 15]] ["milestones", [1, 3, 5, 7, 9, 11]]
]] ]]
] ]
}, },

View file

@ -4,10 +4,7 @@ addLayer("i", {
position: 0, // Horizontal position within a row. By default it uses the layer id and sorts in alphabetical order position: 0, // Horizontal position within a row. By default it uses the layer id and sorts in alphabetical order
startData() { return { startData() { return {
unlocked: false, unlocked: false,
points: new Decimal(0), points: new Decimal(0)
total: new Decimal(0),
incDelta: 1,
number: [1]
}}, }},
color: "#a62222", color: "#a62222",
requires: Decimal.pow(2, 127.9), // Can be a function that takes requirement increases into account requires: Decimal.pow(2, 127.9), // Can be a function that takes requirement increases into account
@ -27,144 +24,14 @@ addLayer("i", {
hotkeys: [ hotkeys: [
{key: "i", description: "I: reset for integrals", onPress(){if (canReset(this.layer)) doReset(this.layer)}}, {key: "i", description: "I: reset for integrals", onPress(){if (canReset(this.layer)) doReset(this.layer)}},
], ],
milestones: { tabFormat: [
0: { "main-display",
requirementDescription: "1 total Integral.", "prestige-button",
effectDescription: "Gain double Files and halve total File effect on File cost.", "resource-display",
done() { return player[this.layer].total.gte(1) } "blank",
}, "blank",
1: { ["raw-html", "Coming Soon!"]
requirementDescription: "2 total Integrals.", ],
effectDescription: "Start every reset with 1000 PP, 250 SPP, and 5 Files",
done() { return player[this.layer].total.gte(2) }
},
2: {
requirementDescription: "3 total Integrals.",
effectDescription: "Unlock the Number.",
done() { return player[this.layer].total.gte(3) }
},
},
buyables: {
11: {
title: "Longer number",
effect() { return getBuyableAmount(this.layer, this.id).add(1).toNumber() },
cost() { return getBuyableAmount(this.layer, this.id).add(1).mul(2) },
display() {
return "Increase the length of your number.<br><br>Amount: " + format(getBuyableAmount(this.layer, this.id))
+ ".<br>Effect: " + format(this.effect(getBuyableAmount(this.layer, this.id))) + " digits.<br>Cost: "
+ format(this.cost(getBuyableAmount(this.layer, this.id))) + " Integrals."
},
canAfford() { return Decimal.gte(player[this.layer].points, this.cost()) },
buy() {
player[this.layer].points = player[this.layer].points.sub(this.cost())
addBuyables(this.layer, this.id, 1)
player[this.layer].number.push(0)
}
},
12: {
title: "Faster incrementing",
effect() { return getBuyableAmount(this.layer, this.id).add(1).pow(1.3).toNumber() },
cost() { return getBuyableAmount(this.layer, this.id).add(1).mul(3) },
display() {
return "Increase the speed of incrementing.<br><br>Amount: " + format(getBuyableAmount(this.layer, this.id))
+ ".<br>Effect: " + format(this.effect(getBuyableAmount(this.layer, this.id))) + "/s.<br>Cost: "
+ format(this.cost(getBuyableAmount(this.layer, this.id))) + " Integrals."
},
canAfford() { return Decimal.gte(player[this.layer].points, this.cost()) },
buy() {
player[this.layer].points = player[this.layer].points.sub(this.cost())
addBuyables(this.layer, this.id, 1)
}
},
13: {
title: "Higher base",
effect() { return getBuyableAmount(this.layer, this.id).add(2).toNumber() },
cost() { return getBuyableAmount(this.layer, this.id).add(1).mul(10) },
display() {
return "Increase the base of your number.<br><br>Amount: " + format(getBuyableAmount(this.layer, this.id))
+ "/" + format(this.purchaseLimit) + ".<br>Effect: "
+ format(this.effect(getBuyableAmount(this.layer, this.id))) + ".<br>Cost: "
+ format(this.cost(getBuyableAmount(this.layer, this.id))) + " Integrals."
},
canAfford() { return Decimal.gte(player[this.layer].points, this.cost()) },
buy() {
player[this.layer].points = player[this.layer].points.sub(this.cost())
addBuyables(this.layer, this.id, 1)
},
purchaseLimit: 34
},
},
numberEffect() {
return Math.sqrt(player[this.layer].number.reduceRight((x, y) => x * buyableEffect('i', 13) + y) + 1)
},
update(diff) {
if (isNaN(diff)) return
player[this.layer].incDelta += diff
player[this.layer].number[0] += Math.floor(player[this.layer].incDelta * buyableEffect('i', 12))
player[this.layer].incDelta %= 1/buyableEffect('i', 12)
for (let i = 0; i < player[this.layer].number.length - 1; i ++) {
player[this.layer].number[i+1] += Math.floor(player[this.layer].number[i] / buyableEffect('i', 13))
player[this.layer].number[i] %= buyableEffect('i', 13)
}
if (player[this.layer].number[player[this.layer].number.length - 1] >= buyableEffect('i', 13)) {
player[this.layer].number = new Array(buyableEffect('i', 11)).fill(buyableEffect('i', 13) - 1)
}
},
clickables: {
21: {
display() { return "Reset number buyables" },
onClick() {
if (confirm("Are you sure you want to respec? This will reset your number.")) {
if ([11, 12, 13].map(n => getBuyableAmount(this.layer, n)).reduce((a, b) => a.add(b)).eq(0)) {
player.ach.has75 = true
}
player[this.layer].points = player[this.layer].total
player[this.layer].buyables[11] = new Decimal(0)
player[this.layer].buyables[12] = new Decimal(0)
player[this.layer].buyables[13] = new Decimal(0)
}
},
canClick() { return true },
style: {
width: "60px",
minHeight: "60px"
}
}
},
tabFormat: {
main: {
content: [
"main-display",
"prestige-button",
"resource-display",
"blank",
"blank",
"milestones",
["raw-html", "More content coming your way!"]
]
},
number: {
content: [
"main-display",
"prestige-button",
"resource-display",
"blank",
"blank",
["raw-html", function() {
return `Your number is <h2 style="color: rgb(166, 34, 34); text-shadow: rgb(166, 34, 34) 0px 0px 10px;">`
+ player[this.layer].number.map(x => "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[x]).reverse().join('')
+ `</h2><br>in base <h3 style="color: rgb(166, 34, 34); text-shadow: rgb(166, 34, 34) 0px 0px 10px;">`
+ format(buyableEffect(this.layer, 13))
+ `</h3>,<br>giving you x<h2 style="color: rgb(166, 34, 34); text-shadow: rgb(166, 34, 34) 0px 0px 10px;">`
+ format(tmp[this.layer].numberEffect)
+ `</h2> to point, PP, and SPP gen.`
}],
"blank",
["buyables", [1]]
],
unlocked() { return hasMilestone('i', 2) }
}
},
layerShown(){ return player.points.gte("1e25") || player[this.layer].unlocked }, layerShown(){ return player.points.gte("1e25") || player[this.layer].unlocked },
branches: ['p', 'sp', 'f'] branches: ['p', 'sp', 'f']
}) })

View file

@ -8,7 +8,7 @@ function inverseCumulativeExponential(base, levels) {
function getAlphaLevel(points = player.p.points) { function getAlphaLevel(points = player.p.points) {
if (Decimal.eq(points, 0)) return new Decimal(0) if (Decimal.eq(points, 0)) return new Decimal(0)
const level = inverseCumulativeExponential(1.1, Decimal.pow(points, buyableEffect('p', 13).pow(-1))) const level = inverseCumulativeExponential(1.1, Decimal.pow(points, buyableEffect('p', 13).pow(-1)))
return hasMilestone('f', 7) ? level : level.floor() return hasMilestone('f', 5) ? level : level.floor()
} }
function getAlphaCost(points = player.p.points) { function getAlphaCost(points = player.p.points) {
return cumulativeExponential(1.1, getAlphaLevel(points).floor()).pow(buyableEffect('p', 13)) return cumulativeExponential(1.1, getAlphaLevel(points).floor()).pow(buyableEffect('p', 13))
@ -19,7 +19,7 @@ function getAlphaEffect(points = player.p.points) {
function getBetaLevel(points = player.p.points) { function getBetaLevel(points = player.p.points) {
if (Decimal.eq(points, 0)) return new Decimal(0) if (Decimal.eq(points, 0)) return new Decimal(0)
const level = inverseCumulativeExponential(1.25, Decimal.div(Decimal.pow(points, buyableEffect('p', 13).pow(-1)), 5)) const level = inverseCumulativeExponential(1.25, Decimal.div(Decimal.pow(points, buyableEffect('p', 13).pow(-1)), 5))
return hasMilestone('f', 7) ? level : level.floor() return hasMilestone('f', 5) ? level : level.floor()
} }
function getBetaCost(points = player.p.points) { function getBetaCost(points = player.p.points) {
return cumulativeExponential(1.25, getBetaLevel(points).floor()).mul(5).pow(buyableEffect('p', 13)) return cumulativeExponential(1.25, getBetaLevel(points).floor()).mul(5).pow(buyableEffect('p', 13))
@ -30,7 +30,7 @@ function getBetaEffect(points = player.p.points) {
function getGammaLevel(points = player.p.points) { function getGammaLevel(points = player.p.points) {
if (Decimal.eq(points, 0)) return new Decimal(0) if (Decimal.eq(points, 0)) return new Decimal(0)
const level = inverseCumulativeExponential(1.5, Decimal.div(Decimal.pow(points, buyableEffect('p', 13).pow(-1)), 15)) const level = inverseCumulativeExponential(1.5, Decimal.div(Decimal.pow(points, buyableEffect('p', 13).pow(-1)), 15))
return hasMilestone('f', 7) ? level : level.floor() return hasMilestone('f', 5) ? level : level.floor()
} }
function getGammaCost(points = player.p.points) { function getGammaCost(points = player.p.points) {
return cumulativeExponential(1.5, getGammaLevel(points).floor()).mul(15).pow(buyableEffect('p', 13)) return cumulativeExponential(1.5, getGammaLevel(points).floor()).mul(15).pow(buyableEffect('p', 13))
@ -41,7 +41,7 @@ function getGammaEffect(points = player.p.points) {
function getDeltaLevel(points = player.p.points) { function getDeltaLevel(points = player.p.points) {
if (Decimal.eq(points, 0)) return new Decimal(0) if (Decimal.eq(points, 0)) return new Decimal(0)
const level = inverseCumulativeExponential(2, Decimal.div(Decimal.pow(points, buyableEffect('p', 13).pow(-1)), 30)) const level = inverseCumulativeExponential(2, Decimal.div(Decimal.pow(points, buyableEffect('p', 13).pow(-1)), 30))
return hasMilestone('f', 7) ? level : level.floor() return hasMilestone('f', 5) ? level : level.floor()
} }
function getDeltaCost(points = player.p.points) { function getDeltaCost(points = player.p.points) {
return cumulativeExponential(2, getDeltaLevel(points).floor()).mul(30).pow(buyableEffect('p', 13)) return cumulativeExponential(2, getDeltaLevel(points).floor()).mul(30).pow(buyableEffect('p', 13))
@ -52,7 +52,7 @@ function getDeltaEffect(points = player.p.points) {
function getEpsilonLevel(points = player.p.points) { function getEpsilonLevel(points = player.p.points) {
if (Decimal.eq(points, 0)) return new Decimal(0) if (Decimal.eq(points, 0)) return new Decimal(0)
const level = inverseCumulativeExponential(2.5, Decimal.div(Decimal.pow(points, buyableEffect('p', 13).pow(-1)), 50)) const level = inverseCumulativeExponential(2.5, Decimal.div(Decimal.pow(points, buyableEffect('p', 13).pow(-1)), 50))
return hasMilestone('f', 7) ? level : level.floor() return hasMilestone('f', 5) ? level : level.floor()
} }
function getEpsilonCost(points = player.p.points) { function getEpsilonCost(points = player.p.points) {
return cumulativeExponential(2.5, getEpsilonLevel(points).floor()).mul(50).pow(buyableEffect('p', 13)) return cumulativeExponential(2.5, getEpsilonLevel(points).floor()).mul(50).pow(buyableEffect('p', 13))
@ -63,7 +63,7 @@ function getEpsilonEffect(points = player.p.points) {
function getZetaLevel(points = player.p.points) { function getZetaLevel(points = player.p.points) {
if (Decimal.eq(points, 0)) return new Decimal(0) if (Decimal.eq(points, 0)) return new Decimal(0)
const level = inverseCumulativeExponential(3, Decimal.div(Decimal.pow(points, buyableEffect('p', 13).pow(-1)), 80)) const level = inverseCumulativeExponential(3, Decimal.div(Decimal.pow(points, buyableEffect('p', 13).pow(-1)), 80))
return hasMilestone('f', 7) ? level : level.floor() return hasMilestone('f', 5) ? level : level.floor()
} }
function getZetaCost(points = player.p.points) { function getZetaCost(points = player.p.points) {
return cumulativeExponential(3, getZetaLevel(points).floor()).mul(80).pow(buyableEffect('p', 13)) return cumulativeExponential(3, getZetaLevel(points).floor()).mul(80).pow(buyableEffect('p', 13))

View file

@ -24,18 +24,16 @@ addLayer("p", {
mult = mult.mul(buyableEffect(this.layer, 11)) mult = mult.mul(buyableEffect(this.layer, 11))
mult = mult.mul(getThetaEffect()) mult = mult.mul(getThetaEffect())
if (hasMilestone('f', 0)) mult = mult.mul(3) if (hasMilestone('f', 0)) mult = mult.mul(3)
mult = mult.mul(tmp.i.numberEffect)
return mult return mult
}, },
gainExp() { // Calculate the exponent on main currency from bonuses gainExp() { // Calculate the exponent on main currency from bonuses
return new Decimal(1) return new Decimal(1)
}, },
doReset(resettingLayer) { doReset(resettingLayer) {
if (layers[resettingLayer].row <= this.row) return if (layers[resettingLayer].row <= this.row) return;
if (hasMilestone('f', 3) && resettingLayer == 'sp') return
let keep = [] let keep = []
if (hasMilestone('f', 3) && resettingLayer == 'sp') keep.push("points")
layerDataReset(this.layer, keep) layerDataReset(this.layer, keep)
if (hasMilestone('i', 1)) player[this.layer].points = player[this.layer].points.max(1000)
}, },
row: 0, // Row the layer is in on the tree (0 is the first row) row: 0, // Row the layer is in on the tree (0 is the first row)
hotkeys: [ hotkeys: [
@ -48,7 +46,7 @@ addLayer("p", {
return gain return gain
}, },
automate() { automate() {
if (hasMilestone('f', 5)) { if (hasMilestone('f', 7)) {
Object.values(tmp[this.layer].buyables).forEach(i => { if (i.canAfford) i.buy() }) Object.values(tmp[this.layer].buyables).forEach(i => { if (i.canAfford) i.buy() })
} }
}, },

View file

@ -20,7 +20,6 @@ addLayer("sp", {
gainMult() { // Calculate the multiplier for main currency from bonuses gainMult() { // Calculate the multiplier for main currency from bonuses
let mult = new Decimal(1) let mult = new Decimal(1)
if (hasMilestone('f', 0)) mult = mult.mul(3) if (hasMilestone('f', 0)) mult = mult.mul(3)
mult = mult.mul(tmp.i.numberEffect)
return mult return mult
}, },
gainExp() { // Calculate the exponent on main currency from bonuses gainExp() { // Calculate the exponent on main currency from bonuses
@ -44,12 +43,6 @@ addLayer("sp", {
Object.values(tmp[this.layer].buyables).forEach(i => { if (i.canAfford) i.buy() }) Object.values(tmp[this.layer].buyables).forEach(i => { if (i.canAfford) i.buy() })
} }
}, },
doReset(resettingLayer) {
if (layers[resettingLayer].row <= this.row) return;
let keep = []
layerDataReset(this.layer, keep)
if (hasMilestone('i', 1)) player[this.layer].points = player[this.layer].points.max(250)
},
bars: { bars: {
eta: { eta: {
direction: RIGHT, direction: RIGHT,
@ -93,7 +86,7 @@ addLayer("sp", {
progress() { return player[this.layer].points.div(getKappaCost()) }, progress() { return player[this.layer].points.div(getKappaCost()) },
display() { display() {
return "Kappa - Level " + format(getKappaLevel()) + " (" + format(player[this.layer].points) + "/" + format(getKappaCost()) return "Kappa - Level " + format(getKappaLevel()) + " (" + format(player[this.layer].points) + "/" + format(getKappaCost())
+ ")<br>Effect: x" + format(getKappaEffect()) + " to first softcap's start." + ")<br>Effect: x" + format(getKappaEffect()) + " to first softcap."
}, },
fillStyle: {backgroundColor: "#107f76"}, fillStyle: {backgroundColor: "#107f76"},
unlocked() { return getIotaLevel().gt(0) } unlocked() { return getIotaLevel().gt(0) }

View file

@ -18,9 +18,7 @@ addNode("blank", {
addLayer("tree-tab", { addLayer("tree-tab", {
tabFormat: [ tabFormat: [
["tree", [["p", "sp", "f"]]], ["tree", [["p", "sp", "f"], ["i"]]]
"blank",
["tree", [["i"]]]
], ],
previousTab: "", previousTab: "",
leftTab: true, leftTab: true,

View file

@ -13,25 +13,16 @@ let modInfo = {
// Set your version in num and name // Set your version in num and name
let VERSION = { let VERSION = {
num: "2.0", num: "1.6",
name: "Mathematicalization", name: "The great rebalancing",
} }
let changelog = `<h1>Changelog:</h1><br><br> let changelog = `<h1>Changelog:</h1><br><br>
<h3>v2.0 Mathematicalization</h3><br>
- Clarified Kappa and 12th Filestone's effects.<br>
- Switched the positions of the 6th and 8th Filestone.<br>
- Reduced the 12 Filestone's requirement to 40 Files.<br>
- Made Directory upgrade [5,3] use total Files.<br>
- Fixed & adjusted <b>The finale of the intro</b>.<br>
- Added content to the Integral layer.<br>
- Added the Number.<br><br>
- Current endgame: 4 integrals.<br>
<h3>v1.6</h3><br> <h3>v1.6</h3><br>
- General bugfixing.<br> - General bugfixing.<br>
- Made the tree manually generated.<br> - Made the tree manually generated.<br>
- Fixed the file prestige functions.<br><br> - Fixed the file prestige functions.<br>
<h3>v1.5 The great rebalancing</h3><br> <h3>v1.5</h3><br>
- Clarified some effects.<br> - Clarified some effects.<br>
- Decreased SPP requirement.<br> - Decreased SPP requirement.<br>
- Made <b>Even more progress</b> affect SPP gain.<br> - Made <b>Even more progress</b> affect SPP gain.<br>
@ -90,10 +81,9 @@ function getPointGen() {
gain = gain.mul(getZetaEffect()) gain = gain.mul(getZetaEffect())
gain = gain.mul(getLambdaEffect()) gain = gain.mul(getLambdaEffect())
gain = gain.mul(tmp.ach.effect) gain = gain.mul(tmp.ach.effect)
gain = gain.mul(tmp.i.numberEffect) gain = gain.mul(buyableEffect('f', 11))
if (hasMilestone('f', 1)) gain = gain.mul(getTotalLevel().add(7).log(2)) if (hasMilestone('f', 1)) gain = gain.mul(getTotalLevel().add(7).log(2))
if (hasMilestone('f', 6)) gain = gain.mul(player.f.total.div(2).add(1)) if (hasMilestone('f', 6)) gain = gain.mul(player.f.total.div(2).add(1))
if (hasMilestone('f', 12)) gain = gain.mul(player.sp.points.add(1).log(100).add(1))
// exponentiative // exponentiative
if (gain.gte(1)) { if (gain.gte(1)) {
gain = gain.pow(getEpsilonEffect()) gain = gain.pow(getEpsilonEffect())
@ -102,18 +92,13 @@ function getPointGen() {
if (hasMilestone('f', 3)) gain = gain.pow(2) if (hasMilestone('f', 3)) gain = gain.pow(2)
if (hasUpgrade('f', 11)) gain = gain.pow(upgradeEffect('f', 11)) if (hasUpgrade('f', 11)) gain = gain.pow(upgradeEffect('f', 11))
if (hasUpgrade('f', 53)) gain = gain.pow(upgradeEffect('f', 53)) if (hasUpgrade('f', 53)) gain = gain.pow(upgradeEffect('f', 53))
if (hasMilestone('f', 13)) gain = gain.pow(player.p.points.sqrt())
} }
// softcaps // softcaps
gain = softcap(gain, gain = softcap(gain, getKappaEffect().mul(1000), d => d.add(1).log(Math.E).add(1).pow(2).sub(1).div(2))
getKappaEffect().mul(250).mul(1e5**hasMilestone('f',15)),
d => d.add(1).log(Math.E).add(1).pow(2).sub(1).div(2)
)
gain = softcap(gain, gain = softcap(gain,
Decimal.pow(1e6, (hasMilestone('f', 11) ? getTotalSuperLevel().add(1).log(2).add(1).log(2).add(1) : 1)), Decimal.pow(1e6, (hasMilestone('f', 11) ? getTotalSuperLevel().add(1).log(2).add(1).log(2).add(1) : 1)),
d => d.add(1).log(3 - hasUpgrade('f', 61)).add(1) d => d.add(1).log(3 - hasUpgrade('f', 61)).add(1)
) )
gain = gain.mul(buyableEffect('f', 11))
gain = softcap(gain, Decimal.pow(2, 128), _ => new Decimal(0), player.points) gain = softcap(gain, Decimal.pow(2, 128), _ => new Decimal(0), player.points)
return gain return gain
} }
@ -126,9 +111,9 @@ function addedPlayerData() { return {
var displayThings = [ var displayThings = [
"All exponentiative upgrades only take affect above 1.", "All exponentiative upgrades only take affect above 1.",
() => getPointGen().gte(getKappaEffect().mul(1000)) ? "Your points per second are being logarithmically softcapped over " () => getPointGen().gte(getKappaEffect().mul(1000)) ? "Your points per second are being logarithmically softcapped over "
+ format(getKappaEffect().mul(250).mul(1e5**hasMilestone('f',15))) + "/s" : "", + format(getKappaEffect().mul(1000)) + "/s" : "",
() => getPointGen().gte( () => getPointGen().gte(
Decimal.pow(1e6, hasMilestone('f', 11) ? getTotalSuperLevel().pow(1/10).add(1).log(10).add(1) : 1) Decimal.pow(1e6, hasMilestone('f', 10) ? getTotalSuperLevel().pow(1/10).add(1).log(10).add(1) : 1)
) ? "Your points per second are being logarithmically softcapped again over " ) ? "Your points per second are being logarithmically softcapped again over "
+ format(Decimal.pow( + format(Decimal.pow(
1e6, hasMilestone('f', 11) ? getTotalSuperLevel().pow(1/10).add(1).log(10).add(1) : 1 1e6, hasMilestone('f', 11) ? getTotalSuperLevel().pow(1/10).add(1).log(10).add(1) : 1

View file

@ -424,8 +424,4 @@ function unlockAll() {
player.f.unlocked = true player.f.unlocked = true
player.f.milestones.push("8") player.f.milestones.push("8")
player.i.unlocked = true player.i.unlocked = true
player.i.milestones.push("2")
}
function saveBank() {
} }

View file

@ -185,24 +185,21 @@ function fixData(defaultData, newData) {
} }
} }
function load() { function load() {
const params = new URLSearchParams(window.location.search); let get = localStorage.getItem(modInfo.id);
let get;
if (params.has('save')) get = params.get('save');
else get = localStorage.getItem(modInfo.id);
if (get === null || get === undefined) { if (get === null || get === undefined) {
player = getStartPlayer(); player = getStartPlayer();
options = getStartOptions(); options = getStartOptions();
} else { }
else {
player = Object.assign(getStartPlayer(), JSON.parse(decodeURIComponent(escape(atob(get))))); player = Object.assign(getStartPlayer(), JSON.parse(decodeURIComponent(escape(atob(get)))));
fixSave(); fixSave();
loadOptions(); loadOptions();
} }
if (params.has('save')) options.autosave = false
if (options.offlineProd) { if (options.offlineProd) {
if (player.offTime === undefined) player.offTime = { remain: 0 }; if (player.offTime === undefined)
player.offTime = { remain: 0 };
player.offTime.remain += (Date.now() - player.time) / 1000; player.offTime.remain += (Date.now() - player.time) / 1000;
} }
player.time = Date.now(); player.time = Date.now();