mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-06-02 22:08:36 -05:00
Merge aca00669ae into 6765d8422d
This commit is contained in:
commit
a22fe90261
|
|
@ -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: {
|
||||
|
|
|
|||
|
|
@ -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'];
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user