Commit Graph

59 Commits

Author SHA1 Message Date
Guangcong Luo
066b1d6828 Merge pull request #1865 from ascriptmaster/move-fixes
Battle refactor: No longer reset ignore in Battle#update
2015-05-27 01:11:34 +00:00
Guangcong Luo
b7aa629703 Merge pull request #1889 from ascriptmaster/move-fixes-2
Battle refactor: New function isGrounded(), bug fixes
2015-05-26 07:09:19 +00:00
Kevin Lau
61996d3f6e Battle refactor: New function isGrounded(), bug fixes
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.
2015-05-21 16:54:44 -07:00
Kevin Lau
c919f1504e Add and fix up Sheer Force, Rock Head, and Substitute tests
"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.
2015-05-21 13:52:01 -07:00
Kevin Lau
9851ef9838 Add tests for Klutz, Magic Room, Embargo 2015-05-18 02:44:42 -07:00
Kevin Lau
1f10dc1185 Add terrain tests, Arena Trap tests, Inverse Battle tests 2015-05-17 19:43:15 -07:00
Kevin Lau
a5bc0632b1 Upgrade Imprison Tests
Imprison should actively prevent the Pokemon from using imprisoned moves.
2015-05-14 14:18:07 -07:00
Guangcong Luo
8b7963e996 Merge pull request #1874 from ascriptmaster/tests
Upgrade tests
2015-05-12 06:25:38 +00:00
Ivo Julca
4222ffb5df Dependant support: make sure that relative paths are resolved properly 2015-05-11 15:38:18 -05:00
Kevin Lau
dd80e38322 Upgrade tests
- Improve the wording on tests for status moves to be more clear
- Add a test for Stealth Rocks
2015-05-10 15:40:52 -07:00
Guangcong Luo
383af9eea1 Merge pull request #1858 from ascriptmaster/move-fixes-2
Fix Rage Powder's interaction with Safety Goggles
2015-05-05 05:39:29 +00:00
Guangcong Luo
4f708b1240 Merge pull request #1849 from ascriptmaster/move-fixes
Refactor disabling moves, other miscellaneous bug fixes
2015-05-05 05:36:06 +00:00
Kevin Lau
4fe6fb16f4 Add mocha tests for moves and items that disable move choices 2015-05-04 21:16:52 -07:00
Juanma Serrano
0b7a0264e9 Add a Sheer Force test 2015-05-04 12:15:21 +02:00
Kevin Lau
b3f65f76a1 Add Follow Me and Rage Powder regression tests 2015-05-04 00:06:00 -07:00
Guangcong Luo
868ccb48c0 Merge pull request #1834 from ascriptmaster/tests
Fix up Desolate Land/Primordial Sea tests
2015-04-30 07:10:20 +00:00
Guangcong Luo
f8032a9a19 Merge pull request #1830 from ascriptmaster/move-fixes
Standard Weather always fails to activate when Primal Weather is active
2015-04-30 07:10:09 +00:00
Kevin Lau
6b1bedc706 Add some Cloud Nine tests 2015-04-29 00:25:51 -07:00
Kevin Lau
5f8ddde255 Fix Desolate Land/Primordial Sea to check for the correct event
Checking for damage could lead to off-by-one errors if the Pokemon are
different.
2015-04-28 02:47:56 -07:00
Ivo Julca
245f9bd8ac Hackmons: add failing test for choice parsing when a pokémon knows Struggle 2015-04-26 17:36:06 -05:00
Guangcong Luo
27f3ae2372 Merge pull request #1805 from ascriptmaster/move-fixes-2
Fix Flower Gift to properly use formeChange
2015-04-23 16:42:00 +00:00
Kevin Lau
1a285aa04e Add regression tests for ORAS Weathers 2015-04-22 15:59:23 -07:00
Guangcong Luo
dc9ba97551 Merge pull request #1790 from ascriptmaster/move-fixes
Have Burn calculate directly in getDamage
2015-04-21 19:30:42 +00:00
Kevin Lau
83bb400e0f Fix Thousand Arrows test
Zygarde's Thousand Arrows will KO Eelektross if it gets a critical hit,
meaning that the Weakness Policy being used to check if the move was
super-effective will not activate. Fixed by initializing the battle with a
seed that does not result in a critical hit from Thousand Arrows.
2015-04-20 12:43:28 -07:00
Juanma Serrano
06f5f5a360 Gen 1: Improve Haze tests
Add a test for removing volatiles as focus energy.
Add a test for removing screens.
2015-04-17 13:09:39 +02:00
Kevin Lau
5976efea2b Add Mocha tests for status effects 2015-04-16 15:50:11 -07:00
Guangcong Luo
8ef0d5c870 Merge pull request #1777 from ascriptmaster/tests
Add some regression tests for Substitute
2015-04-15 06:28:49 +00:00
Joimer
d46d5ca598 Properly add status immunity test
It must have its own case.
We must check Pokémon of a type with a status immunity are actually immune.
2015-04-15 01:24:58 +02:00
Joimer
7cec8b6831 Update statuses test
Test also Thunder Wave not paralysing a Ground-type
2015-04-15 00:29:07 +02:00
Guangcong Luo
54947b665f Merge pull request #1728 from ascriptmaster/move-fixes
Move refactor: moves/items that ignore immunity/effectiveness
2015-04-14 17:05:22 +00:00
Kevin Lau
3632150521 Create some regression tests for Substitute 2015-04-13 15:44:53 -07:00
Ivo Julca
b9e972529b Actually make the regression tests meaningful
Also Boomburst did not exist before XY, and Uproar wasn't authentic either.
2015-04-13 02:25:34 -05:00
Ivo Julca
d367bf2650 Add regression tests for damaging moves affected by 58a5d91 2015-04-13 01:13:56 -05:00
Kevin Lau
f26b3fd279 Add type immunity tests in Mocha 2015-04-08 23:00:12 -07:00
Guangcong Luo
77b232ec25 Fix Substitute blocking foeSide moves
TryPrimaryHit, originally created for Substitute, is currently
being used for Substitute, gems, and auras. Neither of these
should affect all, foeSide, and allySide moves, so the event no
longer fires in these cases.

