Commit Graph

461 Commits

Author SHA1 Message Date
The Immortal
26d67eeb9b Lower Dry Skin's rating 2016-08-29 23:30:50 +04:00
urkerab
5f8a608270 Quick Claw and Custap Berry should override Stall (#2709) 2016-08-23 10:35:41 -04:00
Marty-D
5984da27c6 Fix Healer 2016-08-12 23:04:33 -04:00
urkerab
d5b985adc5 Make Illusion wear off properly after Ability-ending effects (#2638) 2016-08-11 18:47:58 -04:00
Marty-D
bb0b3e064e Fix Unnerve activation
Fixes #872
2016-08-06 17:54:21 -04:00
Marty-D
33a5b10160 Fix forme-changing effects
All should be checking base species correctly now.
2016-08-05 10:38:46 -04:00
Marty-D
cae3a7be21 Fix Flower Veil activation 2016-07-29 11:41:42 -04:00
Marty-D
cd974caf3d Add Poison Touch activation 2016-07-29 11:39:38 -04:00
Marty-D
a05fb5bb07 Fix Aroma Veil 2016-07-26 22:48:10 -04:00
Marty-D
749186e7ed Fix Cursed Body and Cute Charm activation 2016-07-26 22:44:54 -04:00
urkerab
92eaeabb3b Fix Abilities that prevent stat drops (#2647)
Brings them in line with Clear Body, White Smoke, and Mist.
2016-07-26 18:32:23 -04:00
Marty-D
0271c09ce4 Fix Yawn's interaction with other effects 2016-07-20 14:10:35 -04:00
Marty-D
a1e2cb984c Add Safeguard activation message 2016-07-18 21:06:10 -04:00
urkerab
345431c82c Fix Own Tempo's interaction with Confuse Ray again (#2629) 2016-07-18 21:02:13 -04:00
Harshvardhan Kalra
0151eb1446 Add Forecast and Flower Gift activations (#2627) 2016-07-18 12:07:02 -04:00
Marty-D
86417a7df9 Fix Ability boosting when maxed out 2016-07-09 12:17:38 -04:00
Marty-D
af7ffabecd Add Damp message 2016-07-01 22:38:20 -04:00
Marty-D
3acbe0a357 Fix Transform interaction with certain Abilities
- Multitype and Stance Change can be overwritten by Transforming
- The above two and Illusion can be obtained by Transforming
- Fix Stance Change and Zen Mode while Transformed
2016-06-23 17:07:12 -04:00
Marty-D
98667e8dd5 Correct Wonder Guard message
- Also remove its very unnecessary reimplementation in `futuremove`
2016-06-23 14:34:50 -04:00
Ivo Julca
f095ac4fea Implement Curse targetting glitch 2016-06-20 11:57:23 -05:00
Ivo Julca
ec572891a5 Fix typing information leak 2016-06-20 11:38:06 -05:00
urkerab
4c543d8c28 Fix Protean interaction with bounced moves (#2593) 2016-06-19 17:12:42 -04:00
Marty-D
39ec46022c Fix Own Tempo interaction with Flatter and Swagger
- Also prevent its activation unless the move actually hits.
2016-06-18 22:12:53 -04:00
urkerab
2b95a4eb10 Fix ability activation for Oblivious, Overcoat and Own Tempo (#2589) 2016-06-17 11:40:44 -04:00
Marty-D
6608dd5846 Add Healer animation 2016-06-08 09:55:13 -04:00
urkerab
be0f9d3be2 Show ability activation when it causes an immunity (#2555)
- Also improve `trySetStatus` and `moveHit` implementations
2016-05-22 18:44:54 -04:00
urkerab
68af97f71d Always use Object.values(template.abilities) (#2543) 2016-05-02 12:18:40 -07:00
QuiteQuiet
fcae0c67d9 Use the correct target when bouncing back moves (#2534) 2016-04-25 10:51:20 -04:00
QuiteQuiet
9d9e601be1 Alter |move| target on every target change (#2532) 2016-04-23 10:27:40 -07:00
Kevin Lau
1c574c6c55 Critical Hit Ratio refactor: Use an event to modify crit ratios (#2501)
This allows for proper crit ratios when a Pokemon loses/gains an ability,
item, or other effect in the middle of a multi-hit attack.
2016-04-11 21:35:36 -04:00
cadaeic
9a4a6f707b Implement Triple Kick multiple accuracy checks (#2495)
* Implement Triple Kick multiple accuracy checks

* Implement Triple Kick multiple accuracy checks
2016-04-10 14:29:23 -07:00
alex-taxiera
9b66ba25d3 Fix Cheek Pouch (#2497)
* Cheek pouch triggers after berry effect
* Cheek pouch triggers on Fling, Bug Bite, and Pluck
2016-04-08 23:37:01 -04:00
Marty-D
3af9c81b87 Fix Imposter interaction with Skill Swap 2016-04-07 23:28:15 -04:00
Marty-D
f1a18767c1 Fix Sticky Hold interaction with Sticky Barb 2016-03-29 13:44:19 -04:00
Carl Sobolewski
30745356c8 Pickup: make -item message consistent with others
All other abilities use '[from] ability:'
2016-03-28 01:27:37 -06:00
Carl Sobolewski
c14aa7f018 Truant: Don't leak move information 2016-03-25 14:10:26 -06:00
Kevin Lau
715de49408 Refactor Anger Point to the Hit event handler
This fixes its interaction with Clear Smog because Hit handlers for
moves always activate before all other global event handlers.

Removed the Hit event from the list of events stopped by Mold Breaker
variants as there are no abilities that would be negated by it that
use that handler.
2016-03-23 20:23:42 -07:00
Kevin Lau
bfac338ddb Normalize doesn't affect moves that change type
The ModifyMove singleEvent for moves always runs before the
larger event that triggers an ability's event handler and
take precedence over Normalize, so we code exceptions in
Normalize to not change the type in those situations.

Conveniently, all the moves that change type right now are
defaulted to Normal-type, and since Normalize technically
won't change the type of any Normal-type move, we're using
that as the guideline for our exception.
2016-03-16 10:54:47 -07:00
Quite Quiet
79747aa8b4 Modify target sent when redirected 2016-03-15 09:21:56 +01:00
Marty-D
d4decbc30f Fix Fling and Gem interaction with stealing items 2016-03-02 09:24:26 -05:00
Marty-D
93356219c0 Fix Mountaineer 2016-02-24 19:57:15 -05: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
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
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
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
Guangcong Luo
3659783a68 Update Bulletproof description 2016-02-08 09:30:30 -06:00
Marty-D
86e80c1d2c Animate Slow Start properly 2016-01-22 17:05:39 -05:00
Marty-D
79bea93431 Add Lightning Rod/Storm Drain redirection message 2016-01-13 18:25:45 -05:00