Commit Graph

151 Commits

Author SHA1 Message Date
urkerab
ba6dc7c5c0 Prevent IV values that represent half of a DV 2015-12-30 15:32:40 +00:00
Marty-D
bb7bfada94 Fix lingering issues from #2339 2015-12-28 15:09:32 -05:00
Marty-D
235e470553 Merge pull request #2339 from ascriptmaster/trapping
Trapping refactor
2015-12-28 12:10:52 -05:00
Kevin Lau
7c491ad06b Add test suites for trapping moves and abilities 2015-12-21 14:56:21 -08:00
The Immortal
d47c968ee6 Fix Magic Room interaction with Primals 2015-12-21 21:22:23 +04:00
Ivo Julca
c8df8c4e27 Test: increase timeout for Lightningrod Triples test 2015-12-21 05:41:56 -05:00
Ivo Julca
f5b3a3b875 Test: use mock-fs to sandbox the file system 2015-12-20 03:22:02 -05:00
Ivo Julca
1673f1fd9b Test: make player name sync regression test more robust
If Custom Game was configured as never rated (in order to e.g. give it an unrated ladder), it would yield bogus failures.
2015-12-20 00:18:23 -05:00
Ivo Julca
344e021700 Increase timeout for Pressure tests in Triples 2015-12-14 17:53:03 -05:00
Guangcong Luo
332a65f9c0 Convert some Users tables to ES6 Maps
Specifically, Users.users, Users.connections, and Users.pastUsers
are now ES6 Maps. In theory, this should be a minor performance
upgrade, but we still need to profile to make sure.
2015-12-10 11:52:26 -05:00
Guangcong Luo
4e9a5a962f Merge pull request #2293 from ascriptmaster/trickroom
Refactor Trick Room and fix interactions with speed-based moves
2015-12-10 11:24:32 +00:00
Kevin Lau
64c8650713 Add tests for Trick Room and the TR Glitch 2015-12-09 15:52:21 -08:00
Ivo Julca
9116fea506 Fix config crashes possibly resulting in config reset 2015-12-04 01:01:50 -05:00
Ivo Julca
50c3f8f8aa Fix test for battle player identifier consistency after rename 2015-12-03 20:45:13 -05:00
Ivo Julca
47918a6d92 Replace remaining instances of var by block bindings 2015-12-03 19:45:35 -05:00
Guangcong Luo
341ab3b684 Refactor simulator.js to new RoomGame API
This is a huge refactor that's a half-scratch rewrite of simulator.js.

Everything seems to be working so far, but with such a huge change,
I wouldn't be surprised if something went wrong.
2015-12-03 18:30:47 -06:00
Ivo Julca
33386f79aa Test: increase time limit for redirection tests 2015-11-09 00:15:48 -05:00
Ivo Julca
7dddb66253 Migrate build system to ESLint
JSHint's ES6 support is shaky, and its development has stalled as of late.
Since ESLint can do by itself both JSHint and JSCS' jobs, this commit replaces them.
Gulp and its related dependencies are also hereby removed.
2015-11-07 21:36:49 -05:00
Ivo Julca
9a52fe337f Parse all numerical user input as base 10
Also took the chance to commit some style fixes missed in 90973d5 and 04c64c1.
2015-11-07 20:08:01 -05:00
Ivo Julca
04c64c143e Cleanup: remove several unused variables 2015-11-07 17:34:21 -05:00
Ivo Julca
90973d5c0c Style fixes
- Cut down excessive spacing
- Add braces to missing conditionals
2015-11-07 17:08:09 -05: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
b794d2ee09 Fix Travis CI build 2015-11-01 16:36:05 -05:00
Ivo Julca
e510d036fd Add tests for Curse targetting
Refs Zarel/Pokemon-Showdown-Client#354
2015-11-01 15:43:35 -05:00
Konrad Borowski
d9abb0eeb7 Poison/burn/leech seed don't increment residualdmg on start in Gen1
Previously moves like Leech Seed incremented residualdmg when used by 1,
but this doesn't actually happen in the game. Instead, an actual game
uses a flag to store toxic poisoning flag, and when it's not specified,
these statuses always dealt 1/16 of full HP.

