Commit Graph

155 Commits

Author SHA1 Message Date
Marty-D
147a3f0fec Add the last Pledge move messages. 2013-02-07 12:07:09 -05:00
Marty-D
0be8010652 Fix Custap Berry and (Hi) Jump Kick messages. 2013-02-01 15:59:32 -05:00
Marty-D
316dedc561 Add After You and Quash messages. 2013-01-30 14:46:59 -05:00
Cathy J. Fitzpatrick
69f6c62cac Fix 62 moves
As of @a475ea5901, a basePower of `false` is a special value that
denotes that the move should always fail (unless modified). This
change broke 62 moves that currently use a basePower of `false` when
they appear to intend a basePower of 0. This commit changes the
basePower of these moves to 0.
2013-01-29 14:21:41 -07:00
Guangcong Luo
0098e6c323 Fix some bugs relating to Ground immunity negation 2013-01-28 18:38:05 -08:00
Guangcong Luo
c94cfb0b80 Implement Uproar 2013-01-28 17:24:00 -08:00
Guangcong Luo
e69e7dde30 Implement Destiny Knot
(This involved refactoring a lot of the Attract implementation)
2013-01-28 10:43:46 -08:00
Guangcong Luo
a475ea5901 Fix Beat Up crash 2013-01-28 10:27:01 -08:00
Guangcong Luo
edd61c36fa Implement Assurance 2013-01-27 18:21:29 -08:00
Guangcong Luo
7f5cfe584a Implement Fusion Bolt and Fusion Flare 2013-01-27 15:44:04 -08:00
The Immortal
d56b228419 Round doesn't have to be successful to boost 2013-01-26 23:01:19 +04:00
TheImmortal
dd3c4de0f2 Implement Round 2013-01-26 22:07:33 +04:00
Guangcong Luo
3b0ddd2b4d Implement Pledges
This introduces a new function battle.prioritizeQueue which
will move a decision to the front of the queue
2013-01-26 09:22:04 -08:00
Bill Young
5aa384ea78 Fix assurance to double power when Pokemon has taken damage. 2013-01-26 02:53:16 -05:00
Marty-D
577ed2df34 Fix Pay Day message. 2013-01-25 22:00:17 -05:00
Marty-D
0a7dd3cfe4 Add the Pay Day message. 2013-01-25 20:09:48 -05:00
Guangcong Luo
c4a939f517 Mimic and Sketch moves now target correctly 2013-01-25 14:15:08 -08:00
Guangcong Luo
59ab7f43ca Fix Power Trick 2013-01-25 14:10:24 -08:00
TheImmortal
d3b3609e17 Implement Flame Burst 2013-01-25 21:42:21 +04:00
Marty-D
8bbeabb1a9 Correct Magic Coat in Gen IV and V.
- Magic Coat can only bounce one move per turn in Gen 4, while in Gen 5
it stays active until the end of the turn.
2013-01-22 15:46:50 -05:00
Marty-D
7490af2692 Fix Swallow healing. 2013-01-21 17:57:12 -05:00
TheImmortal
215cd108ee Fix Relic Song transforming Meloetta twice
- It incorrectly transforms twice in doubles due to being a spread hit
2013-01-22 00:45:29 +04:00
Guangcong Luo
7fa7f24a39 Refactor how stats are calculated
They're now read on-the-fly instead of being recalculated and cached
every update.
2013-01-21 11:49:22 -08:00
Cathy J. Fitzpatrick
6b16dd6139 Fix redirection of randomNormal target moves.
Previously, Follow Me (and anything else that redirects moves, such as
various abilities) was unable to redirect the target of a
'randomNormal' target move, because validTargetLoc() always returned
false for a 'randomNormal' type move; this reflects the fact that the
client is not allowed to specify the target for such a move, because it
is chosen randomly. However, the internal game logic does need to be
able to specify a target for 'randomNormal' moves.

This commit adds a new parameter to validTargetLoc that specifies whether
the proposed target was chosen by the client or by the internal game logic.
If the proposed target was chosen by the internal game logic, then the same
targeting rules apply as in the case of a "normal" target move.

Note that it is necessary to add this new parameter, rather than just making
'randomNormal' behave the same as 'normal', because without the userSelected
check, a user could send a crafted choice string to the server specifying a
target for a 'randomNormal' move, and the server would respect the choice.
This implementation correctly prevents the client from specifying the target
of a 'randomNormal' move.
2013-01-21 00:04:21 -07:00
Marty-D
9e89524d8f Update several move descriptions. 2013-01-18 18:48:22 -05:00
Cathy Fitzpatrick
8f6313a705 This commit makes several changes to Protect and related moves in both
Gen 4 and Gen 5:

