Commit Graph

102 Commits

Author SHA1 Message Date
urkerab
80d652d59b Sturdy should trigger before Focus Sash but after False Swipe 2021-01-05 16:58:03 +00:00
ACakeWearingAHat
4fda00e8ac
Update Doubles/Gen 2 Random Battle (#7808) 2020-12-15 11:52:47 +04:00
Leonard Craft III
12da66fb21
Correct Protean interactions & Gravity-blocked Status Z-Moves (#7729) 2020-11-30 16:30:51 -05:00
ACakeWearingAHat
1aafb31a6d
Update Gen 2/Gen 8 Doubles Random Battle (#7693) 2020-11-15 15:02:07 +04:00
ACakeWearingAHat
155cf001f5
Gen 2 Random Battle improvements (#7651) 2020-11-06 17:54:28 +04:00
The Immortal
2bc4a51a50 Random Battle improvements 2020-11-03 19:43:57 +04:00
The Immortal
c15663508b Gen 2 Random: Fix typo 2020-11-02 02:40:34 +04:00
The Immortal
a36bda12e7 Gen 2 Random: Fix Rest + Sleep Talk 2020-11-02 02:29:01 +04:00
ACakeWearingAHat
3037781e1d
Revamp Gen 2 Random Battle (#7610) 2020-11-02 01:13:11 +04:00
May Evans
e102416793
Ban Japanese Gen 1 Events in Int Formats: Part 2 (#7581)
Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2020-10-26 06:00:35 -07:00
Guangcong Luo
9d87616176
Add more style linting rules (#7537)
* Lint arrow-body-style

* Lint prefer-object-spread

Object spread is faster _and_ more readable.

This also fixes a few unnecessary object clones.

* Enable no-parameter-properties

This isn't currently used, but this makes clear that it shouldn't be.

* Refactor more Promises to async/await

* Remove unnecessary code from getDataMoveHTML etc

* Lint prefer-string-starts-ends-with

* Stop using no-undef

According to the typescript-eslint FAQ, this is redundant with
TypeScript, and they're not wrong. This will save us from needing to
specify globals in two different places which will be nice.
2020-10-19 02:42:28 -07:00
PartMan
52f67edd0d
Fix typo (#7491)
Obligatory Hacktoberfest typofix.
2020-10-07 23:36:16 -07:00
lotuspirate
7604acefd8
Update GSC NU Pokémon (#7405)
Changing tier for NU-viable Pokemon to NU from NFE/LC. Based loosely on GSC NU Viability Ranking.
2020-09-22 07:25:30 +04:00
urkerab
bcc6fddff5
Remove duplicate fail message from Encore (#7339) 2020-09-09 04:32:28 +04:00
Strahm, Jeffrey S.(S&T-Student)
188426490b Rename FormatsData to FormatData
(The name FormatsData is inconsistent with how we name other things;
especially since it's supposed to be data for a single format. It was
probably originally a typo. -Zarel)
2020-09-07 19:35:14 -07:00
Guangcong Luo
ea8f52ce97
Move descriptions to data/text/ files (#7036)
This adds some new `data/text/` files, which are the new home for
item/move/ability descriptions, as well as in-game messages, in one
place for ease of translation.
2020-09-06 22:00:11 -07:00
Kris Johnson
8656d633ac
Format volatiles consistently (#7314) 2020-09-05 08:12:24 -07:00
Kris Johnson
324ad0425a
Fix various GSC/ADV mechanics (#7247) 2020-08-22 01:29:41 -07:00
Guangcong Luo
4d09f7acde Rename more instances of Effect to Condition 2020-07-26 11:26:23 -07:00
Guangcong Luo
2f805c93a2
Remove "Battle" prefix from data exports (#7039)
`BattlePokedex` is now `Pokedex`, `BattleItems` is now `Items`, etc.

I also renamed `Movedex` to `Moves` and `Statuses` to `Conditions`.

`TypeChart` isn't `Types` yet, because unlike the others, it's not
indexed by ID. That should probably be fixed one day.
2020-07-24 12:42:26 -07:00
Annika
2037764dd4
Porygon doesn't learn Defense Curl in Gen 2 (#6976) 2020-07-07 17:25:07 -04:00
urkerab
17e4cb49a4
Adjust fractional priority for latest research (#6928) 2020-06-29 12:09:10 -07:00
Mia
6839a1f4db
Add a library for utility functions (#6817) 2020-06-09 22:06:43 -07:00
Kris Johnson
73a84a43ec
Fix remaining learnsets inconsistencies (#6795) 2020-06-02 21:31:48 -07:00
Leonard Craft III
3496491d4f
Fix Farfetch'd / Sirfetch'd with new apostrophe (#6721)
Also fixes Stick's behavior
2020-05-19 21:56:35 -07:00
Marty-D
339f516a2b Gen II: Fix residual damage when opponent is KOed 2020-05-06 15:41:18 -04:00
Guangcong Luo
6c1992b067 Fix Metronome blacklists 2020-05-02 00:16:55 -07:00
Guangcong Luo
e0f6453b60 Refactor data definitions
- `Modded[Effect]Data` are now correctly defined: they must either have
  `inherit: true` and be partial, or not have `inherit: true` and be a
	complete `[Effect]Data` entry

- `id` is no longer allowed; instead, it's calculated directly from
  `toID(name)`. The one exception, Hidden Power, gets a `realMove`
	property to track this (it's still used to set `.id`, though;
	TODO: really fix it properly).

- `num` is still required in `data/pokedex.ts` (dex number),
  `data/moves.ts` (move index number, for Metronome), and
	`data/items.ts` (minisprite sprite-sheet location). It's still not
	required for mod-only items and moves.

- `num` is no longer allowed for PureEffects (in `statuses.ts`) where
  it's always been meaningless.

- `color` and `heightm`, being completely flavor, are still not
  required for `pokedex.ts` in mods. They're still required in the base
	pokedex.
2020-04-30 21:39:29 -07:00
Marty-D
294a44b943 Gen II: Don't check for secondary effects if the target fainted
This includes self-boost secondaries like Metal Claw.

Thanks again, UPC!
2020-04-30 13:33:21 -04:00
Kirk Scheibelhut
edddcb5c38
Correct Self-Destruct and Explosion base power (#6630)
As confirmed by SadisticMystic, base power cannot be above 255, so
this move data is clearly incorrect and results in downstream users
of the data files such as the Smogon or PS dex or the tooltips
displaying misleading information.
2020-04-29 14:59:59 -07:00
Guangcong Luo
800d8bd8f3 Remove Dex.getForme etc
The server now uses the same approach as the client of treating
cosmetic formes as real formes, as documented in `FORMES.md`.

This eliminates the need for the `.forme` and `.speciesid` properties
of `Pokemon`.

`pokemon.id` has also been removed: useful, since it turns out half
of its uses were bugs that should have used `pokemon.species.id`.
2020-04-28 17:38:54 -07:00
Guangcong Luo
549ef7edb1 Fix MoveData interface definition
For historical reasons, move property definitions have been very blurry
across `EffectData`. Fortunately, recent refactors have made it
possible to put them all where they're supposed to be.
2020-04-25 12:57:46 -07:00
Kris Johnson
28bf388b98
Typescript data (#6553) 2020-04-23 09:16:09 -07:00
Guangcong Luo
6884c7ee81 Remove unnecessarily quoted keys in data/
(By pulling this out from the rest of the TypeScript refactor, this
should make the diffs for the TypeScript refactor more readable.)
2020-04-16 01:32:18 -07:00
urkerab
d32aa6f8d6
Properly override onFractionalPriority in past gens (#6542) 2020-04-08 15:31:39 -07:00
The Immortal
387dd7ce2d Refactor unavailable items
Items that are not available in-game are now consolidated into `isNonstandard`. 'Past' indicates that the item no longer works in the current generation. 'Unobtainable' indicates that the item works but can only be obtained through hacking.

Credit to @lusamine for testing many of these items in Sw/Sh.
2020-04-05 23:54:57 +04:00
The Immortal
a5e15818fa Fix MissingNo.'s learnset 2020-03-26 22:12:35 +04:00
Kris Johnson
ea1b028950
Rename cosmeticFormeName to forme (#6492) 2020-03-26 18:13:31 +04:00
Kris Johnson
994fc60aed
Rename Template to Species (#6478) 2020-03-25 23:29:27 -07:00
Kris Johnson
3e26318758
Refactor learnsets.js (#6466) 2020-03-18 00:59:29 -07:00
Kris Johnson
b077646808
Random Battles chat plugin: Fix various issues (#6448) 2020-03-12 12:37:10 +04:00
Kris Johnson
82a3fc7b94
Refactor [Gen 2] Random Battle (#6435) 2020-03-09 11:56:15 +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
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
45b5a22985 Gen 2 randoms: Delete invalid set 2020-02-05 23:58:30 +04:00
Kirk Scheibelhut
e44a5683c3 Add EBC to Gens 1 and 2 (#6298)
Also add test for 1000 turn termination behavior.
2020-01-22 14:13:36 -08:00
urkerab
d1a66cbe07 Simplify handling of Encore volatile (#6292) 2020-01-20 17:00:37 +04:00
Guangcong Luo
b48733cb7a Rename resolveTarget -> getRandomTarget
Should be much clearer in terms of what it's actually doing.
2020-01-18 15:43:34 -07:00
Guangcong Luo
138fccbaa8 Consolidate more rules into Standard
- `Obtainable` and `Team Preview` are now part of `Standard`

- `minSourceGen: 8` is now a part of `-Unreleased` (which is part of
  `Obtainable`) in Gen 8. Instead, it's NatDex that overrides it with
	`minSourceGen: 1`. This allows `!Standard, Standard NatDex` and
	`!Standard NatDex, Standard` to work as intended.

- Duplicate rules are now checked for (does not apply to subrules, so
  multiple inheritance is still possible)

- It is now possible to inherit `minSourceGen` from rules.
2020-01-03 23:42:48 -05:00
urkerab
5067f1fefa Fix displayed target of move-specific immunity in Gen 1 and 2 (#6244) 2020-01-01 01:44:33 +04:00