Commit Graph

224 Commits

Author SHA1 Message Date
V4Victini
8a24b61713 Properly implement Powder immunity 2014-01-13 10:43:49 -05:00
nmodi
d2c4fbbfb0 One berry was incorrectly edited, fixed. 2014-01-09 00:05:27 -06:00
nmodi
1eda799638 Natural Gift BP updated for XY 2014-01-08 23:41:13 -06:00
nmodi
dd3e70592b XY Natural Gift berry power increased by 20 BP each 2014-01-08 22:37:56 -06:00
Ivo Julca
c10354578b Fix Flying Press and Freeze Dry
Items and abilities supposed to activate depending on effectiveness were not accounting for their effects
2014-01-08 19:45:22 -05:00
Guangcong Luo
c92de4a613 Properly fix removable mega stones 2014-01-08 03:22:28 -08:00
Guangcong Luo
76373dcebb Fix mega stones being removable 2014-01-08 03:21:04 -08:00
V4Victini
0ff852ccd7 Add 'megaEvolves' property to Mega Stones 2014-01-06 13:43:57 -05:00
The Immortal
e8d8e3bcf7 Fix Mega stones
They could be knocked of from a Pokemon that has Mega Evolved
2014-01-03 12:04:17 +04:00
The Immortal
4250bc7b6f Mega Stones can be taken from other Pokemon 2014-01-01 13:29:18 +04:00
V4Victini
e783243a4f Mail is unreleased 2013-12-23 19:53:11 -05:00
Guangcong Luo
4e30ad6e79 Custap Berry is unreleased 2013-12-22 23:32:11 -08:00
1338h4x
1697ae019b Update Binding Band description to match gen VI buff 2013-12-04 21:38:13 -05:00
V4Victini
e04ccd46b7 Soul Dew is not available in Gen 6 2013-12-04 02:59:35 -05:00
The Immortal
71c6d943a2 Update Gems description 2013-11-08 00:06:49 +04:00
V4Victini
d27ceb40b9 Update item names
BlackGlasses -> Black Glasses
NeverMeltIce -> Never-Melt Ice
2013-11-05 00:57:04 -05:00
V4Victini
06911f51d7 Fix Grass Gem 2013-11-03 01:36:43 -04:00
V4Victini
91509db3e2 Add Mega Stone item numbers 2013-10-31 18:26:35 -04:00
Guangcong Luo
8878feb95d Gems are apparently unreleased 2013-10-27 22:13:19 -07:00
Bill Meltsner
453f655c8d berries are delicious 2013-10-24 11:31:01 -07:00
The Immortal
dd7b4e67a3 Add new item: Maranga Berry 2013-10-24 20:13:09 +04:00
The Immortal
fac395a31f Add new item: Kee Berry 2013-10-24 20:11:44 +04:00
mal20k
2523af0b08 Implement item Safety Goggles 2013-10-22 16:23:51 -07:00
mal20k
2edfec41af Added item Assault Vest 2013-10-22 13:02:50 -07:00
The Immortal
514dd8af1d Weakness Policy shouldn't activate if the holder faints 2013-10-21 19:31:52 +04:00
The Immortal
82b8e86640 Prevent Status moves from activating Weakness Policy 2013-10-20 21:12:06 +04:00
The Immortal
e84b1d8ca2 Implement new item: Weakness Policy
Note: unsure if single use
2013-10-20 01:28:02 +04:00
The Immortal
890a7217db Add new item: Roseli Berry 2013-10-19 13:34:32 -07:00
The Immortal
50f9ece64c Add new item: Luminous Moss 2013-10-19 13:27:43 -07:00
The Immortal
1a91902b61 Add new item: Snowball 2013-10-19 12:35:17 +04:00
The Immortal
2272efcba6 Add megaStone field for mega evolution stones 2013-10-19 01:09:36 +04:00
ALAKTORN
8afad720a7 Mega Stones onTakeItem: false,
Mega Stones are confirmed to be unremovable, even by Knock Off. http://www.smogon.com/forums/threads/pok%C3%A9mon-battle-mechanics-research.3489239/page-3#post-4876344
2013-10-15 01:44:13 +02:00
The Immortal
aa473406bb Add all known Mega Stones 2013-10-14 23:39:45 +04:00
V4Victini
568a568d1a Add Abomasite 2013-10-14 15:17:04 -04:00
Oesher Ayenew
f0694fe6f2 add scizornite 2013-10-13 11:22:15 -07:00
The Immortal
c075a28627 Pixie Plate is the correct name 2013-10-13 21:21:46 +04:00
The Immortal
9a8463d498 Add Pixel Plate 2013-10-13 20:10:31 +04:00
The Immortal
93d40e0eb9 Add official Mega Evolutions 2013-10-12 01:07:50 +04:00
V4Victini
26f4943cc1 Remove unused variables 2013-10-11 15:49:17 -04:00
V4Victini
4e663da55e Use this.chainModify for base power modifiers
This also fixes Technician
2013-10-11 15:09:47 -04:00
V4Victini
fb33b72e87 Use this.chainModify for stat modifiers
Also apply Sandstorm and Hustle boosts directly to the stat.
2013-10-11 14:05:51 -04:00
V4Victini
d5c84dc134 Use this.chainModify for final modifiers 2013-10-11 13:25:14 -04:00
V4Victini
52b53a325e Fix Gems
They should only activate on attacking moves.
2013-10-10 22:02:24 -04:00
V4Victini
f7e1b0e80c Properly implement Ring Target
Only negate natural immunities
2013-10-08 11:49:40 -04:00
V4Victini
9635ea7d56 Chain base power modifiers in proper order
8: User Ability
7: Target Ability
6:  User Item
5: Target Item
4: Move Modifers
3: Other User Modifiers (Helping Hand, Charge)
2: Other Target Modifiers
1: Field Modifiers (Water Sport, Mud Sport)
2013-10-05 19:12:10 -04:00
V4Victini
8a119fefeb Chain base power modifiers
onBasePower events now affect the base power modifier as opposed to the
base power directly. Also some moves had their base power changes moved
from basePowerCallback to onBasePower. These moves affect the modifier
and not the base power.

Note: The effects of weather and burn are still incorrectly applied as
base power modifiers
2013-10-05 18:56:32 -04:00
V4Victini
bed7316a14 Chain stat modifiers in the proper order
10: Figure out a way to apply these directly to the stat later
...
6: Target Ability
5: User Ability
4: Target's Ally Abilities
3: User's Ally Abilities
2: Target's Item
1: User's Item

To be honest it's mostly for posterity's sake as well as to match the
soon-to-be-corrected base power modifiers. At the moment all stat
modifiers are either *1.5 or *2 which have the same result no matter
which order you chain them in. However a mod or ability/item in the
future could add a value that isn't as clean.
2013-10-05 01:14:11 -04:00
Guangcong Luo
2e7caa0f53 Fix crash in Life Orb 2013-09-30 08:39:08 -07:00
V4Victini
f691e10532 Correct Metronome Implementation
Fixes an abusable bug with multi-hit moves
2013-09-28 13:34:17 -04:00
V4Victini
1c2a9a76c0 Chain Final Modifiers 2013-09-27 23:30:55 -04:00
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