diff --git a/src/data/ability.ts b/src/data/ability.ts index af97151f4b0..fe3a0e9478f 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -2862,6 +2862,9 @@ export class PostWeatherLapseDamageAbAttr extends PostWeatherLapseAbAttr { applyPostWeatherLapse(pokemon: Pokemon, passive: boolean, weather: Weather, args: any[]): boolean { const scene = pokemon.scene; + if (pokemon.hasAbilityWithAttr(BlockNonDirectDamageAbAttr)) { + return false; + } const abilityName = (!passive ? pokemon.getAbility() : pokemon.getPassiveAbility()).name; scene.queueMessage(i18next.t("abilityTriggers:postWeatherLapseDamage", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), abilityName })); pokemon.damageAndUpdate(Math.ceil(pokemon.getMaxHp() / (16 / this.damageFactor)), HitResult.OTHER); @@ -3139,7 +3142,7 @@ export class PostTurnHurtIfSleepingAbAttr extends PostTurnAbAttr { applyPostTurn(pokemon: Pokemon, passive: boolean, args: any[]): boolean | Promise { let hadEffect: boolean = false; for (const opp of pokemon.getOpponents()) { - if (opp.status?.effect === StatusEffect.SLEEP || opp.hasAbility(Abilities.COMATOSE)) { + if ((opp.status?.effect === StatusEffect.SLEEP || opp.hasAbility(Abilities.COMATOSE)) && !opp.hasAbilityWithAttr(BlockNonDirectDamageAbAttr)) { opp.damageAndUpdate(Math.floor(Math.max(1, opp.getMaxHp() / 8)), HitResult.OTHER); pokemon.scene.queueMessage(i18next.t("abilityTriggers:badDreams", {pokemonName: getPokemonNameWithAffix(opp)})); hadEffect = true; @@ -3528,7 +3531,7 @@ export class PostFaintContactDamageAbAttr extends PostFaintAbAttr { if (move.checkFlag(MoveFlags.MAKES_CONTACT, attacker, pokemon)) { const cancelled = new Utils.BooleanHolder(false); pokemon.scene.getField(true).map(p=>applyAbAttrs(FieldPreventExplosiveMovesAbAttr, p, cancelled)); - if (cancelled.value) { + if (cancelled.value || attacker.hasAbilityWithAttr(BlockNonDirectDamageAbAttr)) { return false; } attacker.damageAndUpdate(Math.ceil(attacker.getMaxHp() * (1 / this.damageRatio)), HitResult.OTHER); diff --git a/src/data/move.ts b/src/data/move.ts index 4cc146ff99a..ccdb5e85630 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -1638,9 +1638,14 @@ export class HitHealAttr extends MoveEffectAttr { message = i18next.t("battle:regainHealth", {pokemonName: getPokemonNameWithAffix(user)}); } if (reverseDrain) { - user.turnData.damageTaken += healAmount; - healAmount = healAmount * -1; - message = null; + if (user.hasAbilityWithAttr(BlockNonDirectDamageAbAttr)) { + healAmount = 0; + message = null; + } else { + user.turnData.damageTaken += healAmount; + healAmount = healAmount * -1; + message = null; + } } user.scene.unshiftPhase(new PokemonHealPhase(user.scene, user.getBattlerIndex(), healAmount, message, false, true)); return true;