This commit is contained in:
André Bastos Dias 2026-06-02 14:05:59 +01:00 committed by GitHub
commit a22fe90261
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 19 additions and 1 deletions

View File

@ -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: {

View File

@ -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'];

View File

@ -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,