diff --git a/constants.js b/constants.js index 72014a0..7fabbc8 100644 --- a/constants.js +++ b/constants.js @@ -504,7 +504,6 @@ function createClickVictimUpgrades() { }); } - function createPowerupFreqUpgrades() { const prefix = "powerup-freq-"; let counter = 1; @@ -514,7 +513,7 @@ function createPowerupFreqUpgrades() { "desc": text.desc, "icon": "fa-drumstick-bite", "cost": { - "food": 1000 * Math.pow(10, counter) + "powerups": 5 * counter }, "effects": [ { @@ -526,7 +525,10 @@ function createPowerupFreqUpgrades() { "prereqs": { "upgrades": [ - ] + ], + "resources": { + "powerups": 1 + } } }; if (counter > 1) { @@ -536,6 +538,7 @@ function createPowerupFreqUpgrades() { }); } + let prodUpgradeText = { "micro": [ { diff --git a/gorge.js b/gorge.js index 2bdd11a..bda74ff 100644 --- a/gorge.js +++ b/gorge.js @@ -721,6 +721,13 @@ function upgradeReachable(id) { } } } + else if (type == "resources") { + for (const [resource, amount] of Object.entries(reqs)) { + if (resources[resource] < amount) { + return false; + } + }; + } } } @@ -1043,7 +1050,7 @@ function doPowerup() { button.classList.add("powerup-clicked"); resources.powerups += 1; - + clearTimeout(remove); setTimeout(() => {