mirror of
https://github.com/osmarks/website
synced 2025-09-01 18:27:55 +00:00
Patch achievement system
This commit is contained in:
@@ -377,9 +377,9 @@ const mainLoop = () => {
|
||||
|
||||
if (hp <= 0) {
|
||||
if ("points" in window) {
|
||||
if (score >= 10) { points.unlockAchievement("emuwar10") }
|
||||
points.updateMetric("foesVanquished", function(x) { return x + score }, 0)
|
||||
points.updateMetric("deaths", function(x) { return x + 1 }, 0)
|
||||
if (score >= 10) { points.then(points => points.unlockAchievement("emuwar10")) }
|
||||
points.then(points => points.updateMetric("foesVanquished", function(x) { return x + score }, 0))
|
||||
points.then(points => points.updateMetric("deaths", function(x) { return x + 1 }, 0))
|
||||
}
|
||||
clear(saybox)
|
||||
say(saybox, gameOverMessage + " Press R to restart.")
|
||||
|
Reference in New Issue
Block a user