Commit Graph

3615 Commits

Author SHA1 Message Date
The Immortal
d49ca20a90 Add event Dragonite 2016-03-16 00:53:41 +04:00
Quite Quiet
79747aa8b4 Modify target sent when redirected 2016-03-15 09:21:56 +01:00
Ivo Julca
0281176fd1 Remove usage of Array|Object methods implemented by Sugar.js
Adds a dependency to shim Object.values until it's natively available.
2016-03-09 16:55:34 -05:00
The Immortal
60cbc64ec3 Remove animation if Sucker Punch fails 2016-03-09 20:33:39 +04:00
Ivo Julca
821c2eba4d Battle Factory: update sets 2016-03-08 19:32:43 -05:00
The Immortal
db251d3822 Add maxHP flag for Shedinja
Refer to 61e2cfca27.
2016-03-08 17:25:20 +04:00
Marty-D
c70bc2da94 Avoid all potential Thousand Arrows crashes from info commands 2016-03-07 21:45:29 -05:00
The Immortal
1007219525 Move Gurdurr to RU 2016-03-07 05:54:46 +04:00
Marty-D
5d01004381 Fix Powder tag 2016-03-05 22:29:33 -05:00
Ivo Julca
23573646de Fix information leak in random formats 2016-03-04 19:46:25 -05:00
The Immortal
316cd1baa4 Update NU 2016-03-05 02:05:49 +04:00
Guangcong Luo
33a0ea235e Merge pull request #2438 from QuiteQuiet/spread
Pass list of hit targets with [spread]
2016-03-04 13:44:57 -06:00
Quite Quiet
20877368a3 Pass list of hit targets with [spread] 2016-03-03 22:57:11 +01:00
Marty-D
1179e512e9 Add Hidden Ability Regi events 2016-03-03 15:47:18 -05:00
Marty-D
d4decbc30f Fix Fling and Gem interaction with stealing items 2016-03-02 09:24:26 -05:00
Quite Quiet
7a14a8f547 Notify client when a move is a spread move 2016-03-02 10:42:09 +01:00
Juanma Serrano
b88cf8fb7c Seasonal update
Improve Grappling Hook and add a move for Summer
2016-03-02 09:55:13 +01:00
The Immortal
cb7f801a19 Add new events 2016-03-01 22:09:30 +04:00
Marty-D
fcf760d34c Fix Follow Me and Rage Powder tags 2016-03-01 10:30:23 -05:00
Juanma Serrano
c92f87993f Implement March Seasonal, Dimension Doom 2016-02-29 14:44:51 +01:00
The Immortal
5047fda6fc Random Battle improvements 2016-02-28 00:35:15 +04:00
Marty-D
4db441ba2b Fix Me First 2016-02-27 15:34:13 -05:00
The Immortal
9e16f45902 Random Battle updates
- Improve Flying types by making sure they have a second STAB if they
need it
- Revert bf0af09d7c and instead hardcode
the moveset modification for Aggron; Autotomize does have a benefit
with Heavy Slam
2016-02-27 03:24:51 +04:00
The Immortal
bf0af09d7c Random Battle: Update Aggron 2016-02-26 22:28:09 +04:00
The Immortal
2bc3f92d4b Add new RU bans 2016-02-26 12:02:39 +04:00
Marty-D
93356219c0 Fix Mountaineer 2016-02-24 19:57:15 -05:00
The Immortal
bee0e4b287 Add Pikachu event 2016-02-22 15:35:17 +04:00
Guangcong Luo
541747ac85 Refactor move disabling
pokemon.disabledMoves no longer exists; disabled move information is
now all tracked in pokemon.moveset.
2016-02-19 19:41:55 -06:00
Guangcong Luo
8446e5fbc3 Fix Thousand Arrows Wonder Guard interaction
Thousand Arrows shouldn't add Smack Down if Wonder Guard avoids it.
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
The Immortal
2b02f1ee2e Random Battle: Prevent Trick with setup 2016-02-17 18:06:37 +04:00
Guangcong Luo
cc7ccd2efe Stop unnecessarily calling update()
pokemon.update() used to be called after pretty much everything, but
now that we've refactored pretty much everything out of it, it's no
longer necessary for most of the situations we call it for.

