Fix crash with playing battle animation for target not on field
This commit is contained in:
1 parent
06740130b9
commit
e0a63a9ed6
1 file changed
+6
@@ -618,6 +618,12 @@ export abstract class BattleAnim {
|
||||
const user = !isOppAnim ? this.user : this.target;
|
||||
const target = !isOppAnim ? this.target : this.user;
|
||||
|
||||
if (!target.isOnField()) {
|
||||
if (callback)
|
||||
callback();
|
||||
return;
|
||||
}
|
||||
|
||||
const userSprite = user.getSprite();
|
||||
const targetSprite = target.getSprite();
|
||||
|
||||
|
||||
Reference in new issue
Block a user