diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..26d3352
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/.idea/just_another_tree.iml b/.idea/just_another_tree.iml
new file mode 100644
index 0000000..d6ebd48
--- /dev/null
+++ b/.idea/just_another_tree.iml
@@ -0,0 +1,9 @@
+
+
Current endgame."
+ },
+ },
+ tabFormat: [
+ "blank",
+ ["raw-html", function () { return "Achievements: " + player[this.layer].achievements.length + "/" + (Object.keys(tmp[this.layer].achievements).length - 2) }],
+ ["raw-html", function () { return "Effect: x" + tmp[this.layer].effect + " to point gen." }],
+ "blank",
+ "achievements"
+ ],
+ tooltip() {
+ return player[this.layer].achievements.length + " achievement" + (player[this.layer].achievements.length == 1 ? "" : "s")
+ },
+ row: "side", // Row the layer is in on the tree (0 is the first row)
+ layerShown(){return true}
+})
diff --git a/js/files.js b/js/data/files.js
similarity index 95%
rename from js/files.js
rename to js/data/files.js
index c104d16..026eadf 100644
--- a/js/files.js
+++ b/js/data/files.js
@@ -1,7 +1,7 @@
addLayer("f", {
name: "files", // This is optional, only used in a few places, If absent it just uses the layer id.
symbol: "🗎", // This appears on the layer's node. Default is the id with the first letter capitalized
- position: 0, // Horizontal position within a row. By default it uses the layer id and sorts in alphabetical order
+ position: 1, // 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),
@@ -18,9 +18,9 @@ addLayer("f", {
baseResource: "progress points", // Name of resource prestige is based on
baseAmount() {return player.p.points}, // Get the current amount of baseResource
type: "static", // normal: cost to gain currency depends on amount gained. static: cost depends on how much you already have
- exponent: 1.1, // Prestige currency exponent
+ exponent: 1.3, // Prestige currency exponent
base() {
- let base = 1.2
+ let base = 2
if (hasUpgrade(this.layer, 41)) base **= 0.95
return base
},
@@ -114,7 +114,7 @@ addLayer("f", {
branches: [11]
},
23: {
- description: "Gain 5% of your PP gain every second.",
+ description: "Gain 10% of your PP gain every second.",
cost: 4,
unlocked() { return hasUpgrade(this.layer, 11) },
branches: [11]
@@ -158,7 +158,7 @@ addLayer("f", {
branches: [32, 33]
},
44: {
- description: "Gain another 5% of your PP gain every second.",
+ description: "Gain another 15% of your PP gain every second.",
cost: 8,
unlocked() { return hasUpgrade(this.layer, 23) && hasUpgrade(this.layer, 33) },
branches: [[23, 2], 33]
@@ -169,6 +169,9 @@ addLayer("f", {
display() { return "Reset directory" },
onClick() {
if (confirm("Are you sure you want to respec?")) {
+ if (player[this.layer].upgrades == 0) {
+ player.ach.has55 = true
+ }
for (let i of player[this.layer].upgrades) {
player[this.layer].points = player[this.layer].points.add(tmp[this.layer].upgrades[i].cost)
}
diff --git a/js/data/integrals.js b/js/data/integrals.js
new file mode 100644
index 0000000..8746e16
--- /dev/null
+++ b/js/data/integrals.js
@@ -0,0 +1,28 @@
+addLayer("i", {
+ name: "integrals", // This is optional, only used in a few places, If absent it just uses the layer id.
+ symbol: "∫", // This appears on the layer's node. Default is the id with the first letter capitalized
+ 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)
+ }},
+ color: "#a62222",
+ requires: Decimal.pow(2, 128), // Can be a function that takes requirement increases into account
+ resource: "integrals", // Name of prestige currency
+ baseResource: "points", // Name of resource prestige is based on
+ baseAmount() {return player.points}, // Get the current amount of baseResource
+ type: "normal", // normal: cost to gain currency depends on amount gained. static: cost depends on how much you already have
+ exponent: 1, // Prestige currency exponent
+ gainMult() { // Calculate the multiplier for main currency from bonuses
+ return new Decimal(1)
+ },
+ gainExp() { // Calculate the exponent on main currency from bonuses
+ return new Decimal(1)
+ },
+ row: 2, // Row the layer is in on the tree (0 is the first row)
+ hotkeys: [
+ {key: "i", description: "I: reset for integrals", onPress(){if (canReset(this.layer)) doReset(this.layer)}},
+ ],
+ layerShown(){ return player.points.gte("1e25") || player[this.layer].unlocked },
+ branches: ['sp', 'f']
+})
diff --git a/js/levels.js b/js/data/levels.js
similarity index 83%
rename from js/levels.js
rename to js/data/levels.js
index c79eb59..2dc9876 100644
--- a/js/levels.js
+++ b/js/data/levels.js
@@ -36,8 +36,7 @@ function getGammaCost(points = player.p.points) {
return cumulativeExponential(1.5, getGammaLevel(points).floor()).mul(15).pow(buyableEffect('p', 13))
}
function getGammaEffect(points = player.p.points) {
- return Decimal.add(points, 1).add(hasUpgrade('f', 31) ? getTotalLevel() : 0).log(Decimal.pow(50, buyableEffect('p', 12)))
- .add(1).pow(getGammaLevel(points).mul(getGammaRankEffect(points).add(1/10)))
+ return Decimal.add(points, 1).add(hasUpgrade('f', 31) ? getTotalLevel() : 0).log(Decimal.pow(50, buyableEffect('p', 12))).add(1).pow(getGammaLevel(points).mul(getGammaRankEffect(points).add(1/10)))
}
function getDeltaLevel(points = player.p.points) {
if (Decimal.eq(points, 0)) return new Decimal(0)
@@ -74,8 +73,7 @@ function getZetaEffect(points = player.p.points) {
}
function getTotalLevel(points = player.p.points) {
- return getAlphaLevel(points).add(getBetaLevel(points)).add(getGammaLevel(points)).add(getDeltaLevel(points))
- .add(getEpsilonLevel(points)).add(getZetaLevel(points))
+ return getAlphaLevel(points).add(getBetaLevel(points)).add(getGammaLevel(points)).add(getDeltaLevel(points)).add(getEpsilonLevel(points)).add(getZetaLevel(points))
}
function getEtaLevel(points = player.sp.points) {
@@ -90,35 +88,45 @@ function getEtaEffect(points = player.sp.points) {
}
function getThetaLevel(points = player.sp.points) {
if (Decimal.eq(points, 0)) return new Decimal(0)
- return inverseCumulativeExponential(1.5, Decimal.div(points, 3)).floor()
+ return inverseCumulativeExponential(1.3, Decimal.div(points, 3)).floor()
}
function getThetaCost(points = player.sp.points) {
- return cumulativeExponential(1.5, getThetaLevel(points)).mul(3)
+ return cumulativeExponential(1.3, getThetaLevel(points)).mul(3)
}
function getThetaEffect(points = player.sp.points) {
return getThetaLevel(points).pow(1/4).add(1)
}
function getIotaLevel(points = player.sp.points) {
if (Decimal.eq(points, 0)) return new Decimal(0)
- return inverseCumulativeExponential(1.7, Decimal.div(points, 5)).floor()
+ return inverseCumulativeExponential(1.5, Decimal.div(points, 5)).floor()
}
function getIotaCost(points = player.sp.points) {
- return cumulativeExponential(1.7, getIotaLevel(points)).mul(5)
+ return cumulativeExponential(1.5, getIotaLevel(points)).mul(5)
}
function getIotaEffect(points = player.sp.points) {
return getIotaLevel(points).pow(1/3).add(1)
}
function getKappaLevel(points = player.sp.points) {
if (Decimal.eq(points, 0)) return new Decimal(0)
- return inverseCumulativeExponential(2, Decimal.div(points, 8)).floor()
+ return inverseCumulativeExponential(1.7, Decimal.div(points, 8)).floor()
}
function getKappaCost(points = player.sp.points) {
- return cumulativeExponential(2, getKappaLevel(points)).mul(8)
+ return cumulativeExponential(1.7, getKappaLevel(points)).mul(8)
}
function getKappaEffect(points = player.sp.points) {
- return getKappaLevel(points).pow(2/3).add(1)
+ return getKappaLevel(points).sqrt().add(1)
+}
+function getLambdaLevel(points = player.sp.points) {
+ if (Decimal.eq(points, 0)) return new Decimal(0)
+ return inverseCumulativeExponential(2, Decimal.div(points, 13)).floor()
+}
+function getLambdaCost(points = player.sp.points) {
+ return cumulativeExponential(2, getLambdaLevel(points)).mul(13)
+}
+function getLambdaEffect(points = player.sp.points) {
+ return getLambdaLevel(points).add(1).pow(3/2)
}
function getTotalSuperLevel(points = player.sp.points) {
- return getEtaLevel(points).add(getThetaLevel(points)).add(getIotaLevel(points)).add(getKappaLevel(points))
+ return getEtaLevel(points).add(getThetaLevel(points)).add(getIotaLevel(points)).add(getKappaLevel(points)).add(getLambdaLevel(points))
}
\ No newline at end of file
diff --git a/js/progress.js b/js/data/progress.js
similarity index 96%
rename from js/progress.js
rename to js/data/progress.js
index eccc901..a40f1d1 100644
--- a/js/progress.js
+++ b/js/data/progress.js
@@ -26,7 +26,7 @@ addLayer("p", {
return mult
},
gainExp() { // Calculate the exponent on main currency from bonuses
- return new Decimal(1)
+ return buyableEffect('sp', 11)
},
row: 0, // Row the layer is in on the tree (0 is the first row)
hotkeys: [
@@ -34,8 +34,8 @@ addLayer("p", {
],
passiveGeneration() {
let gain = 0
- if (hasUpgrade('f', 44)) gain += 0.05
- if (hasUpgrade('f', 23)) gain += 0.05
+ if (hasUpgrade('f', 23)) gain += 0.1
+ if (hasUpgrade('f', 44)) gain += 0.15
return gain
},
automate() {
@@ -194,7 +194,7 @@ addLayer("p", {
cost() { return Decimal.pow(getBuyableAmount(this.layer, this.id), 1.2).mul(5).add(50) },
display() {
return "Increase progress point gain.
Amount: " + getBuyableAmount(this.layer, this.id)
- + ".
Effect: " + this.effect(getBuyableAmount(this.layer, this.id)) + "x.
Cost: "
+ + ".
Effect: x" + this.effect(getBuyableAmount(this.layer, this.id)) + ".
Cost: "
+ this.cost(getBuyableAmount(this.layer, this.id)) + " total levels."
},
canAfford() { return Decimal.gte(getTotalLevel(), this.cost()) },
@@ -260,8 +260,8 @@ addLayer("p", {
"main-display",
["row", ["prestige-button", ["clickable", 11]]],
"resource-display",
- ["raw-html", () => "You have " + getTotalLevel() + " levels."],
- ["raw-html", () => "You have " + getTotalRank() + " ranks."],
+ ["raw-html", () => "You have " + getTotalLevel() + " level" + (getTotalLevel().eq(1) ? "" : "s") + "."],
+ ["raw-html", () => "You have " + getTotalRank() + " rank" + (getTotalRank().eq(1) ? "" : "s") + "."],
"blank",
"blank",
["bar", "alphaRank"],
@@ -278,8 +278,8 @@ addLayer("p", {
"main-display",
["row", ["prestige-button", ["clickable", 11]]],
"resource-display",
- ["raw-html", () => "You have " + getTotalLevel() + " levels."],
- ["raw-html", () => "You have " + getTotalRank() + " ranks."],
+ ["raw-html", () => "You have " + getTotalLevel() + " level" + (getTotalLevel().eq(1) ? "" : "s") + "."],
+ ["raw-html", () => "You have " + getTotalRank() + " rank" + (getTotalRank().eq(1) ? "" : "s") + "."],
"blank",
"blank",
"buyables"
diff --git a/js/ranks.js b/js/data/ranks.js
similarity index 100%
rename from js/ranks.js
rename to js/data/ranks.js
diff --git a/js/super progress.js b/js/data/super progress.js
similarity index 58%
rename from js/super progress.js
rename to js/data/super progress.js
index 946a5aa..7a54736 100644
--- a/js/super progress.js
+++ b/js/data/super progress.js
@@ -1,7 +1,7 @@
addLayer("sp", {
name: "super progress", // This is optional, only used in a few places, If absent it just uses the layer id.
symbol: "‰", // This appears on the layer's node. Default is the id with the first letter capitalized
- position: 1, // 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 {
unlocked: false,
points: new Decimal(0)
@@ -23,6 +23,9 @@ addLayer("sp", {
hotkeys: [
{key: "s", description: "S: Reset for super progress points", onPress(){if (canReset(this.layer)) doReset(this.layer)}},
],
+ onPrestige(gain) {
+ if (player.p.points.eq(0)) { player.ach.has45 = true }
+ },
bars: {
eta: {
direction: RIGHT,
@@ -66,11 +69,49 @@ addLayer("sp", {
progress() { return player[this.layer].points.div(getKappaCost()) },
display() {
return "Kappa - Level " + getKappaLevel() + " (" + player[this.layer].points + "/" + getKappaCost()
- + ")
Effect: x" + getKappaEffect() + " to point gen."
+ + ")
Effect: x" + getKappaEffect() + " to softcap."
},
fillStyle: {backgroundColor: "#107f76"},
unlocked() { return getIotaLevel().gt(0) }
},
+ lambda: {
+ direction: RIGHT,
+ width: 300,
+ height: 50,
+ progress() { return player[this.layer].points.div(getLambdaCost()) },
+ display() {
+ return "Lambda - Level " + getLambdaLevel() + " (" + player[this.layer].points + "/" + getLambdaCost()
+ + ")
Effect: x" + getLambdaEffect() + " to point gen."
+ },
+ fillStyle: {backgroundColor: "#107f76"},
+ unlocked() { return getKappaLevel().gt(0) }
+ },
+ },
+ buyables: {
+ 11: {
+ title: "Much more progress",
+ effect() { return Decimal.div(getBuyableAmount(this.layer, this.id), 20).add(1) },
+ cost() { return Decimal.pow(getBuyableAmount(this.layer, this.id), 1.2).mul(3).add(20) },
+ display() {
+ return "Increase PP gain.
Amount: " + getBuyableAmount(this.layer, this.id)
+ + ".
Effect: ^" + this.effect(getBuyableAmount(this.layer, this.id)) + ".
Cost: "
+ + this.cost(getBuyableAmount(this.layer, this.id)) + " total super levels."
+ },
+ canAfford() { return Decimal.gte(getTotalSuperLevel(), this.cost()) },
+ buy() { addBuyables(this.layer, this.id, 1) }
+ },
+ 12: {
+ title: "Super point booster",
+ effect() { return Decimal.pow(getBuyableAmount(this.layer, this.id), 1.3).add(1) },
+ cost() { return Decimal.pow(getBuyableAmount(this.layer, this.id), 1.2).mul(5).add(25) },
+ display() {
+ return "Increase point gen.
Amount: " + getBuyableAmount(this.layer, this.id)
+ + ".
Effect: ^" + this.effect(getBuyableAmount(this.layer, this.id)) + ".
Cost: "
+ + this.cost(getBuyableAmount(this.layer, this.id)) + " total super levels."
+ },
+ canAfford() { return Decimal.gte(getTotalSuperLevel(), this.cost()) },
+ buy() { addBuyables(this.layer, this.id, 1) }
+ },
},
clickables: {
11: {
@@ -86,16 +127,28 @@ addLayer("sp", {
"main-display",
["row", ["prestige-button", ["clickable", 11]]],
"resource-display",
- ["raw-html", () =>
- "You have " + getTotalSuperLevel() + " super level" + (getTotalSuperLevel().eq(1) ? "" : "s") + "."
- ],
+ ["raw-html", () => "You have " + getTotalSuperLevel() + " super level" + (getTotalSuperLevel().eq(1) ? "" : "s") + "."],
"blank",
"blank",
["bar", "eta"],
["bar", "theta"],
["bar", "iota"],
+ ["bar", "kappa"],
+ ["bar", "lambda"],
]
},
+ "super buyables": {
+ content: [
+ "main-display",
+ ["row", ["prestige-button", ["clickable", 11]]],
+ "resource-display",
+ ["raw-html", () => "You have " + getTotalSuperLevel() + " super level" + (getTotalSuperLevel().eq(1) ? "" : "s") + "."],
+ "blank",
+ "blank",
+ "buyables",
+ ],
+ unlocked() { return getTotalSuperLevel().gte(18) }
+ },
},
layerShown(){ return player.points.gte(10000) || player[this.layer].unlocked },
branches: ['p'],
diff --git a/js/tree.js b/js/data/tree.js
similarity index 100%
rename from js/tree.js
rename to js/data/tree.js
diff --git a/js/mod.js b/js/mod.js
index 64f4d6c..56b4770 100644
--- a/js/mod.js
+++ b/js/mod.js
@@ -3,7 +3,7 @@ let modInfo = {
id: "nif/pbic",
author: "Nif",
pointsName: "points",
- modFiles: ["ranks.js", "levels.js", "progress.js", "super progress.js", "files.js", "tree.js"],
+ modFiles: ["data/ranks.js", "data/levels.js", "data/progress.js", "data/super progress.js", "data/files.js", "data/integrals.js", "data/achievements.js", "data/tree.js"],
discordName: "",
discordLink: "",
@@ -21,7 +21,7 @@ let changelog = `