The current implementation of ModifyAtk, ModifyDef, etc. is to pass the
actual stat into the event, have event handlers run battle.chainModify(),
ModifySpe passes in a modifier variable, calls battle.chain(), and then
ends with battle.modify() using the modifier variable. The way chainModify
is implemented within the event system also means that it chains together
modifiers in the same manner and finishes with battle.modify(), meaning
that there is no need for ModifySpe to use battle.chain() and
battle.modify() manually.
This also fixes the effect of BattlePokemon#getStat on stats other than
speed.
- Gen 1 PP overflow makes a Pokemon stale
- Staleness warnings now specify the staleness source
- Half-staleness also warns, if another pokemon is already stale
Warning on half-staleness helps remind people who seem to think
they've beaten Endless Battle Clause after 5-ish turns, when it
takes 10-20 turns for some staleness verdics, especially if
there's a lot of switching going on.
The full description is in the comments of the Endless Battle
Clause entry in rulesets.js.
This update fixes a lot of the issues with yesterday's version.
Also included: A minor refactor of deductPP, which did not need
a success variable.
The new Endless Battle Clause attempts to ban endless battles by
detecting situations in which a battle could become endless.
This approach bans endless battles without banning Leppacycling.
The exact formulation is:
A Pokémon is considered cornered if:
- it has no available moves other than Struggle
- OR a stale Pokémon used Assist Whirlwind on it
- OR it has been hit by a Struggle from a stale Pokémon on the turn
it switched in
(at the beginning of a turn, if you have available moves other than
Struggle, you are no longer cornered)
A Pokémon is considered stale if:
- it has gained a Leppa berry through any means besides starting
with one (including but not limited to Harvest, Recycle, Pickup,
Symbiosis, Bestow, Thief, Switcheroo, and Magician)
- OR it has been targeted with Fling Leppa Berry
- OR it is cornered and begins a turn with more HP than it the last
turn it began
- OR it is cornered and begins a turn with as much HP as the last
turn it began, and was not fully paralyzed, loafing around from
Truant, or immobilized from Attract
- OR it uses Transform/Imposter against a stale Pokémon
(a Pokémon that becomes stale stays stale for the rest of the match)
If all active Pokémon are stale, the player whose team originally
started with a Leppa Berry loses. If both or neither team started
with a Leppa Berry, the team that had the first stale Pokémon wins.
Implement new function getMoveTargets to list all move targets given a
user and a move. Refactor Battle system to remove redundancies with
checking move targets. Run the RedirectTarget in this function instead of
later after TryMove, since technically single-target moves changing
targets should occur before the move is attempted.
Refactor the DeductPP event to be a singleEvent that targets the Pokemon's
ability instead of a global event. Run this event on the move's targets as
calculated by BattlePokemon#getMoveTargets.
Mainly follow-up for 1deedc595, but also fixes a few bugs.
- BW/GSC/RBY - randomSet: fixed and renamed slot argument.
- BW - randomTeam: crashlogger relative path was set incorrectly.
- BW - randomTeam: PotD Magikarp and Delibird used outdated randomBattleMoves data format.
- RBY - randomTeam: builder was too reject-happy regarding weaknesses (counters prematurely updated).
An improvement of 130% more op/s is observed for RBY randomCCTeam,
with no significative performance regression for randomTeam in any gen.
- Mimic can copy any move
- Mimic can be used while Transformed
- Mimic uses its own PP for copied moves, even if its current PP is
greater than the maximum PP of the copied move
- Basically, a counter separate from the sleep counter starts at 0, and
attempting to use Sleep Talk or Snore while asleep increments it by 1.
- If the Pokemon attempts to use any other move while asleep, this
counter is reset to 0.
- If the Pokemon switches out while asleep, the current value of the
counter is added to the sleep counter.
- Its exact implementation method is ultimately theorymon-based and policy-dependent.
- Keeping the current implementation is furthermore a maintenance burden.
- Dragonite has been banned from holding stones.
- Baton Pass Clause has been added.
- Mawile and Medicham can hold Medichamite and Mawilite respectively.
- Gengarite is banned.
- Regigigas is not allowed to hold any mega stone or orb.
- Remove megastone indicator on switch out. Relevant for Baton Pass.
- Type change information is now sent silently.
Add a new event ModifyAccuracy that affects all moves other than OHKO
moves and switched many event handlers that originally used the Accuracy
event to ModifyAccuracy instead.