Commit Graph

9 Commits

Author SHA1 Message Date
Ivo Julca
67da1a1221 Test: Use the new common#createBattle method
- This cuts down tons of code that define player names, avatars,
and deal with Team Preview.
2016-06-17 05:45:22 -05:00
Ivo Julca
f2aff1b6ae Refactor tests to use the new assert/battle APIs 2016-06-15 08:56:29 -05:00
Ivo Julca
2ab2937b3c Implement assert extensions to enhance the test suite 2016-06-15 08:54:18 -05:00
Guangcong Luo
82ed5e0d22 Fix Levitate Flying Ring Target interaction 2016-02-19 17:23:21 -06:00
Guangcong Luo
794d160eec Refactor runImmunity
BattlePokemon#runImmunity is now two functions, runImmunity and
runStatusImmunity.

The split is helpful because: 1. NegateImmunity only applies to type
immunities, and 2. Immunity only applies to status immunities and
Ground immunities.

Ground immunities are now entirely handled hardcoded in isGrounded.

This overall doesn't have a noticeable impact on performance, but
it makes certain things behave more predictably, and correctly
shows the ability activation for Levitate, so I assume that means it's
a net positive. I hope I at least improved readability...
2016-02-19 05:18:40 -06:00
Konrad Borowski
81f602b8d8 Always use trailing comma for multiline objects 2016-01-01 00:20:07 +01:00
Juanma Serrano
c4ac8d6e2f Use strict mode and let and const instead of var
This commit also fixes some duplicated variable declarations.
2015-11-06 21:56:52 -05:00
Ivo Julca
fc89d5f372 Test suite is now deterministic 2015-06-26 21:55:43 -05:00
Kevin Lau
b8af0856f4 Add tests for type-immunity negating moves and items 2015-06-11 13:48:28 -07:00