From c49bac094fe03613bff592833ec8ba07b46ad262 Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Tue, 2 May 2023 20:53:06 -0400 Subject: [PATCH] Attempt fixing stack overflow --- src/data/ability.ts | 3 --- src/data/battler-tag.ts | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/data/ability.ts b/src/data/ability.ts index 46ce2682132..279833a3252 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -616,9 +616,6 @@ export function applyPostWeatherLapseAbAttrs(attrType: { new(...args: any[]): Po if (!pokemon.canApplyAbility()) return; - if (weather.isEffectSuppressed(pokemon.scene)) - return; - const ability = pokemon.getAbility(); const attrs = ability.getAttrs(attrType) as PostWeatherLapseAbAttr[]; diff --git a/src/data/battler-tag.ts b/src/data/battler-tag.ts index 08d99b1a5eb..0db40ffd476 100644 --- a/src/data/battler-tag.ts +++ b/src/data/battler-tag.ts @@ -343,8 +343,8 @@ export abstract class DamagingTrapTag extends TrappedTag { pokemon.scene.unshiftPhase(new CommonAnimPhase(pokemon.scene, pokemon.isPlayer(), this.commonAnim)); const damage = Math.ceil(pokemon.getMaxHp() / 16); - pokemon.damage(damage); pokemon.scene.unshiftPhase(new DamagePhase(pokemon.scene, pokemon.isPlayer())); + pokemon.damage(damage); } return ret;