Commit Graph

93 Commits

Author SHA1 Message Date
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