So, I was planning to make some sort of meta-layer that would reset most things in the normal tree when you reset it, and I wanted it to be based off of how many upgrades you had. I wanted it to unlock when I had 10 upgrades. However, for some reason, after 12 upgrades it still isn’t unlocked.
Can somebody help me with this issue? Are there any bugs in the code that I should be aware of? Am I missing any code?
addLayer("p", {
name: "prestige",
symbol: "P",
startData() { return {
unlocked: false,
points: new Decimal(0),
total: new Decimal(0),
best: new Decimal(0),
resetTime: new Decimal(0),
}},
color: "#F7A",
requires: new Decimal(10),
resource: "prestige points",
baseResource: "upgrades",
baseAmount() {return new Decimal(player.f.upgrades.length)},
hotkeys: [{key: "p", description: "P: Prestige, if possible", onPress(){if(canReset(this.layer)) doReset(this.layer)}},],
layerShown(){return new Decimal(player.f.upgrades.length).gte(5) || player[this.layer].total.gte(1)},
resetDescription: "Reset the normal tree and your size to get ",
row: "side",
}),