mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-20 22:39:31 +02:00
Protect against missing move entry
Co-authored-by: PigeonBar <56974298+PigeonBar@users.noreply.github.com>
This commit is contained in:
parent
3e6f664155
commit
1cdaaa6bed
@ -1421,7 +1421,7 @@ export class RecoilAttr extends MoveEffectAttr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Chloroblast and Struggle should not deal recoil damage if the move was not successful
|
// Chloroblast and Struggle should not deal recoil damage if the move was not successful
|
||||||
if (this.useHp && [ MoveResult.FAIL, MoveResult.MISS ].includes(user.getLastXMoves(1)[0].result)) {
|
if (this.useHp && [ MoveResult.FAIL, MoveResult.MISS ].includes(user.getLastXMoves(1)[0]?.result)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user