From cf053b46f58665f538a37aa57419f70b94fb83d5 Mon Sep 17 00:00:00 2001 From: Fen Dweller Date: Fri, 24 Jul 2020 13:41:25 -0400 Subject: [PATCH] Clean up Vue code; shade statblocks when eaten/dead --- src/App.vue | 11 +-- src/components/Combat.vue | 40 +++++------ src/components/Statblock.vue | 133 ++++++++++++++++++++++------------- src/game/combat/tests.ts | 1 - src/game/entity.ts | 1 - src/game/language.ts | 1 - 6 files changed, 105 insertions(+), 82 deletions(-) diff --git a/src/App.vue b/src/App.vue index e43dc25..515945d 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,7 +1,7 @@ @@ -20,8 +20,6 @@ import { ProperNoun, TheyPronouns, FemalePronouns, MalePronouns, ImproperNoun } } }) export default class App extends Vue { - left: Creature - right: Creature combatants: Array constructor () { super() @@ -71,12 +69,9 @@ export default class App extends Vue { cleric.title = "Lv. 5 Cleric" cleric.items.push(Items.Mace) - this.left = fighter - this.right = new Creatures.Withers() + const withers = new Creatures.Withers() const kenzie = new Creatures.Kenzie() - this.combatants = [this.left, this.right, wizard, rogue, cleric, kenzie] - console.log(this.left) - console.log(this.right) + this.combatants = [fighter, withers, wizard, rogue, cleric, kenzie] } } diff --git a/src/components/Combat.vue b/src/components/Combat.vue index 2edf95b..cd5ddaf 100644 --- a/src/components/Combat.vue +++ b/src/components/Combat.vue @@ -1,10 +1,10 @@