generated from incremental-social/The-Modding-Tree
v2.0 #4
10 changed files with 295 additions and 72 deletions
|
@ -5,7 +5,8 @@ addLayer("ach", {
|
|||
startData() { return {
|
||||
unlocked: true,
|
||||
has45: false,
|
||||
has55: false
|
||||
has55: false,
|
||||
has75: false
|
||||
}},
|
||||
color: "#9d750d",
|
||||
effect() {
|
||||
|
@ -173,15 +174,35 @@ addLayer("ach", {
|
|||
tooltip: "Get all row 6 directory upgrades."
|
||||
},
|
||||
72: {
|
||||
name: "I guess one last achivement?",
|
||||
done() { return getBuyableAmount('f', 11).gte(5) },
|
||||
tooltip: "Get 5 <b>The finale of the intro</b> buyables."
|
||||
name: "I guess one last buyable?",
|
||||
done() { return getBuyableAmount('f', 11).gte(10) },
|
||||
tooltip: "Get 10 <b>The finale of the intro</b> buyables."
|
||||
},
|
||||
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",
|
||||
done() { return player.points.log(2).gte(127.9) },
|
||||
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: [
|
||||
"blank",
|
||||
|
|
106
js/data/files.js
106
js/data/files.js
|
@ -28,23 +28,23 @@ addLayer("f", {
|
|||
if (hasUpgrade(this.layer, 41)) base **= 0.95
|
||||
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) {
|
||||
let tlyr = tmp[this.layer]
|
||||
let plyr = player[this.layer]
|
||||
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 (amount.gte(0)) amount = amount.root(tlyr.exponent).add(1).sub(tlyr.effective).sqrt().floor().max(0)
|
||||
if (isNaN(amount)) return new Decimal(0)
|
||||
if (!canMax && amount.gte(1)) return new Decimal(1)
|
||||
return amount.max(0)
|
||||
if (!canMax && amount.gte(1)) return new Decimal(tlyr.directMult)
|
||||
return amount.max(0).mul(tlyr.directMult)
|
||||
},
|
||||
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.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)
|
||||
if (!canMax) return tlyr.effective.pow(tlyr.exponent).pow_base(tlyr.base).mul(tlyr.requires)
|
||||
return tlyr.getResetGain.div(tlyr.directMult).floor().plus(1).pow(2).add(tlyr.effective).sub(1)
|
||||
.pow(tlyr.exponent).pow_base(tlyr.base).mul(tlyr.requires)
|
||||
},
|
||||
canReset() {
|
||||
return tmp[this.layer].getResetGain.gte(1)
|
||||
|
@ -60,6 +60,9 @@ addLayer("f", {
|
|||
gainExp() { // Calculate the exponent on main currency from bonuses
|
||||
return new Decimal(1)
|
||||
},
|
||||
directMult() { // Calculate the multiplier for main currency from bonuses
|
||||
return new Decimal(1).add(hasMilestone('i', 0) ? 1 : 0)
|
||||
},
|
||||
canBuyMax() {
|
||||
return hasMilestone(this.layer, 8)
|
||||
},
|
||||
|
@ -68,11 +71,17 @@ addLayer("f", {
|
|||
hotkeys: [
|
||||
{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: {
|
||||
0: {
|
||||
requirementDescription: "1 total File.",
|
||||
effectDescription: "Triple PP and SPP gen.",
|
||||
done() { return player.f.total.gte(1) }
|
||||
done() { return player[this.layer].total.gte(1) }
|
||||
},
|
||||
1: {
|
||||
requirementDescription: "2 total Files.",
|
||||
|
@ -80,62 +89,88 @@ addLayer("f", {
|
|||
return "Total levels and super levels boost point gen.<br>Effect: x"
|
||||
+ format(getTotalLevel().add(getTotalSuperLevel()).add(7).log(2)) + "."
|
||||
},
|
||||
done() { return player.f.total.gte(2) }
|
||||
done() { return player[this.layer].total.gte(2) }
|
||||
},
|
||||
2: {
|
||||
requirementDescription: "3 total Files.",
|
||||
effectDescription: "Halve PP req.",
|
||||
done() { return player.f.total.gte(3) }
|
||||
done() { return player[this.layer].total.gte(3) }
|
||||
},
|
||||
3: {
|
||||
requirementDescription: "4 total Files.",
|
||||
effectDescription: "SPP no longer resets PP.",
|
||||
done() { return player.f.total.gte(4) }
|
||||
done() { return player[this.layer].total.gte(4) }
|
||||
},
|
||||
4: {
|
||||
requirementDescription: "5 total Files.",
|
||||
effectDescription: "Unlock the Directory.",
|
||||
done() { return player.f.total.gte(5) }
|
||||
done() { return player[this.layer].total.gte(5) }
|
||||
},
|
||||
5: {
|
||||
requirementDescription: "6 total Files.",
|
||||
effectDescription: "You can now get fractional levels.",
|
||||
done() { return player.f.total.gte(6) }
|
||||
effectDescription: "Autobuy all PP buyables.",
|
||||
done() { return player[this.layer].total.gte(6) }
|
||||
},
|
||||
6: {
|
||||
requirementDescription: "8 total Files.",
|
||||
effectDescription() {
|
||||
return "Total Files boost point gen.<br>Effect: x" + format(player[this.layer].total.div(2).add(1)) + "."
|
||||
},
|
||||
done() { return player.f.total.gte(8) }
|
||||
done() { return player[this.layer].total.gte(8) }
|
||||
},
|
||||
7: {
|
||||
requirementDescription: "10 total Files.",
|
||||
effectDescription: "Autobuy all PP buyables.",
|
||||
done() { return player.f.total.gte(10) }
|
||||
effectDescription: "You can now get fractional levels.",
|
||||
done() { return player[this.layer].total.gte(10) }
|
||||
},
|
||||
8: {
|
||||
requirementDescription: "15 total Files.",
|
||||
effectDescription: "You can buy max files.",
|
||||
done() { return player.f.total.gte(15) }
|
||||
done() { return player[this.layer].total.gte(15) }
|
||||
},
|
||||
9: {
|
||||
requirementDescription: "20 total Files.",
|
||||
effectDescription: "Halve base file cost.",
|
||||
done() { return player.f.total.gte(20) }
|
||||
done() { return player[this.layer].total.gte(20) }
|
||||
},
|
||||
10: {
|
||||
requirementDescription: "25 total Files.",
|
||||
effectDescription: "Autobuy both SPP buyables.",
|
||||
done() { return player.f.total.gte(25) }
|
||||
done() { return player[this.layer].total.gte(25) }
|
||||
},
|
||||
11: {
|
||||
requirementDescription: "50 total Files.",
|
||||
requirementDescription: "40 total Files.",
|
||||
effectDescription() {
|
||||
return "Total super levels boost second softcap.<br>Effect: ^"
|
||||
return "Total super levels increase second softcap's start.<br>Effect: ^"
|
||||
+ format(getTotalSuperLevel().pow(1/10).add(1).log(10).add(1)) + "."
|
||||
},
|
||||
done() { return player.f.total.gte(50) }
|
||||
done() { return player[this.layer].total.gte(40) }
|
||||
},
|
||||
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: {
|
||||
|
@ -224,7 +259,7 @@ addLayer("f", {
|
|||
description: "Total files boost point gen.",
|
||||
cost: 14,
|
||||
canAfford() { return hasUpgrade(this.layer, 43) },
|
||||
effect() { return player[this.layer].points.log(10).add(1) },
|
||||
effect() { return player[this.layer].total.log(10).add(1) },
|
||||
effectDisplay() { return "^" + format(this.effect()) + "." },
|
||||
branches: [43]
|
||||
},
|
||||
|
@ -250,11 +285,12 @@ addLayer("f", {
|
|||
buyables: {
|
||||
11: {
|
||||
title: "The finale of the intro",
|
||||
effect() { return Decimal.pow(1.5, getBuyableAmount(this.layer, this.id)) },
|
||||
cost() { return Decimal.mul(getBuyableAmount(this.layer, this.id), 10) },
|
||||
effect() { return Decimal.pow(3, getBuyableAmount(this.layer, this.id)) },
|
||||
cost() { return Decimal.add(getBuyableAmount(this.layer, this.id), 1).mul(5) },
|
||||
display() {
|
||||
return "Increase point gen.<br><br>Amount: " + format(getBuyableAmount(this.layer, this.id))
|
||||
+ ".<br>Effect: x" + format(this.effect(getBuyableAmount(this.layer, this.id))) + ".<br>Cost: "
|
||||
return "Increase point gen. after second softcap.<br><br>Amount: "
|
||||
+ format(getBuyableAmount(this.layer, this.id)) + ".<br>Effect: x"
|
||||
+ format(this.effect(getBuyableAmount(this.layer, this.id))) + ".<br>Cost: "
|
||||
+ format(this.cost(getBuyableAmount(this.layer, this.id))) + " Files."
|
||||
},
|
||||
canAfford() {
|
||||
|
@ -262,8 +298,8 @@ addLayer("f", {
|
|||
&& hasUpgrade(this.layer, 61) && hasUpgrade(this.layer, 62)
|
||||
},
|
||||
buy() {
|
||||
addBuyables(this.layer, this.id, 1)
|
||||
player[this.layer].points = player[this.layer].points.sub(this.cost())
|
||||
addBuyables(this.layer, this.id, 1)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -287,7 +323,7 @@ addLayer("f", {
|
|||
}
|
||||
},
|
||||
layerShown(){ return player.sp.points.gte(200) || player[this.layer].unlocked },
|
||||
branches: ['p'],
|
||||
branches: ['sp'],
|
||||
tabFormat: {
|
||||
filestones: {
|
||||
content: [
|
||||
|
@ -297,8 +333,8 @@ addLayer("f", {
|
|||
"blank",
|
||||
"blank",
|
||||
["row", [
|
||||
["milestones", [0, 2, 4, 6, 8, 10]],
|
||||
["milestones", [1, 3, 5, 7, 9, 11]]
|
||||
["milestones", [0, 2, 4, 6, 8, 10, 12, 14]],
|
||||
["milestones", [1, 3, 5, 7, 9, 11, 13, 15]]
|
||||
]]
|
||||
]
|
||||
},
|
||||
|
|
|
@ -4,7 +4,10 @@ addLayer("i", {
|
|||
position: 0, // Horizontal position within a row. By default it uses the layer id and sorts in alphabetical order
|
||||
startData() { return {
|
||||
unlocked: false,
|
||||
points: new Decimal(0)
|
||||
points: new Decimal(0),
|
||||
total: new Decimal(0),
|
||||
incDelta: 1,
|
||||
number: [1]
|
||||
}},
|
||||
color: "#a62222",
|
||||
requires: Decimal.pow(2, 127.9), // Can be a function that takes requirement increases into account
|
||||
|
@ -24,14 +27,144 @@ addLayer("i", {
|
|||
hotkeys: [
|
||||
{key: "i", description: "I: reset for integrals", onPress(){if (canReset(this.layer)) doReset(this.layer)}},
|
||||
],
|
||||
tabFormat: [
|
||||
"main-display",
|
||||
"prestige-button",
|
||||
"resource-display",
|
||||
"blank",
|
||||
"blank",
|
||||
["raw-html", "Coming Soon!"]
|
||||
],
|
||||
milestones: {
|
||||
0: {
|
||||
requirementDescription: "1 total Integral.",
|
||||
effectDescription: "Gain double Files and halve total File effect on File cost.",
|
||||
done() { return player[this.layer].total.gte(1) }
|
||||
},
|
||||
1: {
|
||||
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 },
|
||||
branches: ['p', 'sp', 'f']
|
||||
})
|
||||
|
|
|
@ -8,7 +8,7 @@ function inverseCumulativeExponential(base, levels) {
|
|||
function getAlphaLevel(points = player.p.points) {
|
||||
if (Decimal.eq(points, 0)) return new Decimal(0)
|
||||
const level = inverseCumulativeExponential(1.1, Decimal.pow(points, buyableEffect('p', 13).pow(-1)))
|
||||
return hasMilestone('f', 5) ? level : level.floor()
|
||||
return hasMilestone('f', 7) ? level : level.floor()
|
||||
}
|
||||
function getAlphaCost(points = player.p.points) {
|
||||
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) {
|
||||
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))
|
||||
return hasMilestone('f', 5) ? level : level.floor()
|
||||
return hasMilestone('f', 7) ? level : level.floor()
|
||||
}
|
||||
function getBetaCost(points = player.p.points) {
|
||||
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) {
|
||||
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))
|
||||
return hasMilestone('f', 5) ? level : level.floor()
|
||||
return hasMilestone('f', 7) ? level : level.floor()
|
||||
}
|
||||
function getGammaCost(points = player.p.points) {
|
||||
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) {
|
||||
if (Decimal.eq(points, 0)) return new Decimal(0)
|
||||
const level = inverseCumulativeExponential(2, Decimal.div(Decimal.pow(points, buyableEffect('p', 13).pow(-1)), 30))
|
||||
return hasMilestone('f', 5) ? level : level.floor()
|
||||
return hasMilestone('f', 7) ? level : level.floor()
|
||||
}
|
||||
function getDeltaCost(points = player.p.points) {
|
||||
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) {
|
||||
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))
|
||||
return hasMilestone('f', 5) ? level : level.floor()
|
||||
return hasMilestone('f', 7) ? level : level.floor()
|
||||
}
|
||||
function getEpsilonCost(points = player.p.points) {
|
||||
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) {
|
||||
if (Decimal.eq(points, 0)) return new Decimal(0)
|
||||
const level = inverseCumulativeExponential(3, Decimal.div(Decimal.pow(points, buyableEffect('p', 13).pow(-1)), 80))
|
||||
return hasMilestone('f', 5) ? level : level.floor()
|
||||
return hasMilestone('f', 7) ? level : level.floor()
|
||||
}
|
||||
function getZetaCost(points = player.p.points) {
|
||||
return cumulativeExponential(3, getZetaLevel(points).floor()).mul(80).pow(buyableEffect('p', 13))
|
||||
|
|
|
@ -24,16 +24,18 @@ addLayer("p", {
|
|||
mult = mult.mul(buyableEffect(this.layer, 11))
|
||||
mult = mult.mul(getThetaEffect())
|
||||
if (hasMilestone('f', 0)) mult = mult.mul(3)
|
||||
mult = mult.mul(tmp.i.numberEffect)
|
||||
return mult
|
||||
},
|
||||
gainExp() { // Calculate the exponent on main currency from bonuses
|
||||
return new Decimal(1)
|
||||
},
|
||||
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 = []
|
||||
if (hasMilestone('f', 3) && resettingLayer == 'sp') keep.push("points")
|
||||
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)
|
||||
hotkeys: [
|
||||
|
@ -46,7 +48,7 @@ addLayer("p", {
|
|||
return gain
|
||||
},
|
||||
automate() {
|
||||
if (hasMilestone('f', 7)) {
|
||||
if (hasMilestone('f', 5)) {
|
||||
Object.values(tmp[this.layer].buyables).forEach(i => { if (i.canAfford) i.buy() })
|
||||
}
|
||||
},
|
||||
|
|
|
@ -20,6 +20,7 @@ addLayer("sp", {
|
|||
gainMult() { // Calculate the multiplier for main currency from bonuses
|
||||
let mult = new Decimal(1)
|
||||
if (hasMilestone('f', 0)) mult = mult.mul(3)
|
||||
mult = mult.mul(tmp.i.numberEffect)
|
||||
return mult
|
||||
},
|
||||
gainExp() { // Calculate the exponent on main currency from bonuses
|
||||
|
@ -43,6 +44,12 @@ addLayer("sp", {
|
|||
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: {
|
||||
eta: {
|
||||
direction: RIGHT,
|
||||
|
@ -86,7 +93,7 @@ addLayer("sp", {
|
|||
progress() { return player[this.layer].points.div(getKappaCost()) },
|
||||
display() {
|
||||
return "Kappa - Level " + format(getKappaLevel()) + " (" + format(player[this.layer].points) + "/" + format(getKappaCost())
|
||||
+ ")<br>Effect: x" + format(getKappaEffect()) + " to first softcap."
|
||||
+ ")<br>Effect: x" + format(getKappaEffect()) + " to first softcap's start."
|
||||
},
|
||||
fillStyle: {backgroundColor: "#107f76"},
|
||||
unlocked() { return getIotaLevel().gt(0) }
|
||||
|
|
|
@ -18,7 +18,9 @@ addNode("blank", {
|
|||
|
||||
addLayer("tree-tab", {
|
||||
tabFormat: [
|
||||
["tree", [["p", "sp", "f"], ["i"]]]
|
||||
["tree", [["p", "sp", "f"]]],
|
||||
"blank",
|
||||
["tree", [["i"]]]
|
||||
],
|
||||
previousTab: "",
|
||||
leftTab: true,
|
||||
|
|
31
js/mod.js
31
js/mod.js
|
@ -13,16 +13,25 @@ let modInfo = {
|
|||
|
||||
// Set your version in num and name
|
||||
let VERSION = {
|
||||
num: "1.6",
|
||||
name: "The great rebalancing",
|
||||
num: "2.0",
|
||||
name: "Mathematicalization",
|
||||
}
|
||||
|
||||
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>
|
||||
- General bugfixing.<br>
|
||||
- Made the tree manually generated.<br>
|
||||
- Fixed the file prestige functions.<br>
|
||||
<h3>v1.5</h3><br>
|
||||
- Fixed the file prestige functions.<br><br>
|
||||
<h3>v1.5 The great rebalancing</h3><br>
|
||||
- Clarified some effects.<br>
|
||||
- Decreased SPP requirement.<br>
|
||||
- Made <b>Even more progress</b> affect SPP gain.<br>
|
||||
|
@ -81,9 +90,10 @@ function getPointGen() {
|
|||
gain = gain.mul(getZetaEffect())
|
||||
gain = gain.mul(getLambdaEffect())
|
||||
gain = gain.mul(tmp.ach.effect)
|
||||
gain = gain.mul(buyableEffect('f', 11))
|
||||
gain = gain.mul(tmp.i.numberEffect)
|
||||
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', 12)) gain = gain.mul(player.sp.points.add(1).log(100).add(1))
|
||||
// exponentiative
|
||||
if (gain.gte(1)) {
|
||||
gain = gain.pow(getEpsilonEffect())
|
||||
|
@ -92,13 +102,18 @@ function getPointGen() {
|
|||
if (hasMilestone('f', 3)) gain = gain.pow(2)
|
||||
if (hasUpgrade('f', 11)) gain = gain.pow(upgradeEffect('f', 11))
|
||||
if (hasUpgrade('f', 53)) gain = gain.pow(upgradeEffect('f', 53))
|
||||
if (hasMilestone('f', 13)) gain = gain.pow(player.p.points.sqrt())
|
||||
}
|
||||
// softcaps
|
||||
gain = softcap(gain, getKappaEffect().mul(1000), d => d.add(1).log(Math.E).add(1).pow(2).sub(1).div(2))
|
||||
gain = softcap(gain,
|
||||
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,
|
||||
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)
|
||||
)
|
||||
gain = gain.mul(buyableEffect('f', 11))
|
||||
gain = softcap(gain, Decimal.pow(2, 128), _ => new Decimal(0), player.points)
|
||||
return gain
|
||||
}
|
||||
|
@ -111,9 +126,9 @@ function addedPlayerData() { return {
|
|||
var displayThings = [
|
||||
"All exponentiative upgrades only take affect above 1.",
|
||||
() => getPointGen().gte(getKappaEffect().mul(1000)) ? "Your points per second are being logarithmically softcapped over "
|
||||
+ format(getKappaEffect().mul(1000)) + "/s" : "",
|
||||
+ format(getKappaEffect().mul(250).mul(1e5**hasMilestone('f',15))) + "/s" : "",
|
||||
() => getPointGen().gte(
|
||||
Decimal.pow(1e6, hasMilestone('f', 10) ? getTotalSuperLevel().pow(1/10).add(1).log(10).add(1) : 1)
|
||||
Decimal.pow(1e6, hasMilestone('f', 11) ? getTotalSuperLevel().pow(1/10).add(1).log(10).add(1) : 1)
|
||||
) ? "Your points per second are being logarithmically softcapped again over "
|
||||
+ format(Decimal.pow(
|
||||
1e6, hasMilestone('f', 11) ? getTotalSuperLevel().pow(1/10).add(1).log(10).add(1) : 1
|
||||
|
|
|
@ -424,4 +424,8 @@ function unlockAll() {
|
|||
player.f.unlocked = true
|
||||
player.f.milestones.push("8")
|
||||
player.i.unlocked = true
|
||||
player.i.milestones.push("2")
|
||||
}
|
||||
function saveBank() {
|
||||
|
||||
}
|
|
@ -185,21 +185,24 @@ function fixData(defaultData, newData) {
|
|||
}
|
||||
}
|
||||
function load() {
|
||||
let get = localStorage.getItem(modInfo.id);
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
let get;
|
||||
if (params.has('save')) get = params.get('save');
|
||||
else get = localStorage.getItem(modInfo.id);
|
||||
|
||||
if (get === null || get === undefined) {
|
||||
player = getStartPlayer();
|
||||
options = getStartOptions();
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
player = Object.assign(getStartPlayer(), JSON.parse(decodeURIComponent(escape(atob(get)))));
|
||||
fixSave();
|
||||
loadOptions();
|
||||
}
|
||||
|
||||
if (params.has('save')) options.autosave = false
|
||||
|
||||
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.time = Date.now();
|
||||
|
|
Loading…
Reference in a new issue