diff --git a/js/files.js b/js/files.js index 9f9d7e9..a63c88a 100644 --- a/js/files.js +++ b/js/files.js @@ -50,7 +50,9 @@ addLayer("f", { }, 4: { requirementDescription: "5 total Files.", - effectDescription: "Total ranks boost point gen.
Effect: ^" + getTotalRank().div(2).add(1) + ".", + effectDescription() { + return "Total ranks boost point gen.
Effect: ^" + getTotalRank().div(2).add(1) + "." + }, done() { return player.f.total.gte(5) } }, }, diff --git a/js/levels.js b/js/levels.js index 652fab9..756d6b0 100644 --- a/js/levels.js +++ b/js/levels.js @@ -5,67 +5,66 @@ function inverseCumulativeExponential(base, levels) { return Decimal.sub(base, 1).mul(levels).add(1).log(base) } -function getAlphaLevel(points = null) { - if (points === null && player === null) return new Decimal(0) +function getAlphaLevel(points = player.p.points) { if (Decimal.eq(points, 0)) return new Decimal(0) return inverseCumulativeExponential(1.1, Decimal.pow(points, buyableEffect('p', 13).pow(-1))).floor() } -function getAlphaCost(points = null) { +function getAlphaCost(points = player.p.points) { return cumulativeExponential(1.1, getAlphaLevel(points)).pow(buyableEffect('p', 13)) } -function getAlphaEffect(points = null) { +function getAlphaEffect(points = player.p.points) { return getAlphaLevel(points).mul(getAlphaRankEffect(points).add(1/20)) } -function getBetaLevel(points = null) { +function getBetaLevel(points = player.p.points) { if (Decimal.eq(points, 0)) return new Decimal(0) return inverseCumulativeExponential(1.25, Decimal.div(Decimal.pow(points, buyableEffect('p', 13).pow(-1)), 5)).floor() } -function getBetaCost(points = null) { +function getBetaCost(points = player.p.points) { return cumulativeExponential(1.25, getBetaLevel(points)).mul(5).pow(buyableEffect('p', 13)) } -function getBetaEffect(points = null) { +function getBetaEffect(points = player.p.points) { return getBetaLevel(points).mul(getBetaRankEffect(points).add(1/20)).add(1) } -function getGammaLevel(points = null) { +function getGammaLevel(points = player.p.points) { if (Decimal.eq(points, 0)) return new Decimal(0) return inverseCumulativeExponential(1.5, Decimal.div(Decimal.pow(points, buyableEffect('p', 13).pow(-1)), 15)).floor() } -function getGammaCost(points = null) { +function getGammaCost(points = player.p.points) { return cumulativeExponential(1.5, getGammaLevel(points)).mul(15).pow(buyableEffect('p', 13)) } -function getGammaEffect(points = null) { - return Decimal.add(null, 1).log(Decimal.pow(50, buyableEffect('p', 12))).add(1).pow( +function getGammaEffect(points = player.p.points) { + return Decimal.add(player.p.points, 1).log(Decimal.pow(50, buyableEffect('p', 12))).add(1).pow( getGammaLevel(points).mul(getGammaRankEffect(points).add(1/10)) ) } -function getDeltaLevel(points = null) { +function getDeltaLevel(points = player.p.points) { if (Decimal.eq(points, 0)) return new Decimal(0) return inverseCumulativeExponential(2, Decimal.div(Decimal.pow(points, buyableEffect('p', 13).pow(-1)), 30)).floor() } -function getDeltaCost(points = null) { +function getDeltaCost(points = player.p.points) { return cumulativeExponential(2, getDeltaLevel(points)).mul(30).pow(buyableEffect('p', 13)) } -function getDeltaEffect(points = null) { +function getDeltaEffect(points = player.p.points) { return getDeltaLevel(points).mul(getDeltaRankEffect(points).add(1/5)).add(1) } -function getEpsilonLevel(points = null) { +function getEpsilonLevel(points = player.p.points) { if (Decimal.eq(points, 0)) return new Decimal(0) return inverseCumulativeExponential(2.5, Decimal.div(Decimal.pow(points, buyableEffect('p', 13).pow(-1)), 50)).floor() } -function getEpsilonCost(points = null) { +function getEpsilonCost(points = player.p.points) { return cumulativeExponential(2.5, getEpsilonLevel(points)).mul(50).pow(buyableEffect('p', 13)) } -function getEpsilonEffect(points = null) { +function getEpsilonEffect(points = player.p.points) { return getEpsilonLevel(points).mul(getEpsilonRankEffect(points).add(1/10)).add(1) } -function getZetaLevel(points = null) { +function getZetaLevel(points = player.p.points) { if (Decimal.eq(points, 0)) return new Decimal(0) return inverseCumulativeExponential(3, Decimal.div(Decimal.pow(points, buyableEffect('p', 13).pow(-1)), 80)).floor() } -function getZetaCost(points = null) { +function getZetaCost(points = player.p.points) { return cumulativeExponential(3, getZetaLevel(points)).mul(80).pow(buyableEffect('p', 13)) } -function getZetaEffect(points = null) { +function getZetaEffect(points = player.p.points) { return getZetaLevel(points).mul(getZetaRankEffect().add(1/3)).add(1) }