From 96fda11a456e0950a13f64f6b6b27721b5cb8ddb Mon Sep 17 00:00:00 2001 From: Fen Dweller Date: Wed, 15 Jul 2020 12:52:46 -0400 Subject: [PATCH] Make Cafat's belch damage stats; highlight drained stats --- src/components/Statblock.vue | 17 +++++++++++++++-- src/game/entity.ts | 2 +- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/components/Statblock.vue b/src/components/Statblock.vue index 5b243d3..f22b06c 100644 --- a/src/components/Statblock.vue +++ b/src/components/Statblock.vue @@ -3,7 +3,7 @@

You

{{subject.name.all.capital}}

-
+
{{subject.vigors[vigor]}}
@@ -53,7 +53,7 @@ import 'tippy.js/dist/tippy.css' ContainerView }, methods: { - statClass (value: number, max: number) { + vigorClass (value: number, max: number) { if (value * 5 <= max) { return 'stat-entry crit' } else if (value * 3 <= max) { @@ -61,6 +61,15 @@ import 'tippy.js/dist/tippy.css' } else { return 'stat-entry' } + }, + statClass (value: number, normal: number) { + if (value < normal) { + return 'stat-entry crit' + } else if (value > normal) { + return 'stat-entry buff' + } else { + return 'stat-entry' + } } } }) @@ -136,6 +145,10 @@ a { .stat-entry.crit { color: red; } + +.stat-entry.buff { + color: green; +}