Professional Documents
Culture Documents
Any event that fires on a pokemon also fires on that pokemon's side. So, for
instance,
foeModifyMove can be captured by Reflect, a side condition on the foe's side.
Any event that fires on a side also fires on the global battle. So, for instance,
a move's basePower event can be captured by Rain Dance, a weather condition on
the global battle.
Moves not called directly (e.g. moves called by Metronome, Sleep Talk,
or Pursuit) do not fire this event.
Used for Focus Punch (for the "focusing" message) and Pursuit
(to activate the side condition that listens for the foeSwitchOut
event).
Behavior differences:
1. It is passed a copy of the move object that can be modified.
2. It is fired for moves that bypass beforeMove (moves called by
Metronome, Sleep Talk, or Pursuit switching).
Only used for Struggle, which is Normal-type but does ???-type damage.
NOTE: This event fires for (and overrides) Baton Pass and U-Turn and
Pokémon with Shed Shell. DO NOT use it to implement trapping: see the
trapping flag.
examples: [type] Poison, [ability] Water Veil, [ability] Sand Rush, etc
Also used for moves whose effects are too complicated to be represented
in any other way.
Useful for cancelling an effect that fails (e.g. Encore against a newly
switched-in foe), for giving messages that an effect has started, and
for initializing effect data (e.g. Substitute, Wish).
NOTE: Not fired for abilities and items. For abilities and items, see
the switchIn event.
Most ways an effect can end are "natural". The biggest exception is
when a pokemon swiches out. In general, if you would receive a message
when the effect ends, the end event would be fired.
NOTE: If you return true when an event expires from its duration counter
reaching 0, it will never expire unless you reset its duration. To
extend an effect by one turn, simply set its duration counter to 1
before returning true.
For instance, Protect has a duration of 1 turn, and Wish has a duration
of 2 turns. Return 0 to have it never expire.
The effect's residual event is not fired when it expires - instead, its
end event is fired when its residual event would otherwise have fired.
Do not use this for effects that don't expire during a residual. For
instance, sleep expires through a sleep counter that decrements every
beforeMove event, not every residual event.
Effects associated with a side are also associated with every pokemon on a side,
and effects associated with a battle are associated with every pokemon.
For convenience, every effect has the same ID as the move, ability, or item that
induces it. The only exceptions are effects with many moves associated with them,
such as statuses, and certain volatile statuses (flinch, confusion, locked moves,
and trapping).
Nearly every effect has some sort of event listener, and each action fires an
event.
"Technician": {
desc: "When this Pokemon uses an attack that has 60 Base Power or less, the
move's Base Power receives a 50% boost. For example, a move with 60
Base
Power effectively becomes a move with 90 Base Power.",
basePowerCallbackPriority: 10,
basePowerCallback: function(pokemon, target, basePower, move) {
if (basePower <= 60) {
return basePower * 1.5;
}
return basePower;
},
id: "Technician",
name: "Technician",
num: "101"
}
> In rain, A Technician Roserade uses Grass Knot against a Vaporen behind Light
> Screen.
Next, all basePower callbacks associated with Roserade are fired. This includes
the basePower callbacks of Roserade's effects (its Technician ability), the
basePower callbacks of Roserade's teams's effects (there are none), and the
basePower callbacks of the battle effects (rain).
These callbacks are sorted by their listed priority. The Technician callback
goes first, since it has a priority of 10, and so the attack's new base power is
90.
Then, the rain's callback is called. Since Grass Knot is neither a Water nor a Fire
move, its base power is unchanged.
These are also sorted by their listed priority, and then run. With the foeBasePower
callback of Light Screen, we get a final base power of 45, which is then
passed on to the damage formula.