1) In Gen 4, the chance of protecting succeeding does not fall below
   1/8, which has now been corrected in this commit. Previously, the
   chance of success in Gen 4 was allowed to drop all the way to
   1/(2**32) as in Gen 5.

   Please see upokecenter for the correct mechanics:
     http://upokecenter.dreamhosters.com/dex/?lang=en&move=182

   For Protect and friends, Smogon currently says that the chance of
   success does not fall below 50%, which is inconsistent both with the
   current Pokemon Showdown! behaviour and with upokecenter. It is
   pretty much certain that upokecenter is accurate here, since it is
   based directly on the in-game data. This commit implements the
   upokecenter mechanics.

2) This commit also consolidates some duplicate code with Protect and
   friends by moving the miss chance logic to an event of the 'stall'
   volatile called onStallMove. This allows me to remove some duplicate
   code from moves.js.

3) Currently, some but not all of Protect and friends have a flag
   called stallingMove set to true. This flag does not appear to be used
   for anything. However, for consistency, I have set it to true for all
   the "stall moves", as opposed to just a subset of them.
2013-01-15 22:33:54 -07:00
Guangcong Luo
d7b28b40ad Fix sometimes incorrect Leech Seed message in doubles 2013-01-14 21:58:10 -08:00
Guangcong Luo
3b69429f3f Fix crash with Beat Up
(it would crash if, in doubles, a Pokemon in slot 2 that was statused
used Beat Up)
2013-01-14 19:18:59 -08:00
Guangcong Luo
4811087267 Screens are less effective in doubles 2013-01-12 15:22:01 -08:00
Guangcong Luo
acbeada910 Fix Magic Guard 2013-01-11 22:51:22 -08:00
Marty-D
ddbd2d37c4 Fix multi-hit moves. 2013-01-08 20:23:21 -05:00
Marty-D
42ef0bb533 Fix Wide Guard. 2013-01-08 15:56:56 -05:00
Guangcong Luo
1a9a836ad9 Fix Rollout and Ice Ball not locking when called 2013-01-05 14:33:59 -08:00
Guangcong Luo
d6aab03fb6 Encore no longer forces retarget in doubles 2013-01-05 13:56:39 -08:00
Marty-D
b0d685be1a Imprison's effect can't be Baton Passed. 2013-01-04 18:53:47 -05:00
Guangcong Luo
cdd3af07c1 Implement Safeguard preventing confusion 2013-01-02 07:59:38 -08:00
Marty-D
c101694d84 Fix Electro Ball's Base Power in Trick Room. 2013-01-01 22:07:41 -05:00
Marty-D
c64d65182d Fix Helping Hand and Sky Drop.
- Helping Hand should work on an ally using two-turn moves.
- Sky Drop should fail on an ally.
2013-01-01 11:37:05 -05:00
Marty-D
2f6abbb384 Make Soundproof block Perish Song again. 2012-12-30 13:26:45 -05:00
Marty-D
7f25f19554 Make sure Status moves can activate certain Abilities behind Subs. 2012-12-29 00:07:33 -05:00
V4Victini
54dd6ff01b Fix GK/LK
Should be >= as opposed to >
2012-12-28 12:01:27 -05:00
Marty-D
c195611628 Fix the 1/3 recoil moves. 2012-12-22 15:27:31 -05:00
Marty-D
703a95fd3a Fix Outrage + Protect. 2012-12-19 20:33:48 -05:00
Guangcong Luo
f30c801ffd Corrections to two-turn moves' accuracy modification 2012-12-17 06:26:28 -08:00
Guangcong Luo
7dbe93dcf2 Implement Snatch 2012-12-14 14:44:55 -08:00
Guangcong Luo
8d5f2884ca Fix Baton Pass circumventing Natural Cure and Regenerator 2012-12-14 06:57:13 -08:00
Guangcong Luo
2db3d66f80 Implement Quash 2012-12-14 02:57:18 -08:00
Guangcong Luo
5922f301c7 Implement Power Split and Guard Split 2012-12-14 02:42:24 -08:00
Guangcong Luo
e68507d627 Implement Follow Me 2012-12-13 16:37:10 -08:00
Guangcong Luo
06ca4132e1 Follow Me only lasts one turn 2012-12-13 05:11:10 -08:00