mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-26 16:56:11 +00:00
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
Block a user