Commit Graph

237 Commits

Author SHA1 Message Date
小太
f2f973fe29 Obliterate trailing whitespace 2013-08-18 21:33:15 +10:00
Guangcong Luo
1ac2924de5 Healing moves now fail when the user's at full health 2013-08-17 23:10:04 -07:00
Guangcong Luo
2f6927b3c8 Merge pull request #287 from V4Victini/patch-8
Fix weather-dependent healing moves.
2013-08-17 22:40:52 -07:00
V4Victini
ada48c1c0b Move healing to onHit from onModifyMove 2013-08-10 01:12:10 -04:00
V4Victini
4b64be082a Proprly implement Swallow's healing as well 2013-08-09 17:59:30 -04:00
Joim
eff5371248 Fix Perish Song bug in Doubles
In Doubles, there's the possibility that battle.sides[i].active[j] 
does not exist, thus causing a crash. Add a check for that.
A non-existing Pokémon is not counted for result.
If there's no active Pokémon, there's no field Perish Song 
effect whatsoever.
2013-08-07 17:35:05 +02:00
V4Victini
ab2a3b287f Fix weather-dependent healing moves.
These aren't done with a rounded fraction like the other healing moves. They heal the target by an amount equal to it's maxHP modified by either 0xAAC (.667), 0x800 (0.5), or 0x400 (0.25)
2013-08-07 03:51:33 -04:00
Guangcong Luo
ba2610825d Encore shouldn't change target if move isn't changed 2013-07-29 00:30:20 -07:00
Marty-D
40850b514f Fix Metronome calling V-create. 2013-07-23 12:23:25 -04:00
V4Victini
4e9658b76f Correct Psywave damage 2013-07-23 09:54:57 -04:00
Marty-D
294d27b3cd Minimize effect is not copied by Baton Pass. 2013-07-10 16:42:34 -04:00
V4Victini
90694f4e8b Use proper event for several effects
These effects should take place last in damage calculation during the
ModifyDamage event.
2013-07-09 22:51:15 -04:00
Marty-D
69919f0f63 Make Perish Song fail correctly. 2013-07-08 09:45:43 -04:00
Marty-D
51ba6b51ce Update several short descriptions. 2013-07-06 20:51:27 -04:00
Joim
2471df78c5 Fix Imprison + Torment not allowing Struggle
If Smeargle uses Imprison, Torment, and Transform against an opponent, it won't be able to use Struggle twice in a row and it will run no moves every two turns. Check for Struggle in Torment to fix that.
2013-07-02 11:01:40 +02:00
Marty-D
5e0acfb56b Correct previous commit. 2013-06-19 21:28:50 -04:00
Guangcong Luo
d66e619f79 Fix some redundant failure messages 2013-06-17 11:08:47 -05:00
Marty-D
31a34cc86d Fix Bide.
Gen 5: Can't hit Ghost-types.
Gen 4: Can hit Ghost-types.
Gen 3: Can't hit Ghost-types.
2013-06-17 11:11:24 -04:00
Guangcong Luo
cca66ef1fe Fix some doubles incompatibilities
Specifically, pokemon.id should never be passed to battle.add()
2013-06-16 03:18:32 -07:00
Marty-D
743c85127c Fix Transform.
- Gen 5: User cannot Transform if it or the target is already
Transformed.
- Gens 2-4: User cannot Transform if the target is already Transformed.
- Gen 1: User can Transform in both situations.
2013-06-10 11:52:25 -04:00
Marty-D
a5796b98c7 Correct references to Grip Claw's effect. 2013-06-09 18:26:52 -04:00
Marty-D
bb3d870db7 Fix Gastro Acid.
- Ability should be ignored, not replaced.
- Also the effect can be Baton Passed.
2013-06-08 20:08:00 -04:00
Marty-D
bf5750a5f5 Gen V: Display Abilities swapped by Skill Swap. 2013-06-07 20:43:33 -04:00
Cathy J. Fitzpatrick
ee0cf88f7c Revert "Correct turn order mechanics"
This reverts commit c21674c835.
2013-06-02 15:15:54 -06:00
Cathy J. Fitzpatrick
c21674c835 Correct turn order mechanics
1) For the purpose of action sorting, a Pokemon's effective speed is
   `speed & 8191`.

