summaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
Diffstat (limited to 'layouts')
-rw-r--r--layouts/blog/baseof.html19
1 files changed, 13 insertions, 6 deletions
diff --git a/layouts/blog/baseof.html b/layouts/blog/baseof.html
index 94c2639..7b86dd3 100644
--- a/layouts/blog/baseof.html
+++ b/layouts/blog/baseof.html
@@ -376,14 +376,21 @@
if(health < 100) { state = "state1" }
if(health < 50) { state = "state2" }
- if(health < 1) { state = "state3" }
+ if(health < 1) {
+ state = "state3"
+ }
updateFace(getStateFaces().front);
- document.body.style.background = "#ff0000";
- setTimeout(
- () => { document.body.style.background = null },
- 10)
-
+
+ if(state !== "state3") {
+ document.body.style.background = "#ff0000";
+ setTimeout(
+ () => { document.body.style.background = null },
+ 10)
+ }
+ else {
+ document.body.style.background = "#000";
+ }
console.log(`state: ${state}; health: ${health}`);
})