Commit Graph

652 Commits

Author SHA1 Message Date
Kirk Scheibelhut
df3d9b91ef Battle toJSON/fromJSON (#5427) 2019-04-30 14:48:27 +12:00
Slayer95
cd82475d06 Fix misspecified event handler priorities (#5445) 2019-04-15 18:03:32 -04:00
Marty-D
ad4f80ee67 Fix Anticipation interaction with Hidden Power 2019-04-11 14:01:23 -04:00
The Immortal
e1c389a182 Random Battle updates 2019-04-08 16:39:19 +04:00
Kirk Scheibelhut
0efd71dfef Move Data.ActiveMove methods to Pokemon (#5416)
See #5415 for context - having these methods is unsafe and leads
to crashes because not all ActiveMoves are created through the
Data.ActiveMove constructor. Instead of Pokemon, these could
alternatively be static methods on ActiveMove (or the ActiveMove
class could be completely abolished and reverted back to an
interface), but #5415 will deal with ActiveMove long term, this just
fixes the crashes.
2019-04-06 13:14:50 +08:00
MacChaeger
d3f1161b62 Fix Weakness Policy and Clangorous Soulblaze in doubles (#5389) 2019-04-04 18:51:27 +08:00
The Immortal
a864d38240 Random Battle updates 2019-04-01 19:05:08 +04:00
Slayer95
628f32e8fb Stricter type definitions for dex data (#5375)
BattleStatuses switched to PureEffectData
2019-03-30 22:31:04 +08:00
The Immortal
8d56dad32b Random Battle updates 2019-03-28 21:06:55 +04:00
Ivo Julca
ac4b94876b Sim: Refactor to use Battle#getAllPokemon() and Battle#getAllActive() 2019-03-26 23:18:19 -05:00
Kirk Scheibelhut
9f5a727ad1 Pull Field out of Battle (#5333) 2019-03-23 02:52:12 +09:00
Kirk Scheibelhut
03b2c92cb1 Make isNonstandard specify reason for non-standardness (#5330) 2019-03-22 01:49:22 +09:00
Kirk Scheibelhut
a8903d2563 Cleanup stat naming and types (storedStats, StatNameExceptHP) (#5274) 2019-03-09 09:53:11 -06:00
The Immortal
7653384d20 Random Battle updates
- Only give Porygon-Z Z-Conversion under the right circumstances
- Slightly reduce the rating of Download so Porygon gets Adaptability a bit more
- Improve Haxorus' movepool
- Remove unviable Genesect sets
- Allow U-turn as the only STAB on Genesect
- Improve Magearna's movepool (+Fairium Z)
- Don't reject Flash Cannon with Special setup
- Give Fairies STAB when they need it
- Set Shift Gear as a Speed setup move
- Change the Life Orb bulk requirement to match Focus Sash
- Reject Trick with Speed setup
2019-03-08 17:27:44 +04:00
urkerab
9ebaa6877b Fix Protean and Color Change (#5233) 2019-03-03 04:40:35 -06:00
Kris Johnson
c2e21d6fea Fix crash in Anticipation (#5232)
A battle has crashed: TypeError: Cannot read property 'fainted' of null
at Battle.onStart (/home/ps/showdown/data/abilities.js:150:16)
2019-03-03 03:28:03 -06:00
The Immortal
59c4965dfa Random Battle improvements 2019-02-24 06:00:24 +04:00
Guangcong Luo
b498bb222c Require object literal method shorthand 2019-02-11 18:14:09 -06:00
Guangcong Luo
8d57bd1b8c Remove useless param from pokemon.transformInto
Introduced in 743c85127c
2019-02-01 15:10:46 -06:00
Marty-D
891f4d202a
Update Emergency Exit and Wimp out descriptions 2019-01-16 13:56:02 -05:00
Marty-D
a0a81519ca Update Zen Mode 2019-01-16 13:42:18 -05:00
Kevin Lau
c579e4ae85 Random Battle: Lower Keen Eye rating (#5098)
Fixes Drapion, who has 3 different moves with a rating of 1. Keen Eye is
less useful than Battle Armor or Sniper because of a lack of accuracy
reduction moves in random battle, so this ensures that it is not chosen.
2019-01-13 22:16:19 +04:00
Russell Jones
09118c0937 OHKO moves are really only 150 power to Forewarn (#5058)
Also the 1-power CFZs count as 80 to Forewarn, not that that's a particularly likely interaction to come up anywhere.
2019-01-02 01:35:14 -06:00
plumberjack
4e2e4263d9 Clarifiy Unnerve's description (#5028) 2018-12-15 10:38:12 -05:00
Guangcong Luo
877c9feeeb Fix onEffectiveness event signature
I fixed `onAfterSubDamage` in the previous commit, but this one I left
for later.
2018-12-08 22:52:59 -06:00
Guangcong Luo
3a8add5c4b Remove [msg] parameter of -immune
(It's unnecessary, being the default message for it.)
2018-11-10 12:31:21 -06:00
Alvin Ho
9d676aae71 Fix Mummy and Parental Bond Interaction (#4890)
Problem: Parental Bond when changed to Mummy midstrike would cause the second move to miss the .25 base power modification
Added Parental Bond check in Mummy to maintain the power modification
2018-10-12 21:20:46 -05:00
Guangcong Luo
ecb27edb4d
Introduce ActiveMove; make some types read-only (#4902)
The types Template, Move, Ability, and Item are now read-only. This
should guard against accidental writing to types that shouldn't be
written to.

A new type, ActiveMove, has been introduced. Like it sounds, it's
used for moves that are currently actively being used. A lot of
attributes that are only relevant to active moves, such as
`hasBounced`, are now only available on ActiveMove, not on Move.
ActiveMoves are mutable, unlike Moves.

getMoveCopy has been renamed getActiveMove, to better reflect its
role. `isCopy` has been deprecated, and distinguishing Moves from
ActiveMoves is now done by `typeof move.hit === 'number'` where
necessary.

ActiveMoves now internally track which hit of a multihit move
they're on, in move.hit, so move.hit doesn't need to be manually
incremented by Triple Kick and Parental Bond anymore.

move.hasParentalBond has been replaced by a more generic
move.multihitType.
2018-10-10 16:04:35 -05:00
Alvin Ho
7d0275b453 Fix Flower Veil interaction with self-inflicted status and Yawn (#4889) 2018-10-07 21:48:30 -04:00
Quinton Lee
94016f6218 Update Typescript to 3.1 (#4879) 2018-10-05 04:02:54 -05:00
The Immortal
fe2097dd82 Reduce Emergency Exit's rating 2018-09-18 22:28:24 +04:00
Marty-D
952ccb2d80 Correct Soul-Heart activation order 2018-09-13 11:34:30 -04:00
Marty-D
21cf8fbab0 Descriptions: Change "Ability [name]" to "[name] Ability" 2018-08-25 12:56:23 -04:00
Guangcong Luo
7b42d55a97
Clarify Synchronize hack 2018-08-14 12:50:40 +09:00
urkerab
52a214e7b9 Synchronize should trigger activations of other Abilities again (#4808) 2018-08-12 21:15:26 -04:00
Marty-D
c944f01537 Fix Parental Bond 2018-08-07 17:06:27 -04:00
MacChaeger
82c792f82c Update to TypeScript 3.0.1 (#4710) 2018-08-07 03:27:28 +09:00
asgdf
6e7cec1c83 Send enditem message on Pickpocket steal (#4752) 2018-07-13 18:28:30 +09:00
urkerab
89e33bc649 Fix Bestow, Covet, Symbiosis and Thief with a required item (#4715) 2018-07-02 17:36:37 -04:00
Marty-D
9109f110bc Fix Sheer Force interaction with Clangorous Soulblaze 2018-06-24 09:38:56 -04:00
MacChaeger
08ba5bc831 Make formeChange handle relevant messages and ability changes (#4654) 2018-05-23 19:55:05 -04:00
Marty-D
8ae3399f00
Improve Persistent descriptions 2018-05-23 01:16:14 +00:00
MacChaeger
a4a3d31b7c Properly support Pokemon with no ability (#4678) 2018-05-20 22:13:24 -05:00
Marty-D
17f6292b61
Improve Truant check 2018-05-18 03:39:31 +00:00
Marty-D
2ab375f3cc Implement Truant correctly 2018-05-17 20:31:19 -04:00
The Immortal
016a908358 Random Battle updates 2018-05-16 04:03:14 +08:00
SkyPhoenix (FlareonBlitz)
14d19eb991 Update Mummy description (#4626) 2018-04-26 16:31:11 -04:00
Marty-D
7ea4f499b9
Fix Neuroforce 2018-04-22 16:23:44 +00:00
Marty-D
ce38fe5c03 Fix Auras boosting only one hit of a spread move 2018-04-05 10:12:32 -04:00
MacChaeger
054c545c05 Fix Prankster interaction with bounced/encored moves (#4533) 2018-04-01 22:23:43 -04:00