Fix crash with playing battle animation for target not on field
This commit is contained in:
parent
06740130b9
commit
e0a63a9ed6
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue