Commit Graph

224 Commits

Author SHA1 Message Date
V4Victini
0ef4a02b0c Run ModifyDef/SpD events properly
and remove Chlorophyll's debug message
2013-09-11 04:10:14 -04:00
V4Victini
c50d30f11f Overhaul the stat system and implement chaining
onModifyStat events now alter the returning modifier instead of
affecting the stat directly
2013-09-11 03:17:13 -04:00
Guangcong Luo
70f78202e1 Fix Red Card activating on inactive pokemon 2013-08-11 21:33:58 -07: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
51ba6b51ce Update several short descriptions. 2013-07-06 20:51:27 -04:00
Bill Meltsner
84f6173c11 Items cleanup
- Fix Micle Berry (and Custap Berry, in Gen 4) to properly trigger with Gluttony
 - Make Micle Berry's volatile references consistent with the rest of the codebase
 - Properly alphabetize Moon Ball
2013-06-30 13:57:09 -07:00
Joim
b22269422a Fix Life Orb
Life Orb uses now BattlePokemon.prototype.modify which does the correct calculator for damage modifiers and in the correct order thanks to the ModifyDamage event.
2013-06-27 23:46:31 +02:00
Marty-D
206ce377e0 Fix Ring Target. 2013-06-13 21:16:11 -04:00
Marty-D
16747e8076 Implement a generic Mail item. 2013-05-30 19:56:01 -04:00
Marty-D
109a3da4f6 Correct mechanics for signature items. 2013-05-05 17:07:56 -04:00
Joim
a44a1c341b Add item gen directly
Item numbering is erratic from generation 3 to 4 and in some cases in generation 5, so every item has the generation in which it was added in it.
2013-04-26 00:21:22 +03:00
Joim
a965842c15 Add item numeration from the games
Added the item numeration from the game cartridges to better distinguish them between generations.
2013-04-25 20:08:22 +03: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
Cathy J. Fitzpatrick
31fac973e0 Correct trapping mechanics
This doesn't yet handle modded formats that don't validate ability
selection in the ordinary manner. Those formats will continue to work
essentially in the same manner as before, rather than with the correct
mechanics.
2013-04-10 21:19:35 -06: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
Marty-D
f786cbe640 Rowap Berry is now released. 2013-04-05 14:33:02 -04:00
Marty-D
d1db20e3ef Fix Cherish Ball's sprite, shorten Ball descriptions. 2013-04-01 16:51:22 -04:00
Marty-D
84e36531b6 Fix Eject Button.
- It should not cancel U-turn and Volt Switch's effect if the holder is
knocked out by them.
2013-03-26 17:39:38 -04:00
Guangcong Luo
5f7bb2fb2f Fix crash in items 2013-03-22 23:35:33 -07:00
Joim
75b7f4b5b5 Add different Poke Balls to items
Poke Balls must be added to items list to give them a spritenum. This change will make possible to choose and force balls for Pokemon.
2013-03-22 23:15:53 +01:00
Marty-D
bc834539cf Update the item descriptions. 2013-03-13 12:50:34 -04:00
Marty-D
e60936e185 Fix Skull Bash and Power Herb.
- Skull Bash gives +1 Defense even with Power Herb.
- Sky Drop is not affected by Power Herb.
2013-03-13 11:44:05 -04:00
Marty-D
24994745cc Fix Grip Claw. 2013-03-12 18:01:49 -04:00
Joim
a2deb423ce Doubles: Fix bug of resist berries working on Sub
Damage halving Berries were being used on Substitute being hit.
This was not correct, so if the user has a Substitue volatile 
the berry will not be consumed.
2013-03-10 18:24:06 +01:00
Guangcong Luo
d54f129342 Template/stats refactor:
- Stats are now cached and recalculated every clearVolatile (switchout)
- Power Trick, Power Split, Guard Split, Transform, forme changes now
  modify the cached stat value
- This eliminates the need for pokemon.baseSet, so it's been removed
- pokemon.transformInto has been split into transformInto and formeChange
- pokemon.baseBoosts have also been eliminated, boost changes are now
  calculated on-the-fly like stats themselves
- Overall, stat changes should be a lot more like the cartridge games now
- We're also one step closer to finally getting rid of the ModifyPokemon
  event
2013-03-06 09:53:34 -08:00
rissole
2e265dd49b Fix Red Card message 2013-02-07 21:54:43 +11:00
Marty-D
0be8010652 Fix Custap Berry and (Hi) Jump Kick messages. 2013-02-01 15:59:32 -05:00
Guangcong Luo
e69e7dde30 Implement Destiny Knot
(This involved refactoring a lot of the Attract implementation)
2013-01-28 10:43:46 -08:00
Bill Meltsner
41b7bcfb55 Fix Enigma Berry 2013-01-26 16:54:23 -08:00
TheImmortal
68b00f3ae4 Implement Metronome item 2013-01-23 17:47:06 +04:00
Guangcong Luo
5d1e4a6c4b Fix more crashes relating to new stat code 2013-01-22 10:17:56 -08:00
Cathy J. Fitzpatrick
d8dd6f2d6d Fix Choice Specs
Previously, the 'onModifySpA' method was misspelled as 'onModifySpa'.
2013-01-22 05:14:27 -07:00
Marty-D
9dc97b3940 Fix Soul Dew's boosts. 2013-01-21 16:02:16 -05: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
TheImmortal
e4db12341f Update descriptions for items now obtainable 2013-01-20 01:40:27 +04:00
TheImmortal
1e14d8df07 Free Jaboca Berry 2013-01-17 18:44:20 +04:00
Marty-D
01906be31e Fix Normal Gem + Explosion, Red Card / Eject Button for real. 2013-01-08 12:01:00 -05:00
Guangcong Luo
821ef0aed8 Some fixes to accuracy calculation 2012-12-16 11:42:56 -08:00
Guangcong Luo
bd6106f296 Custap Berry is released 2012-12-14 14:44:54 -08:00
Marty-D
57e55bfee9 Fix Custap Berry to be like Quick Claw. 2012-12-14 10:20:44 -05:00
Guangcong Luo
94a53d13cb Custap Berry outspeeds Quick Claw 2012-12-13 16:36:44 -08:00
Guangcong Luo
0dc381da2d Correct implementation of Custap Berry 2012-12-13 14:29:03 -08:00
Guangcong Luo
4edd2ddfac Fix the order of selfdestruct, drain, and recoil when used by moves 2012-12-12 10:06:56 -08:00
Guangcong Luo
ba510dea75 Doubles! now in beta
- most remaining Doubles issues have been fixed in this commit
2012-12-12 06:52:12 -08:00
Marty-D
424d617ff5 Fix Starf Berry.
- can't boost accuracy or evasion
2012-10-26 00:43:22 -03:00
Guangcong Luo
9877ef5186 Refactor items.js to not call clampIntRange 2012-10-21 17:51:26 -07:00
Marty-D
88e01e270a Fix Micle Berry. 2012-10-14 23:58:55 -03:00
Guangcong Luo
e22e7550dd Eviolite affects the base pokemon before Transform
(This is mainly relevant to Eviolite Illusion Chansey in Hackmons
2012-09-13 22:00:54 -07:00
TheImmortal
96a33159f3 Release Micle Berry
Going to be released 7 hours from now
2012-09-14 00:47:45 +04:00
Marty-D
b271657035 Fix Flame Orb and Toxic Orb more.
Forgot about Water Veil and Immunity.
2012-09-07 20:27:24 -03:00
Marty-D
1dc7a22294 Fix Flame Orb and Toxic Orb.
Neither tries to activate on type immunities.
2012-09-07 20:10:42 -03:00
Marty-D
77196154af Fix Figy Berry's heal graphic. 2012-09-01 14:42:30 -03:00
Bill Meltsner
59fcef1ad7 Implement Ring Target. 2012-08-19 00:07:12 -05:00
Guangcong Luo
575454e27b Fix Red Card message 2012-08-06 14:38:47 -07:00
Marty-D
de39153848 Fix Metal Powder. 2012-07-30 21:55:34 -03:00
TheImmortal
734f8b91d0 King's Rock & Razor Fang implementation
Does not interact correctly with Sheer Force & Shield Dust
2012-07-29 05:36:24 +04:00
Bill Meltsner
ba4148cfc7 Fix two-turn moves (mostly).
Two-turn moves are now controlled by a volatile, twoturnmove, which determines whether a Pokemon executes the charge turn or the move turn of a two-turn move. This handles mechanics like Truant Pokemon being unable to use two-turn moves, as the execution turn is their truancy turn. It also handles various edge cases involving moves that call other moves (e.g. Metronome) and Encore.

These changes add a new event, onChargeMove, in which one can return false to "skip" the charging turn and execute the move in full immediately. For example, Solarbeam returns false in onChargeMove if the weather is sunny, and Power Herb returns false if the Pokemon uses its item successfully. (Actually, those are the only two examples at present.)

This implementation is complete except for one issue, an inversion of a previous problem: whereas before, moves like Assist calling two-turn moves would execute them immediately, now, only the charge turn will be executed, and the Pokemon will not be locked into the move. This is due to be fixed soon.
2012-07-18 21:27:43 -05:00
TheImmortal
cb5d120c64 Fix Eject Button bug
Specifically, interaction between U-turn/Volt Switch and Eject Button
2012-07-18 22:05:38 +04:00
TheImmortal
9986b39224 Fix Marty's fix for Full Incense/Lagging Tail 2012-07-17 13:09:48 +04:00
Marty-D
d8feea3659 Fix Full Incense and Lagging Tail. 2012-07-16 11:10:22 -03:00
TheImmortal
9756f4498e Berries in B2W2
Apicot/Ganlon/Liechi/Petaya/Salac
2012-07-14 01:20:47 +04:00
Bill Meltsner
becc665a32 Oh yeah, Quick Claw needs an activation message too. 2012-07-12 01:23:07 -05:00
Bill Meltsner
e6cea7a0a8 Implement Quick Claw. 2012-07-11 23:54:19 -05:00
Marty-D
0adf419599 Fix rounding for some healing items. 2012-07-11 14:55:28 -03:00
Guangcong Luo
3b004b9530 Horrible stopgap fix to make Power Herb not activate for SolarBeam in sun 2012-07-05 21:24:11 -04:00
TheImmortal
f7d8d86cc2 Ganlon Berry is released 2012-07-04 01:12:55 +04:00
TheImmortal
251589cfde Griseous Orb fixes 2012-06-29 23:26:39 +04:00
Bill Meltsner
52a9c86120 Merge pull request #69 from TheImmortal/master
BW2 + DW Updates
2012-06-25 19:25:39 -07:00
Bill Meltsner
548bdbc79c Soul Dew is released. 2012-06-25 21:19:31 -05:00
TheImmortal
7a67ba7730 BW2 + DW updates 2012-06-26 00:58:03 +04:00
Guangcong Luo
6671d2da1b Salac Berry has been released 2012-06-22 22:04:22 -07:00
The Immortal
ce986bad7a Remove debug messages from Gems 2012-06-12 14:46:22 +04:00
Bill Meltsner
9bbb0b8d56 Convert battles to use the new, cartridge-simulating RNG.
Non-battle randomness is still based off of Math.random().
2012-06-12 03:47:14 -05:00
Guangcong Luo
e73c587e7d Move a bunch of files into data/
also take this opportunity to rename movedex.js -> moves.js
2012-06-08 14:25:45 -07:00