- The existence of the volatile implies that the last move used by the fainted mon is the correct one.
- Just like Destiny Bond, Grudge isn't triggered by future moves, and the volatile should always be removed on BeforeMove.
Remove outdated randomcap FAQ, add 3 other questions that get asked a lot, update name and link of deviation FAQ since it has nothing to do with deviation anymore
fix trailing whitespaces from previous commit
Fix possible crash by checking that roomauth exists in a secret room
with modjoin on before checking if the target user has permission to
join. This also fixes a really, really stupid logic error in the last
commit that makes it impossible for anyone that can't bypassall to get
invited anywhere.
Update a lot of possible moves.
Reject Sharpen and Sword Dance if the Pokémon has Special attacks only.
Reject Sharpen and Growth if Pokémon has better setup.
Make recovery mons always get their recovery move.
Prefer Thunder Wave to Body Slam on movesets in which is used to paralyse mainly.
Avoid Slash with setup moves on the same set.
This commit implements at its full the Stadium format.
Stadium is a half-generation between Gen 1 and Gen 2, widely regarded as a Gen 1 game without the major gen 1 bugs.
The main changes of this game are:
Sleep lasts between 1 and 3 turns.
Hyper Beam does recharge after a faint.
Critical hits happen way less.
Substitute now blocks all status ailments and draining.
It allows tradebacks.
Partial trapping moves miss and stop their duration upon target switch.
Focus Energy actually works.
Stat calculations are done properly, burn and para drop are lost if you lose status.
Faint mechanics are now handled in the battle engine, instead of
hackily in the data files.
This also makes it so the case of Pokemon fainting mid-turn in
gen 3 singles correctly ends the turn.
After an overwhelming welcome to the format, with more than 200 spectators on the first battle, and a 64 man tourney getting full in about 5 seconds, it's plausible that this format will be popular
As it stands, the residual damage on gen 1 works as follows:
The 'residual damage' var is set to 0 when a Pokémon switches in.
Poison, burn, and leech seed increment 'residual damage' by 1 upon start. So does Toxic.
If the pokémon has a status ailemnt or leech seed, run residual damage function.
Residual damage function will damage the Pokémon for floor(total HP / 16) * 'residual damage'.
If the Pokémon has the status Toxic, increase 'residual damage' by 1.
This causes the 'toxic leech seed' bug, as if you toxic and leech seed the same Pokémon, the residual damage function will increase the damage for each damage.
This also causes the first toxic after the combination of the two to get to the next stage, as the leech seed init will increase the damage var by 1.
This alsoc auses the rest bug in which resting does not reset the residual (or toxic) counter.
See the bug in action: https://www.youtube.com/watch?v=bNjEFgsIIIY
The toxic counter is a separate volatile.
It is set to 1 on burn, poison, and leech seed.
It starts on 1 on toxic, but gets increased by 1 every turn.
If the Pokémon gets both Toxic and leech seed, both get their damage increased.
If the Pokémon gets unstatused from Toxic but regains a damage dealing residual (brn, psn, leech seed, tox), the counter won't be reset until switch out.