This fixes the issue where the sequence of moves (Toxic followed by Leech
Seed) was dealing 1/16, 3/16, and 4/16 of full HP in residual damage,
instead of 1/16, 2/16, and 3/16.
2015-10-04 13:26:23 +02:00
Carl Sobolewski
4155771189 Test: Fire- and Water-related weathers modify damage correctly
These calculations would return 150 and 54 damage respectively prior to the
previous commit.
2015-09-13 03:23:01 -06:00
Carl Sobolewski
f1146dcac6 Weather modifies baseDamage instead of basePower
http://git.io/vZKFp
2015-09-13 02:43:39 -06:00
Ivo Julca
e2709e6213 Fix Travis CI build 2015-09-11 00:54:37 -05:00
Ivo Julca
3ae84997c9 Test: don't load chatroom data 2015-09-11 00:41:15 -05:00
Ivo Julca
234e87319b Test: don't write to file system 2015-09-11 00:40:22 -05:00
Ivo Julca
85379ff12e Test: don't listen for connections 2015-09-11 00:38:49 -05:00
Kevin Lau
449f0aaa16 Add test suite for Shield Dust 2015-09-03 03:10:13 -07:00
Kevin Lau
1c70494e2b Fix Snatch and Imprison's interaction with Pressure
They target the user, but for the purposes of Pressure are treated as if
they target the opposing side.
2015-08-21 18:50:21 -07:00
Kevin Lau
e846fbb129 Fix Battle Armor and Shell Armor tests to no longer use the battle log
Instead, they can use Battle#on to check for the move dealing a critical
hit within the ModifyDamage event instead.
2015-08-12 16:02:12 -07:00
Ivo Julca
0a1cf02b9d Prevent login server requests in tests 2015-07-30 09:20:47 -05:00
Ivo Julca
2670d4d2ce Fix stray spacing style issues
These were not caught by the CI until the cache was deleted.
2015-07-29 15:34:42 -05:00
Ivo Julca
47263c8749 Fix players of rated battles getting out of sync on rename
- This removes one of the reasons of `sendFor` calls' sometimes failing.
- This also fixes battle logs so that they register the proper end type (forfeit).
2015-07-29 15:18:17 -05:00
Ivo Julca
cd36fbfde2 Gulpfile: add more JSCS rules
- Disallow spaces between function names and round brackets.
- Disallow spaces inside array/object literal brackets.
- Disallow spaces before semicolons.
- Disallow yoda conditions for equality.
2015-07-28 19:38:53 -05:00
Kevin Lau
9a7585c58e Add tests for Ice Ball/Rollout 2015-07-26 19:58:38 -07:00
Marty-D
d00ed0c5c5 Fix trailing whitespace from cf295251a1 2015-07-24 21:26:28 -04:00
Pikachuun
cf295251a1 Fix Flower Gift 2015-07-24 20:03:25 -04:00
Kevin Lau
b310eb00b9 Add Intimidate test for double-KOs 2015-07-19 16:54:55 -07:00
Guangcong Luo
0eb6f4b244 Merge pull request #2006 from ascriptmaster/move-fixes-2
Fix PP deduction interactions with Pressure
2015-07-17 13:40:19 -05:00
Kevin Lau
4da92ae00c Upgrade Follow Me test to check for self-targetting moves 2015-07-17 01:48:01 -07:00
Kevin Lau
913704c3ac Release and update Pressure tests
Added a check for Harsh Sun/Water moves failing and deducting PP.

Spikes has 32 max PP. Correct relevant values in the code.
2015-07-17 01:47:58 -07:00
Guangcong Luo
3bde6c758b Merge pull request #2050 from ascriptmaster/tests
Fix Mold Breaker interaction with Damp
2015-07-16 16:36:43 -05:00
Konrad Borowski
c0b71f03b7 Show that weather began even under Air Lock effect 2015-07-16 16:12:47 +02:00
Kevin Lau
e5beaba7bf Upgrade Sky Drop test to check for Follow Me 2015-07-16 04:24:07 -07:00
Kevin Lau
55f08be727 Add many Ability tests related to Mold Breaker 2015-07-15 14:48:57 -07:00
Kevin Lau
72b61b25d6 Update Intimidate test to ensure ability activation order
Re-do the activation test with the Pokemon switched to ensure that ability
activation was based on speed instead of player order.
2015-07-13 20:39:25 -07:00