Add new function battle.insertQueue that inserts a decision into the
correct position in an already-sorted queue instead of re-sorting. Also,
to prevent code reuse, add new funciton battle.resolvePriority to deal
with shared code between battle.addQueue and battle.insertQueue.
Listing the generation number imitates the style used in PS! format names,
and is clearer on which generation it is than listing games from that gen
(so GSC -> Gen 2, etc)
Steel-types are immune to the poison status in Gen 3+, so wrap it into the
"fail when the opposing Pokemon is immune to the status it sets" and set
up the poison-inflicting status test to check Generation 2.
Spin off Thunder Wave to its own test, and also create a test for Glare to
check its Generation 3 behavior as well.
Some tests had incorrect program flow that was resulting in incorrect
expected behaviors.
Improved the wording on some test descriptions.
Gave some of the Pokemon Shell Armor to negate test failures due to
critical hit messages appearing before the type effectiveness messages.
Added BattlePokemon#isGrounded to check for the grounded-ness of a
Pokemon. Also BattlePokemon#isSemiInvulnerable for whether a Pokemon is
in the first turn of a two-turn move that makes them semi-invulnerable.
Fixed Terrain bugs involving Pokemon in a semi-invulnerable state.
Changed OHKO move check to use BattlePokemon#isSemiInvulnerable, fixing a
graphical bug that would display an immunity message when a Pokemon
attempted an OHKO move on a higher-leveled Pokemon that was being held by
the effect of Sky Drop.
Fixed Misty Terrain bug that was causing Rest and the effect of Yawn to
put Pokemon to sleep.
Fixed Misty Terrain bug that was causing Yawn to fail.
Fixed Electric Terrain bug that was causing Yawn to succeed.
"Sheer Force should eliminate Life Orb recoil in a move with secondary
effects" would always pass even with wrong implementation because the
Sheer Force Pokemon being used was not holding a Life Orb.
Added tests related to Mummy to Sheer Force and Rock Head.