diff --git a/data/mods/gen3/abilities.ts b/data/mods/gen3/abilities.ts index 05d84a50c5..f798f7d6a1 100644 --- a/data/mods/gen3/abilities.ts +++ b/data/mods/gen3/abilities.ts @@ -199,6 +199,12 @@ export const Abilities: import('../../../sim/dex-abilities').ModdedAbilityDataTa onStart: undefined, // no inherit onSwitchIn(pokemon) { pokemon.truantTurn = this.turn !== 0; + // it is unnecessary to keep a volatile, but it helps with cross-gen implementation + if (pokemon.truantTurn) { + pokemon.addVolatile('truant'); + } else { + pokemon.removeVolatile('truant'); + } }, onBeforeMove(pokemon) { if (pokemon.truantTurn) { @@ -209,6 +215,11 @@ export const Abilities: import('../../../sim/dex-abilities').ModdedAbilityDataTa onResidualOrder: 27, onResidual(pokemon) { pokemon.truantTurn = !pokemon.truantTurn; + if (pokemon.truantTurn) { + pokemon.addVolatile('truant'); + } else { + pokemon.removeVolatile('truant'); + } }, }, voltabsorb: { diff --git a/data/mods/gen3/moves.ts b/data/mods/gen3/moves.ts index 06cdde7a04..5d1541b91e 100644 --- a/data/mods/gen3/moves.ts +++ b/data/mods/gen3/moves.ts @@ -479,7 +479,7 @@ export const Moves: import('../../../sim/dex-moves').ModdedMoveDataTable = { inherit: true, beforeTurnCallback(pokemon, target) { if (['frz', 'slp'].includes(pokemon.status) || - (pokemon.hasAbility('truant') && pokemon.truantTurn)) return; + (pokemon.hasAbility('truant') && pokemon.volatiles['truant'])) return; if (pokemon.isAlly(target)) return; target.addVolatile('pursuit'); const data = target.volatiles['pursuit']; diff --git a/data/mods/gen4/moves.ts b/data/mods/gen4/moves.ts index 795aa6e7c8..83e302757e 100644 --- a/data/mods/gen4/moves.ts +++ b/data/mods/gen4/moves.ts @@ -508,6 +508,13 @@ export const Moves: import('../../../sim/dex-moves').ModdedMoveDataTable = { return null; } }, + condition: { + inherit: true, + onStart(pokemon) { + if (pokemon.status === 'slp' || (pokemon.hasAbility('truant') && pokemon.volatiles['truant'])) return; + this.add('-singleturn', pokemon, 'move: Focus Punch'); + }, + }, }, foresight: { inherit: true,