2) Trick Room works by replacing a Pokemon's speed by `0x2710 - speed`.
2013-06-02 15:12:59 -06:00
Marty-D
16747e8076 Implement a generic Mail item. 2013-05-30 19:56:01 -04:00
Marty-D
20f1dc8dca Fix Attract. 2013-05-28 17:47:46 -04:00
Marty-D
248513ae46 Fix Fling + Enigma Berry.
- Enigma Berry should not activate when Flung.
2013-05-26 21:46:14 -04:00
Marty-D
56e0cd2d16 Gen III: A few fixes. 2013-05-24 15:05:06 -04:00
Marty-D
fe7eacb6b7 Gen III: Preliminary move fixes. 2013-05-13 16:34:14 -04:00
Marty-D
3fc599a9e8 Fix Bounce, Dig, Dive, and Fly.
- Correctly double the power of the moves that can do so against the
user.
2013-05-09 10:20:04 -04:00
Marty-D
19fd64ae3e Fix a Final Gambit + Red Card interaction.
- Previously, using Final Gambit on a Pokemon holding a Red Card and
having the Red Card holder survive the hit would force the Final Gambit
user out and faint the Pokemon dragged in, rendering the battle
unplayable.
2013-05-03 15:01:47 -04:00
Marty-D
7ff0c7531c Fix Heal Block.
- Healing moves are now prevented and disabled correctly.
2013-04-30 21:24:35 -04:00
Guangcong Luo
782b497d3c Fix Encore + Mental Herb interaction
This fix involves overhauling how changeDecision works, which also
fixes priority order (and speed ties) getting rerolled when Encore
hits.
2013-04-23 17:21:58 -07:00
Guangcong Luo
5e607f39bb Implement Retaliate 2013-04-23 16:22:34 -07:00
Guangcong Luo
0ef3daa0f1 Fix the rest of the Air Lock interaction bugs
Specifically, Sandstorm's SpD boost and Weather Ball's power/type.
2013-04-22 01:28:27 -07:00
Cathy J. Fitzpatrick
cbfc3e5e16 Working implementation of sending exact damage for own pokemon
This isn't as elegant as I might like, but it does appear to work.
2013-04-09 03:46:45 -06:00
Guangcong Luo
63b2f1d950 Protect gives message when failing on switch 2013-04-08 11:57:51 -07:00
Guangcong Luo
92d50d32a6 Minor Natural Gift refactor
I'm calling it a refactor because I'm pretty sure it doesn't actually
change anything. But right now gems require a new code guarantee:
basePowerCallback shouldn't return false under normal circumstances.

(Some of them still do return false, but only under error conditions)
2013-04-07 11:47:15 -07:00
Guangcong Luo
5039bcea6f Fix Heal Bell 2013-04-07 10:41:52 -07:00
Guangcong Luo
c663b5eaa5 Fix Substitute for new hit system 2013-04-06 18:27:20 -07:00
Guangcong Luo
b7500a375a Make sure ability immunities go last
Specifically, abilities like Lightningrod should activate their
absorption effects after Protect, Magic Bounce, or anything like
that.
2013-04-06 15:22:32 -07:00
Guangcong Luo
2b1a5540ac Fix SR for new move hit system
Specifically, the TryFieldHit event no longer exists.

Instead, Magic Bounce has separate event handlers for TryHit and
TryHitSide.

This also fixes it so Magic Coat/Bounce happen before ability
absoption (like Water Absorb).
2013-04-06 14:35:31 -07:00
Guangcong Luo
7aa1ed7ae3 Order the TryHit event correctly
(This isn't perfect yet; Magic Coat/Bounce uses a different event,
which we'll need to correct later.)
2013-04-06 12:57:16 -07:00
Guangcong Luo
fe2da359e9 Refactor when accuracy is calculated
Accuracy is now checked after immunities and certain other effects,
rather than before.
2013-04-06 12:55:38 -07:00
Guangcong Luo
b0cfddcede Fix Gems and spread moves
Gems now boost all hits of a spread move.

This introduces a new event BasePowerMultiplier, so that gems actually
activate at the right time now.

The name is similar to basePowerModifier but they do the same thing
anyway. We should probably figure something out for their naming,
though.
2013-04-05 23:13:26 -07:00
Guangcong Luo
d196e1f826 Fix Sky Drop bug
It caused weird errors when the target was fainted.
2013-04-03 16:51:53 -07:00
Bill Meltsner
a3f7ff542a Fix Curse.
• Non-Ghost-Type Pokemon that have been Ghost Cursed can now use Curse
  on themselves.
• Curse now lets Ghost-type Pokemon select a target in Double Battles.
2013-03-30 12:46:37 -07:00
Cathy J. Fitzpatrick
e45652180b Remove use of some obsolete functions 2013-03-29 01:27:49 -06:00
Marty-D
481ac63da7 Fix Flail and Reversal.
- Also correct Sky Drop's description.
2013-03-27 16:59:30 -04:00