From ca093f0fb457a7037eb8a3acf3304e0646fa4278 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Mon, 21 Aug 2023 01:26:53 +0200 Subject: opponent counter attacks --- resources/js/classes/utility/TechniqueEffect.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'resources/js/classes/utility') diff --git a/resources/js/classes/utility/TechniqueEffect.js b/resources/js/classes/utility/TechniqueEffect.js index 852efad..fe38888 100644 --- a/resources/js/classes/utility/TechniqueEffect.js +++ b/resources/js/classes/utility/TechniqueEffect.js @@ -24,6 +24,11 @@ class TechniqueEffect { */ statusEffect = null; + /** + * @type {ElementType} + */ + switchType = ''; + /** * @type {Monster} */ @@ -52,6 +57,13 @@ class TechniqueEffect { this.recipient = effectCode.split(' ')[1]; } + else if (effectCode.startsWith('switch')) { + this.type = 'switch'; + + this.recipient = effectCode.split(' ')[1].split(',')[0]; + this.switchType = effectCode.split(' ')[1].split(',')[1]; + } + else { this.type = effectCode; } -- cgit v1.2.3