Fix a few minor bugs and display total level and rank

This commit is contained in:
Nif 2024-03-07 20:05:42 +00:00
parent 6bea750d59
commit 3749af2fef
2 changed files with 5 additions and 6 deletions

View file

@ -26,7 +26,7 @@ function getGammaCost(points = player.p.points) {
return getGammaLevel(points).pow_base(1.5).mul(45).sub(30) return getGammaLevel(points).pow_base(1.5).mul(45).sub(30)
} }
function getGammaEffect(points = player.p.points) { function getGammaEffect(points = player.p.points) {
return getGammaLevel(points).div(getGammaRankEffect(points).add(1/15)).add(1) return getGammaLevel(points).mul(getGammaRankEffect(points).add(1/15)).add(1)
} }
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)

View file

@ -4,11 +4,7 @@ addLayer("p", {
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: true, unlocked: true,
points: new Decimal(0), points: new Decimal(0)
best: new Decimal(0),
levels: {
epsilon: new Decimal(0),
}
}}, }},
color: "#0c6949", color: "#0c6949",
requires: new Decimal(1), // Can be a function that takes requirement increases into account requires: new Decimal(1), // Can be a function that takes requirement increases into account
@ -149,6 +145,7 @@ addLayer("p", {
progress: { progress: {
level: { level: {
content: [ content: [
["raw-html", () => "You have " + getTotalLevel() + " levels."],
["bar", "alpha"], ["bar", "alpha"],
["bar", "beta"], ["bar", "beta"],
["bar", "gamma"], ["bar", "gamma"],
@ -158,6 +155,7 @@ addLayer("p", {
}, },
rank: { rank: {
content: [ content: [
["raw-html", () => "You have " + getTotalRank() + " ranks."],
["bar", "alphaRank"], ["bar", "alphaRank"],
["bar", "betaRank"], ["bar", "betaRank"],
["bar", "gammaRank"], ["bar", "gammaRank"],
@ -170,6 +168,7 @@ addLayer("p", {
tabFormat: [ tabFormat: [
"main-display", "main-display",
"prestige-button", "prestige-button",
"resource-display",
"blank", "blank",
"blank", "blank",
["microtabs", "progress"], ["microtabs", "progress"],