Commit Graph

36 Commits

Author SHA1 Message Date
Guangcong Luo
55cbc52bba Fix bugs with secondary/ability order
Fixes #6346

The `AfterDamage` event has been replaced with `DamagingHit`, which
which happens for damaging moves after secondaries.

The `AfterHit` event has also been moved after `DamagingHit`, to make
sure Knock Off still procs after Rocky Helmet.

`AfterHit` is no longer a valid event on `secondary` and `self` blocks,
because it's meaningless in those blocks, anyway. All `self.onAfterHit`
and `secondary.onAfterHit` handlers have been moved to `onHit`, which
should have the same timing in practice.
2020-02-08 08:07:39 -08:00
Kris Johnson
9f08d93244
Toxtricity-Low-Key can Gigantamax (#6343) 2020-02-07 03:54:07 +04:00
Kris Johnson
d3e266cddd
Fix crash with TRs (#6330) 2020-02-03 00:25:49 -08:00
Kris Johnson
05efe2e011
Add TRs (#6317) 2020-02-02 23:19:45 -08:00
The Immortal
d9327d945a Simplify max moves check in Copycat 2020-02-02 22:30:04 +04:00
The Immortal
6db191a0a8 Implement Copycat interaction with Max moves 2020-02-02 21:29:55 +04:00
QuiteQuiet
211cefb262
Fix Healing Wish for Gen 8 (#6296)
- Healing Wish is not consumed if the Pokemon switching in
  has full health and no status condition.
- Being statused with full health will consume the Healing Wish.
- It does not trigger on damage after switching in.
- The effect will be consumed if an injured Pokemon is swapped
  into a slot with an active Healing Wish by Ally Switch.
2020-02-01 22:04:21 -08:00
Kris Johnson
4c5640d051
Add February 2020 OMotM and RoA Spotlight (#6323) 2020-02-01 15:10:59 +04:00
The Immortal
68e0bcb75f Refactor single-use items
This adds a `boosts` property to items that runs in `useItem`.
This allows it to be added to `datasearch` or similar plugins.
The item activation messages are now as accurate as in-game.
The Gem activation message is also consolidated in `useItem`.
2020-01-28 13:21:23 +04:00
Guangcong Luo
e6f53a7ad2 Implement smart target tracking
(Stalwart, Propeller Tail, Snipe Shot behavior.)
2020-01-18 15:43:33 -07:00
urkerab
b589745a25 Typescript move.target (#6260) 2020-01-11 09:10:10 -05:00
The Immortal
491e0575e0 Random Battle updates 2020-01-07 22:07:09 +04:00
urkerab
7152b42daf Calculate fractional priority once per turn (#6224) 2019-12-27 12:42:34 +09:00
The Immortal
f62ff19e8a Improve validation for unobtainable Pokemon
This merges the Glitch and Pokestar tags into a new Unobtainable tag that defines Pokemon that are only obtainable through hacking (such as Floette-Eternal and Missingno.). These Pokemon are legal in Hackmons of their specific generation only. Custom is used in future gens instead of Past because of National Dex legality.
2019-12-25 00:35:39 +04:00
Kris Johnson
f1ad861659 Fix Necrozma-Ultra's inheritance (#6176) 2019-12-12 00:13:14 +04:00
420Blazeitt
143ea606fd Fix type-changing moves & abilities while Dynamaxed (#6080) 2019-12-11 03:10:38 +09:00
Kris Johnson
89002124b3 Change inheritsLearnsetFrom to inheritsFrom and fix Necrozma-Ultra's inheritance (#6168) 2019-12-10 08:03:49 +04:00
HoeenHero
fe6ee1339f Sort battle actions by order instead of priority (#6143)
This fixes the issues with priority moves in gen 8.
2019-12-04 12:56:50 +09:00
Kris Johnson
953531cb6f Add inheritsLearnsetFrom property (#6133) 2019-12-02 21:15:48 +09:00
Guangcong Luo
d550bb64d8 Support past-gen-only tracking in minPastGen
This adds new properties `isUnreleased: 'Past'` and
`unreleasedHidden: 'Past'`, which mark a Pokémon or Hidden Ability as
released in past gens, but not in the current gen. This allows them
to be banned in present-gen-only formats, but not in past-gen-transfer
formats.
2019-12-01 20:24:52 +13:00
HoeenHero
b2625ed70c Remove formeLetters
We don't use these at all currently and they are starting
to overlap. As discussed at the start of Gen 8 development
were removing them now.
2019-11-26 13:26:17 -05:00
Guangcong Luo
5364c63e23 Introduce item.itemUser
`item.itemUser` replaces `item.zMoveUser`, and is a new field
representing a list of possible users of an item, for items that are
restricted to specific species.

`item.zMoveUser` is a base forme for items that affect every forme, and
a forme name otherwise (forme name is currently only used for
`forcedForme` uses).

Arceus is a weird case. Both generic Z crystals and Plates, while
having unique effects on Arceus, also have effects on other Pokémon.
For this reason, Arceus isn't listed as an `itemUser` of either of
these item types - use-cases that want this should also check
`item.forcedForme`.

This is mostly intended to be useful to move-searching and custom
rules (like NatDex, which will only allow past-gen items associated
with removed species).
2019-11-25 15:26:36 +13:00
Kris Johnson
8370c488ce Fix the evolution method of new Pokemon (#5982) 2019-11-20 21:44:16 +13:00
420Blazeitt
9ed1dec6bf Fix Max Move effects not activating against substitute (#5997) 2019-11-19 17:17:52 +13:00
The Immortal
e7cece5282 Add minSourceGen field to Formats 2019-11-19 03:12:22 +04:00
The Immortal
7a3cd9d078 Restrict SwSh metagames to Galar learnsets 2019-11-18 00:22:36 +04:00
Guangcong Luo
6de97db219 TypeScript event handler types 2019-11-18 07:02:32 +13:00
Guangcong Luo
2601450517 Fix Ice Face 2019-11-18 06:23:24 +13:00
Guangcong Luo
4fc49bc7f9 Fix Body Press
Fixes #5975

Fixes #5979
2019-11-17 18:47:16 +13:00
Guangcong Luo
0bb2e58efd Fix Dynamax move base power
Dynamax moves now have the correct base power, and now correctly only
deal 25% usual damage against Protect.
2019-11-17 06:32:17 +13:00
HoeenHero
9ecbcabee9
Dynamaxing (#5946) 2019-11-15 21:33:10 -05:00
Kris Johnson
a19ad51a20 Fix one part of the build (#5945) 2019-11-16 00:08:28 +13:00
Kris Johnson
46ad0bccd7 Add Gen 8 Pokemon 2019-11-15 22:01:36 +13:00
HoeenHero
4ced391d6b SSB: Apply various updates 2019-10-30 10:39:20 -04:00
urkerab
bae434e606 Add a single event for a move's own immunity to a specific target (#5904) 2019-10-24 11:00:28 +10:30
Waleed Hassan
c88dfba1d1 Server: Reorganize TypeScript globals (#5903) 2019-10-21 14:39:59 +10:30