Commit Graph

415 Commits

Author SHA1 Message Date
The Immortal
f8c801e76e Fix Metronome mechanics 2020-03-26 21:05:44 +04:00
Kris Johnson
994fc60aed
Rename Template to Species (#6478) 2020-03-25 23:29:27 -07:00
Marty-D
5ea76bd947
Descriptions: Update Gen 8 items 2020-03-22 16:32:15 -04:00
Marty-D
94a9734817
Items: Update TR sprite numbers 2020-03-08 17:43:26 -04:00
Kris Johnson
cc681692dd
Properly implement Sinistea and Polteageist formes (#6429) 2020-03-06 22:35:19 -08:00
The Immortal
563323f4c1 Fix Lum Berry activation 2020-02-22 05:39:37 +04:00
The Immortal
5cf40b239d Mail does not exist in Sw/Sh
It doesn't work either if you try to hack it.
2020-02-17 16:38:20 +04:00
Guangcong Luo
652c7163cf
Refactor queue to new BattleQueue class (#6358)
Previously, battle queue stuff was just strewn around `battle.ts`.
This gives it a new home: `battle-queue.ts`.

This was intended to make `battle.ts` slightly more tractable, although
the difference is so small that maybe I shouldn't bother. Oh, well,
every little bit helps.
2020-02-12 16:20:17 -08:00
Guangcong Luo
1914a37aba Fix Eject Pack to activate for self-boosting 2020-02-11 11:16:46 -08:00
Guangcong Luo
e464ccd0ad Improve Present Kee Berry workaround 2020-02-08 08:14:08 -08:00
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
The Immortal
e67a55d7ad Macho Brace is available in Sw/Sh 2020-02-07 14:21:36 +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
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
The Immortal
8f7df1e5c4 Set Genesect drives as past items 2020-01-18 14:17:12 +04:00
Kris Johnson
d20a46d4c7 Update item sprite numbers (#6276) 2020-01-13 09:23:09 -05:00
Kris Johnson
a97360a966 Slowpoke-Galar can use Eviolite (#6274) 2020-01-10 02:50:12 +04:00
The Immortal
6b2fb44abb Set unavailable fossils as "Past" items 2020-01-07 04:17:29 +04:00
Jacob Ellis Duncan
766dcbc3b4 Update item descriptions (#6211) 2020-01-06 12:00:20 -05:00
The Immortal
1b7c47b6f4 Fix HP healing berries 2020-01-04 02:54:50 +04:00
urkerab
3db3f29a72 Fix fractional priority for Full Incense and Lagging Tail (#6230) 2019-12-30 10:08:22 +09:00
urkerab
7152b42daf Calculate fractional priority once per turn (#6224) 2019-12-27 12:42:34 +09:00
Guangcong Luo
223e2af9fa Fix Custap Berry, Quick Claw, Stuff Cheeks
- Prevent Custap Berry and Quick Claw from activating on switches

- Stuff Cheeks now bypasses Unnerve and Magic Room
2019-12-25 09:42:39 +09:00
Guangcong Luo
a062a6c96e Fix Custap Berry 2019-12-12 18:23:52 +09:00
Guangcong Luo
d91bad3365 Fix Quick Claw 2019-12-12 17:09:17 +09:00
Guangcong Luo
3b86164a77 Fix Quick Claw 2019-12-11 18:12:54 +09:00
Marty-D
1b3e577753 Ensure the Room Service holder is the source of the stat change
This matters for Clear Body, etc.
2019-12-11 02:29:48 +04:00
Guangcong Luo
9b943fb62f Fix Dynamax stat handling
We now track `baseMaxhp`, the pre-Dynamax max HP. We also have a new
function `getUndynamaxedHP` for use by moves that use it (famously,
Endeavor).

- `baseStoredStats` is unused outside of the mouseover stats display.
  I updated its implementation to reflect this.

- Power Construct doesn't have a defined behavior during Dynamax. I
  ended up implementing an approximation of what it should probably do.

- Endeavor, Pain Split, Super Fang, and Nature's Madness now work on
  undynamaxed HP.

- Moves that deal or heal percentage damage now do it based on
  undynamaxed max HP, other than G-Max Finale.

Fixes #6131

Fixes #6087
2019-12-04 09:25:46 +09:00
Kris Johnson
1fe47eabdd Add Utility Umbrella (#6120) 2019-12-01 01:24:25 +13:00
HoeenHero
c0c9bca26b Mark various berries as unreleased in Gen 8 2019-11-26 12:55:49 -05:00
supermii2
cf10a81985 Fix Ice Stone description (#6075)
Description reflects that it can evolve Galarian Darumaka into Galarian Darmanitan
2019-11-26 20:50:25 +13: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
PartMan
d9cd828c0a Add Stick / Rename Vice Grip (#6046) 2019-11-24 12:00:42 +13:00
The Immortal
bb370216e0 Set Gems to Past items 2019-11-20 23:23:05 +04:00
The Immortal
ee5103dbf1 Set Blue/Red Orbs to Past items 2019-11-19 21:47:43 +04:00
Guangcong Luo
6de97db219 TypeScript event handler types 2019-11-18 07:02:32 +13:00
Guangcong Luo
cc84d1c4f1 Fix some Z crystals being allowed 2019-11-17 07:26:10 +13:00
Guangcong Luo
5b6771091d Choice items don't boost stats during Dynamax 2019-11-17 07:26:09 +13:00
Guangcong Luo
04799f5c1e Restrict Z-crystals and mega stones to Gen 7 2019-11-16 20:00:53 +13:00
420Blazeitt
84dc57aafe Add Fossils (#5953) 2019-11-16 06:31:47 +04:00
The Immortal
1a90dc71db Fix Rusted Shield/Sword 2019-11-16 01:52:32 +04:00
urkerab
e7aee8d9cc Some fixes to Gen 7 formats data 2019-11-15 22:02:24 +13:00
420Blazeitt
723e256aec Add Gen 8 Items 2019-11-15 22:02:15 +13:00
Guangcong Luo
7a023746ba
Refactor battle.dex out of battle (#5851)
In most other similar systems, like TeamValidator, we use `thing.dex` instead of having it extend `ModdedDex`. Battle has always extended `ModdedDex`, though. This changes Battle to match the others.

This should fix an issue with `Battle.data` not being cached.

This also frees up Battle to extend ObjectReadWriteStream<string> in a future update.
2019-10-06 07:38:08 +11:00
urkerab
948257cce7 Change weight units to hectograms (#5765) 2019-10-03 14:00:16 +10:00
Kirk Scheibelhut
57dd3b527f Add isPokeball field to Items data (#5644) 2019-07-22 16:20:09 -05:00
Kirk Scheibelhut
a0734bde6f Redo Endless Battle Clause with a new specification (#5472) 2019-05-07 11:18:06 +09:30
Marty-D
75b92ab1dd
Fix Eject Button interaction with U-turn/Volt Switch 2019-04-23 16:50:05 -04:00
Marty-D
80619d62a5
Prevent multiple Eject Button activations from a single attack 2019-04-19 11:38:36 -04:00