Fix mistakes in previous commit
Fix crash in /tour runautodq when it is used without a started tournament
Merge pull request #1078 from kotarou3/tournaments

Fix crash in /tour runautodq when it is used without a started tournament
Add Vivillon events
Comment out formathelp
Mega Gardevoir is OU
Fix more bugs with Protean
- Fix an issue introduced in 6539521adc, where Protean didn't activate if the target was immune to the move.
- Protean should not activate if the user fails a Detect/Protect, or the move is Fling or Natural Gift and the user has no item.
- Protean should not activate on the first turn of a Pledge Combo. Aditionally, fix Flash Fire/Storm Drain, etc being activated by the first move in the combo.
- Introduce event 'PrepareHit', which is ran after any move target is resolved but before immunity is checked.
Merge pull request #1079 from Slayer95/protean

Fix more bugs with Protean
Fix Sky Drop damaging the switch in if its original target faints
Fix Pledge moves waiting for fainted/inactive allies
Fix Eject Button interaction with Volt Switch/U-Turn
If a pokemon is switched out and in in the same turn, the move was not cancelled
Add triples center message
Make sure that switched out pokemon get their moves cancelled
There are several issues alike to the one fixed in 62611b926bc2daa07c55065ca26d7f02ca10e458
Update Triples formats

- Added Random Triples Battle
- Added Smogon Triples as challenge only
- Made XY Battle Spot Triples ladderable
Update viable moves

Removed Swagger because it is banned in all tiers
Add Pikachu Tournamentchu
Skill Swap fails if user and target share ability
Shed Bell may be nullified by Sheer Force
Also remove 'AfterMove' global event from all gens, and 'AfterMoveSelf' from Gen 3 onwards.
Fix Trick-or-Treat/Forest's Curse giving away foe's Illusion
Finish implementation of linked volatiles