Commit Graph

270 Commits

Author SHA1 Message Date
The Immortal
62b3219def Update Thick Club for Alola forms 2016-11-18 13:24:25 +04:00
Marty-D
0d1581d4fa Fix exclusive Z-Move users 2016-11-17 22:15:29 -05:00
Marty-D
9ce2ae1aed Add Z-Crystal data 2016-11-17 22:08:10 -05:00
Marty-D
ceca7aaa2d Implement Silvally's type changing
Plus add support for Z-Crystals working with Multitype and Fling powers
with Memories.
2016-11-17 11:06:13 -06:00
Marty-D
82d8aa2b81 Implement new items 2016-11-17 11:06:13 -06:00
Marty-D
9ace6d2391 Add Soul Dew change 2016-11-17 11:06:13 -06:00
urkerab
efdc8e33a0 Run powder immunities in the correct order (#2842) 2016-10-14 23:11:59 -04:00
Marty-D
e806ce0e32 Add missing item index numbers 2016-09-01 18:16:00 -04:00
urkerab
c8b808138d -activate should include item: or move: prefix (#2724) 2016-08-28 12:35:15 -05:00
urkerab
5f8a608270 Quick Claw and Custap Berry should override Stall (#2709) 2016-08-23 10:35:41 -04:00
urkerab
98eeba9f22 Bug Bite/Pluck should only activate Belch/Cheek Pouch for edible Berries (#2694) 2016-08-23 10:35:24 -04:00
Marty-D
5b1c5a5406 Correct Park/Sport Ball's gen of origin 2016-08-15 21:23:54 -04:00
urkerab
6a8b55e9d2 Fix interaction between Illusion and Primal Reversion (#2693) 2016-08-13 16:39:41 -04:00
urkerab
219ed9f4eb Fix Red Card's interaction with spread moves (#2628) 2016-07-18 21:02:00 -04:00
urkerab
2b95a4eb10 Fix ability activation for Oblivious, Overcoat and Own Tempo (#2589) 2016-06-17 11:40:44 -04:00
Marty-D
5612d223de Fix type-resist Berries' interaction with substitutes
Plus add weakening message
2016-06-09 11:32:26 -04:00
Marty-D
a1752fd6c9 Clarify Eject Button and Red Card descriptions 2016-06-08 12:37:21 -04:00
Guangcong Luo
d27df9235f Endless Battle Clause: Fix bug in Fling detection
Eating a Leppa Berry with a stale foe (mainly from flinging Leppa) now
correctly ends the game.
2016-04-22 23:10:43 -07:00
Kevin Lau
1c574c6c55 Critical Hit Ratio refactor: Use an event to modify crit ratios (#2501)
This allows for proper crit ratios when a Pokemon loses/gains an ability,
item, or other effect in the middle of a multi-hit attack.
2016-04-11 21:35:36 -04:00
alex-taxiera
9b66ba25d3 Fix Cheek Pouch (#2497)
* Cheek pouch triggers after berry effect
* Cheek pouch triggers on Fling, Bug Bite, and Pluck
2016-04-08 23:37:01 -04:00
Guangcong Luo
794d160eec Refactor runImmunity
BattlePokemon#runImmunity is now two functions, runImmunity and
runStatusImmunity.

The split is helpful because: 1. NegateImmunity only applies to type
immunities, and 2. Immunity only applies to status immunities and
Ground immunities.

Ground immunities are now entirely handled hardcoded in isGrounded.

This overall doesn't have a noticeable impact on performance, but
it makes certain things behave more predictably, and correctly
shows the ability activation for Levitate, so I assume that means it's
a net positive. I hope I at least improved readability...
2016-02-19 05:18:40 -06:00
The Immortal
02fc77eed2 Move primal reversion message to client 2016-02-08 21:18:20 +04:00
Marty-D
b7d3ce40e7 Add CAP 21: Crucibelle 2016-01-11 18:55:05 -05:00
Konrad Borowski
81f602b8d8 Always use trailing comma for multiline objects 2016-01-01 00:20:07 +01:00
Konrad Borowski
79a5b23f25 Modify data and mods files to follow style rules 2016-01-01 00:18:00 +01:00
Marty-D
edc2b8f98a Fix Jaboca and Rowap Berries' damage ordering
Corrects interactions with Bug Bite/Pluck/Knock Off, etc.
2015-12-28 17:40:30 -05:00
Guangcong Luo
2e7af97262 Fix Primal activation order 2015-12-28 12:16:32 -05:00
Marty-D
235e470553 Merge pull request #2339 from ascriptmaster/trapping
Trapping refactor
2015-12-28 12:10:52 -05:00
Marty-D
7d11d384f7 Restrict Ice Berry to Gen 2 games 2015-12-25 14:06:06 -05:00
Marty-D
8d2c022c14 Gen II: Remove now unneeded items.
And fix up the real Gen 2 items.
2015-12-24 12:36:57 -05:00
Guangcong Luo
02274e56be Add missed gen 2 item 'Dragon Scale' 2015-12-24 08:26:23 -06:00
Guangcong Luo
f351885781 Fix 'Energy Powder' item name for gen 6 2015-12-24 08:25:56 -06:00
Guangcong Luo
15caa435bd Add a default sprite for Berserk Gene
We're using Red Chain; probably the best option we have that was
already in our sprite sheet.
2015-12-24 04:37:16 -06:00
Guangcong Luo
8aa1409da7 Add Gen 2 only items
PS has a tradition of supporting future-gen items/moves/etc in past gens,
so why not the other way around? Obviously, these items are banned
outside of Custom Game.

This mainly helps make the teambuilder less confusing to gen 2 players.
2015-12-24 03:19:31 -06:00
Kevin Lau
567b070cda Refactor trapping mechanics out of ModifyPokemon event
Trapping is now checked within Battle#nextTurn as a new TrapPokemon event.
All relevant abilities/items/moves have been adjusted to use it.
2015-12-21 14:56:22 -08:00
Marty-D
6ecac2029d Fix Mental Herb always showing Attract's end message 2015-12-08 11:22:01 -05:00
Marty-D
091fffee59 Fix Air Balloon showing during Gravity 2015-11-20 12:19:34 -05:00
Ivo Julca
8619ba2022 Turn on strict mode globally for real 2015-11-08 15:38:15 -05:00
Ivo Julca
38eb5d373d Lint: fix variable name collisions in data 2015-11-06 22:31:36 -05:00
Ivo Julca
1a8c51e9a9 Consolidate Pokémon forme validation
- Introduces `battleOnly` to Pokémon formats-data to flag which formes are forbidden on battle start.
- Adds back Secret Sword as Keldeo-Resolute's required move.
- Introduces `requiredAbility` to handle Darmanitan-Zen.
- Introduces `forcedForme` to items' data to flag the formes that some items enforce.
2015-10-20 23:13:32 -05:00
Marty-D
48e4bc46f3 Apply more accurate modifiers in damage calculations 2015-10-18 21:03:37 -04:00
Marty-D
51fb5c8745 Fix Enigma Berry 2015-09-12 21:15:22 -04:00
Marty-D
ecda0f293d Correct Natural Gift base powers 2015-09-03 13:12:29 -04:00
Marty-D
cf77e666fa Fix race conditions with added flinch effects
- Sheer Force removes secondary effects before King's Rock/Razor Fang
adds the flinch effect to moves, which Serene Grace can then double
2015-08-15 00:09:41 -04:00
Marty-D
934f9a4b4d Fix Air Balloon's interaction with confusion damage 2015-08-12 16:04:15 -04:00
Guangcong Luo
89a8acae34 Small update to Endless Battle Clause 2015-08-07 09:05:49 -04:00
Kevin Lau
0bbd3650b7 Normalize ModifySpe calculations with the other Modify-Stat events
The current implementation of ModifyAtk, ModifyDef, etc. is to pass the
actual stat into the event, have event handlers run battle.chainModify(),
ModifySpe passes in a modifier variable, calls battle.chain(), and then
ends with battle.modify() using the modifier variable. The way chainModify
is implemented within the event system also means that it chains together
modifiers in the same manner and finishes with battle.modify(), meaning
that there is no need for ModifySpe to use battle.chain() and
battle.modify() manually.

This also fixes the effect of BattlePokemon#getStat on stats other than
speed.
2015-07-24 12:19:42 -07:00
Guangcong Luo
5d3cd8263c More updates to Endless Battle Clause
- Gen 1 PP overflow makes a Pokemon stale
- Staleness warnings now specify the staleness source
- Half-staleness also warns, if another pokemon is already stale

Warning on half-staleness helps remind people who seem to think
they've beaten Endless Battle Clause after 5-ish turns, when it
takes 10-20 turns for some staleness verdics, especially if
there's a lot of switching going on.
2015-07-24 03:33:28 -04:00
Guangcong Luo
c8c03ad92d Update Endless Battle Clause
The full description is in the comments of the Endless Battle
Clause entry in rulesets.js.

This update fixes a lot of the issues with yesterday's version.

Also included: A minor refactor of deductPP, which did not need
a success variable.
2015-07-22 03:41:43 -04:00
Marty-D
d7ead997a5 Fix Ditto Transformed into Ditto gaining Metal/Quick Powder boosts 2015-07-17 21:57:09 -04:00