Included: Bonus: unit test for Substitute not blocking Stealth Rock
2015-04-03 22:48:24 -04:00
Marty-D
70e465157c Merge pull request #1656 from ascriptmaster/oldgens
Generation 4: Fix Transform's interaction with items
2015-03-26 18:23:59 -04:00
Ivo Julca
fe4eb481fa Simplify b6aea81 2015-03-24 14:37:23 -05:00
Ivo Julca
317389e2d2 Test: make sure that test server uses a clean port 2015-03-24 14:37:06 -05:00
Ivo Julca
03a8b03692 Test: remove unneeded tests for custom globals 2015-03-24 14:06:47 -05:00
Kevin Lau
a7d5199236 Add Regression Tests for Transform
Includes regression for Generation 4.
2015-03-21 19:03:38 -07:00
Kevin Lau
f60181ac91 Add Regression Tests for Weight-Based Abilities/Items/Moves 2015-03-18 18:39:01 -07:00
Kevin Lau
777b30b18f Add tests for Simple 2015-03-13 15:18:14 -07:00
Guangcong Luo
6f81899140 Fix typo in /joinbattle error 2015-03-03 04:10:27 -05:00
Guangcong Luo
8f81cfa4de Run tests on port 18003
Port 18003 was chosen at random, but the point is not to use the same
port as PS itself is running on.

This might not be the best approach, but it probably at least beats
running it on the port in config.js and conflicting with an active
PS process.
2015-03-03 01:52:50 -05:00
Kevin Lau
76484211b0 Update Unburden test
Using Leaf Storm gave the test a 10% chance to fail if it missed.
2015-02-26 12:27:31 -08:00
Kevin Lau
7cb80c7937 Add Item Removal tests
Added tests for Unburden, Pickup, and Mail.
2015-02-25 19:13:33 -08:00
Konrad Borowski
e7ac57c392 Initialize Haze test with values that don't fail.
Thunder Wave has a small chance to miss, setting seed to value that I
know doesn't fail the test fixes the problem.
2015-02-21 21:17:01 +01:00
Guangcong Luo
f874040753 Merge pull request #1546 from xfix/gen2-leftovers
Leftovers heal after switching in in Gen2
2015-02-21 13:00:18 -06:00
Konrad Borowski
815909eff2 Don't skip residuals after fainting in Gen2.
The original code was wrong, as all it did was skipping residuals.
Skipping moves is handled by `faintMessages`.
2015-02-21 11:37:39 +01:00
Slayer95
7e1a5145f0 Merge pull request #1545 from xfix/flameorb-test
Create Flame Orb test
2015-02-20 20:57:28 -05:00