From a841cb8a88ce433bc9e3cfe2d75a98062e1a76fb Mon Sep 17 00:00:00 2001 From: Fen Dweller Date: Thu, 30 Jul 2020 13:16:25 -0400 Subject: [PATCH] Allow for several combat scenes to be chosen from --- src/App.vue | 40 ++++++++++++++++++++++++++------------- src/components/Header.vue | 11 ++++++++++- src/game/combat.ts | 5 ++++- 3 files changed, 41 insertions(+), 15 deletions(-) diff --git a/src/App.vue b/src/App.vue index 67d775f..3760c9a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,12 +1,12 @@ diff --git a/src/components/Header.vue b/src/components/Header.vue index b84c791..795aff3 100644 --- a/src/components/Header.vue +++ b/src/components/Header.vue @@ -3,20 +3,29 @@
Old version
+
Version: {{version}}
-
Version: {{version}}
+
+ +
diff --git a/src/game/combat.ts b/src/game/combat.ts index f2c6540..3a5b92c 100644 --- a/src/game/combat.ts +++ b/src/game/combat.ts @@ -383,6 +383,9 @@ export abstract class StatusEffect extends Effective implements VisibleStatus { get bottomRight () { return '' } } +export type EncounterDesc = { + name: TextLike; +} /** * An Encounter describes a fight: who is in it and whose turn it is */ @@ -391,7 +394,7 @@ export class Encounter { currentMove: Creature turnTime = 100 - constructor (public combatants: Creature[]) { + constructor (public desc: EncounterDesc, public combatants: Creature[]) { this.initiatives = new Map() combatants.forEach(combatant => this.initiatives.set(combatant, 0))