It currently only updates pokemon.speed, so I've renamed it updateSpeed
for clarity.

We now only update pokemon.speed on switch-in, right before the
residual event, and at the beginning of every turn. This gives
something like a 30% speed-up.
2016-02-17 01:07:22 -06:00
Guangcong Luo
a8e8272bac Refactor types and remove ModifyPokemon
The unwieldy system that is typesData is now removed, and is replaced by
the array `types` and the string `addedType`, which track the same amount
of information in a much more efficient way. (Roost is now hardcoded, but
let's not talk about that.)

Incidentally, this now roughly matches client, which tracks typechange
and typeadd as volatiles.

This allows us to remove ModifyPokemon, which overall provides a 10%
performance increase. I was hoping it'd be more substantial, but oh well.
2016-02-16 23:42:37 -06:00
Guangcong Luo
0fbaf3fc8e Stop using ModifyPokemon for disabling moves
We already have DisableMove.
2016-02-16 21:47:27 -06:00
Guangcong Luo
9b46d7658c Show item existence in Team Preview 2016-02-16 14:59:33 -05:00
The Immortal
00ea930a93 CC: Fix Smeargle having CAP moves 2016-02-16 18:20:35 +04:00
The Immortal
ab7eb70c44 Random Battle: Add minimum SpD for Assault Vest
Fixes #2424
2016-02-16 16:42:00 +04:00
Guangcong Luo
76dd4a586f Remove unused isSetup variable 2016-02-16 01:08:55 -05:00
Guangcong Luo
4f6d064a36 Fix Synchronize message
Synchronize reveals itself on failure as well.
2016-02-16 01:08:55 -05:00
Guangcong Luo
6eb6c8be55 Fix ability activation for Flame Body etc 2016-02-15 19:48:19 -05:00
Kevin Lau
7a3a8bc255 Fix Secret Power interactions with various abilities
- Reverted 6603f97 (fixes interaction with Shield Dust)
- Moved Hit handler that changed the secondaries to ModifyMove for
  proper interaction with Serene Grace when terrains are present
- Add behavior in Parental Bond to prevent Secret Power from activating
  its secondary on the first hit
2016-02-15 10:39:43 -08:00
The Immortal
6603f9703a Fix Secret Power interaction with Parental Bond 2016-02-12 20:32:41 +04:00
The Immortal
f8e27d3b3a Optimize learnsets
Now sorted from latest gen to oldest gen. Ordered by machine, tutor,
level up, egg, event, and dream world.
2016-02-12 19:30:31 +04:00
Guangcong Luo
b665660608 Refactor for more ES6 features
Now that nodejs/node#3072 is mostly fixed, we can finally start using
Node 4+ features.

This refactor:

- uses arrow functions where appropriate

  Note that arrow functions still aren't used in Mocha, where `this`
  is sometimes meaningful.

  This also removes the need for .bind() nearly everywhere, as well
  as the `self = this` trick.

- refactors Validator and Connection into ES6 classes

- no longer uses Array#forEach for iterating arrays

  We strongly prefer for (let i = 0; i < arr.length; i++) because of
  performance reasons. Most forEaches have been replaced with for..of,
  though, which is 5x slower than the long-form loop but 2x faster
  than forEach, which is good enough outside of most inner loops.

  The only exception is tournaments, which is due for a more invasive
  refactor soon anyway.
2016-02-10 17:40:21 -06:00
The Immortal
02fc77eed2 Move primal reversion message to client 2016-02-08 21:18:20 +04:00
Guangcong Luo
3659783a68 Update Bulletproof description 2016-02-08 09:30:30 -06:00
Guangcong Luo
a445b86daf Support hacked genders in Hackmons 2016-02-08 10:25:04 -05:00
The Immortal
477d11c906 Random Battle: Improve Lucario 2016-02-08 01:30:32 +04:00
The Immortal
1087d335cb Update Vibrava's tier 2016-02-07 05:29:08 +04:00
The Immortal
98cb0caf5c Add new event Pokemon 2016-02-06 07:00:05 +04:00