Commit Graph

7 Commits

Author SHA1 Message Date
Cathy Fitzpatrick
03d9da0d5b Use this.effect for constant effect property. 2013-01-15 22:56:45 -07: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
Marty-D
2515c59e9e Gen IV: Fix Early Bird. 2012-12-02 11:39:28 -05:00
Marty-D
2c6fb63efa Gen IV: Sleep is indeed 1-4 turns.
- tested in HGSS, Emerald, and Stadium 2 so far; same duration for all
2012-12-01 16:27:44 -05:00
Marty-D
d186ef1df4 Partial-trapping duration for Gen IV. 2012-08-29 22:44:06 -03:00
TheImmortal
236dabf074 Gen 4 Sleep mechanics 2012-07-26 20:51:08 +04:00
Marty-D
f70931bf12 Gen IV Magic Guard users can't be fully paralyzed. 2012-07-24 21:25:59 -04:00