summaryrefslogtreecommitdiff
path: root/resources/js/classes/utility/TechniqueEffect.js
diff options
context:
space:
mode:
authorDaniel Weipert <code@drogueronin.de>2023-08-21 01:26:53 +0200
committerDaniel Weipert <code@drogueronin.de>2023-08-21 01:26:53 +0200
commitca093f0fb457a7037eb8a3acf3304e0646fa4278 (patch)
tree26e0e20b38a14ba4f7c3c9f33748fa68168863e9 /resources/js/classes/utility/TechniqueEffect.js
parent43a28ad77190f2e55e2e6ba65a9a7b5b1f5dea6c (diff)
opponent counter attacks
Diffstat (limited to 'resources/js/classes/utility/TechniqueEffect.js')
-rw-r--r--resources/js/classes/utility/TechniqueEffect.js12
1 files changed, 12 insertions, 0 deletions
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
@@ -25,6 +25,11 @@ class TechniqueEffect {
statusEffect = null;
/**
+ * @type {ElementType}
+ */
+ switchType = '';
+
+ /**
* @type {Monster}
*/
user = null;
@@ -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;
}