summaryrefslogtreecommitdiff
path: root/resources/js/classes/utility
diff options
context:
space:
mode:
Diffstat (limited to 'resources/js/classes/utility')
-rw-r--r--resources/js/classes/utility/TechniqueEffect.js15
1 files changed, 10 insertions, 5 deletions
diff --git a/resources/js/classes/utility/TechniqueEffect.js b/resources/js/classes/utility/TechniqueEffect.js
index 10e9399..852efad 100644
--- a/resources/js/classes/utility/TechniqueEffect.js
+++ b/resources/js/classes/utility/TechniqueEffect.js
@@ -5,11 +5,16 @@ class TechniqueEffect {
type = '';
/**
- * @type {(('user' | 'target')|Monster)}
+ * @type {('user' | 'target')}
*/
recipient = null;
/**
+ * @type {Monster[]}
+ */
+ recipients = [];
+
+ /**
* @type {('give' | 'remove')}
*/
application = '';
@@ -56,8 +61,8 @@ class TechniqueEffect {
* @type {Monster}
*/
setUser (user) {
- if (this.recipient === 'user') {
- this.recipient = user;
+ if (['user', 'both'].includes(this.recipient)) {
+ this.recipients.push(user);
}
}
@@ -65,8 +70,8 @@ class TechniqueEffect {
* @type {Monster}
*/
setTarget (target) {
- if (this.recipient === 'target') {
- this.recipient = target;
+ if (['target', 'both'].includes(this.recipient)) {
+ this.recipients.push(target);
}
}
}