diff --git a/index.html b/index.html
index bc761c1..1e25222 100644
--- a/index.html
+++ b/index.html
@@ -57,6 +57,8 @@
Added upgEffect, buyableEffect, and challEffect functions.
Added "hide completed challenges" setting.
Moved old changelogs to a separate place.
+ Fixed hasMilestone and incr_order.
+ Static layers now show the currency amount needed for the next one if you can buy max.
Full history
diff --git a/js/game.js b/js/game.js
index 5d99cf9..fa7468c 100644
--- a/js/game.js
+++ b/js/game.js
@@ -62,10 +62,12 @@ function getResetGain(layer) {
}
}
-function getNextAt(layer) {
+function getNextAt(layer, disp=false) {
if (tmp.gainExp[layer].eq(0)) return new Decimal(1/0)
- if (layers[layer].type=="static") {
- let amt = player[layer].points
+ if (layers[layer].type=="static")
+ {
+ if (!layers[layer].canBuyMax()) disp = false
+ let amt = player[layer].points.plus((disp&&tmp.layerAmt[layer].gte(tmp.nextAt[layer]))?tmp.resetGain[layer]:0)
let extraCost = Decimal.pow(layers[layer].base, amt.pow(layers[layer].exponent).div(tmp.gainExp[layer])).times(tmp.gainMults[layer])
let cost = extraCost.times(tmp.layerReqs[layer]).max(tmp.layerReqs[layer])
if (layers[layer].resCeil) cost = cost.ceil()
@@ -98,8 +100,10 @@ function shouldNotify(layer){
function rowReset(row, layer) {
for (lr in ROW_LAYERS[row]){
- if(layers[lr].doReset)
+ if(layers[lr].doReset) {
+ player[lr].active = null // Exit challenges on any row reset on an equal or higher row
layers[lr].doReset(layer)
+ }
else
if(layers[layer].row > layers[lr].row) fullLayerReset(lr)
}
diff --git a/js/layers.js b/js/layers.js
index dd06a60..e5bdc7c 100644
--- a/js/layers.js
+++ b/js/layers.js
@@ -212,12 +212,15 @@ addLayer("f", {
boop: false,
}},
color:() => "#FE0102",
- requires() {return new Decimal(200)},
+ requires() {return new Decimal(10)},
resource: "farm points",
baseResource: "candies",
baseAmount() {return player.points},
- type: "normal",
- exponent: 0.5,
+ type: "static",
+ exponent: 0.5,
+ base: 3,
+ resCeil: true,
+ canBuyMax:() => true,
gainMult() {
return new Decimal(1)
},
diff --git a/js/temp.js b/js/temp.js
index c3b2959..708fe35 100644
--- a/js/temp.js
+++ b/js/temp.js
@@ -45,7 +45,7 @@ function updateTemp() {
if (!tmp.effectDescription) tmp.effectDescription = {}
if (!tmp.style) tmp.style = {}
if (!tmp.notify) tmp.notify = {}
-
+ if (!tmp.nextAtDisp) tmp.nextAtDisp = {}
for (layer in layers) {
if (layers[layer].color) tmp.layerColor[layer] = layers[layer].color()
@@ -57,6 +57,7 @@ function updateTemp() {
tmp.resetGain[layer] = getResetGain(layer)
tmp.nextAt[layer] = getNextAt(layer)
tmp.notify[layer] = shouldNotify(layer)
+ tmp.nextAtDisp[layer] = getNextAt(layer, true)
if (layers[layer].effectDescription) tmp.effectDescription[layer] = layers[layer].effectDescription()
}
diff --git a/js/v.js b/js/v.js
index 4206150..4abea8d 100644
--- a/js/v.js
+++ b/js/v.js
@@ -209,9 +209,10 @@ function loadVue() {
template: `
-
-
+
+
`
+
})
// Displays the main resource for the layer