Fix multi target attacks missing when a target is fainted

This commit is contained in:
Flashfyre committed 2024-03-28 21:18:07 -04:00
1 parent 0be4b5dcde
commit 20799f5a4c
2 files changed
+17 -1

No files matched your search

+16
View File
@@ -145,6 +145,22 @@ export default class Move {
return !!(this.flags & flag);
}
isMultiTarget(): boolean {
switch (this.moveTarget) {
case MoveTarget.ALL_OTHERS:
case MoveTarget.ALL_NEAR_OTHERS:
case MoveTarget.ALL_NEAR_ENEMIES:
case MoveTarget.ALL_ENEMIES:
case MoveTarget.USER_AND_ALLIES:
case MoveTarget.ALL:
case MoveTarget.USER_SIDE:
case MoveTarget.ENEMY_SIDE:
case MoveTarget.BOTH_SIDES:
return true;
}
return false;
}
condition(condition: MoveCondition | MoveConditionFunc): this {
if (typeof condition === 'function')
condition = new MoveCondition(condition as MoveConditionFunc);