diff --git a/src/phases/move-effect-phase.ts b/src/phases/move-effect-phase.ts index 263a576c4f0..da8b6b1c00b 100644 --- a/src/phases/move-effect-phase.ts +++ b/src/phases/move-effect-phase.ts @@ -272,7 +272,6 @@ export class MoveEffectPhase extends PokemonPhase { if (move.hitsSubstitute(user, target)) { return resolve(); } - // If the invoked move is an enemy attack, apply the enemy's status effect-inflicting tokens if (!user.isPlayer() && this.move.getMove() instanceof AttackMove) { user.scene.applyShuffledModifiers(this.scene, EnemyAttackStatusEffectChanceModifier, false, target); diff --git a/src/phases/stat-stage-change-phase.ts b/src/phases/stat-stage-change-phase.ts index 4418c38c849..a94d8ca1424 100644 --- a/src/phases/stat-stage-change-phase.ts +++ b/src/phases/stat-stage-change-phase.ts @@ -1,6 +1,6 @@ import { BattlerIndex } from "#app/battle"; import BattleScene from "#app/battle-scene"; -import { applyAbAttrs, applyPostStatStageChangeAbAttrs, applyPreStatStageChangeAbAttrs, PostStatStageChangeAbAttr, ProtectStatAbAttr, StatStageChangeCopyAbAttr, StatStageChangeMultiplierAbAttr } from "#app/data/ability"; +import { applyAbAttrs, applyPostStatStageChangeAbAttrs, applyPreStatStageChangeAbAttrs, PostStatStageChangeAbAttr, PostStatStageChangeStatStageChangeAbAttr, ProtectStatAbAttr, StatStageChangeCopyAbAttr, StatStageChangeMultiplierAbAttr } from "#app/data/ability"; import { ArenaTagSide, MistTag } from "#app/data/arena-tag"; import Pokemon from "#app/field/pokemon"; import { getPokemonNameWithAffix } from "#app/messages"; @@ -106,7 +106,15 @@ export class StatStageChangePhase extends PokemonPhase { } } - applyPostStatStageChangeAbAttrs(PostStatStageChangeAbAttr, pokemon, filteredStats, this.stages, this.selfTarget); + // If a pokemon has defiant or competitive which activates for each stat lowered, loop over each stat lowered + const defiantOrCompetitive = pokemon.getAbilityAttrs(PostStatStageChangeStatStageChangeAbAttr); + if (defiantOrCompetitive?.length > 0) { + for (let _ = 0; _ < filteredStats.length; _++) { + applyPostStatStageChangeAbAttrs(PostStatStageChangeAbAttr, pokemon, filteredStats, this.stages, this.selfTarget); + } + } else { + applyPostStatStageChangeAbAttrs(PostStatStageChangeAbAttr, pokemon, filteredStats, this.stages, this.selfTarget); + } // Look for any other stat change phases; if this is the last one, do White Herb check const existingPhase = this.scene.findPhase(p => p instanceof StatStageChangePhase && p.battlerIndex === this.battlerIndex);