fix weird luck when catching a fused mon

This commit is contained in:
Matthew Olker 2024-06-05 15:41:04 -04:00
parent 4a9fe763a5
commit 3855b92237
1 changed files with 1 additions and 1 deletions
src/data

View File

@ -2462,7 +2462,7 @@ export class PostTurnStatusHealAbAttr extends PostTurnAbAttr {
* @returns Returns true if healed from status, false if not
*/
applyPostTurn(pokemon: Pokemon, passive: boolean, args: any[]): boolean | Promise<boolean> {
if (this.effects.includes(pokemon.status.effect)) {
if (this.effects.includes(pokemon.status?.effect)) {
if (pokemon.getMaxHp() !== pokemon.hp) {
const scene = pokemon.scene;
const abilityName = (!passive ? pokemon.getAbility() : pokemon.getPassiveAbility()).name;