Commit Graph

22 Commits

Author SHA1 Message Date
Guangcong Luo
78439b4a02
Update to ESLint 9 (#10926)
ESLint has a whole new config format, so I figure it's a good time to
make the config system saner.

- First, we no longer have separate eslint-no-types configs. Lint
  performance shouldn't be enough of a problem to justify the
  relevant maintenance complexity.

- Second, our base config should work out-of-the-box now. `npx eslint`
  will work as expected, without any CLI flags. You should still use
  `npm run lint` which adds the `--cached` flag for performance.

- Third, whatever updates I did fixed style linting, which apparently
  has been bugged for quite some time, considering all the obvious
  mixed-tabs-and-spaces issues I found in the upgrade.

Also here are some changes to our style rules. In particular:

- Curly brackets (for objects etc) now have spaces inside them. Sorry
  for the huge change. ESLint doesn't support our old style, and most
  projects use Prettier style, so we might as well match them in this way.
  See https://github.com/eslint-stylistic/eslint-stylistic/issues/415

- String + number concatenation is no longer allowed. We now
  consistently use template strings for this.
2025-02-25 20:03:46 -08:00
pyuk-bot
7bb2fd1869
Overhaul 'SwitchIn' event for more accurate effect resolution order (#10766) 2025-01-28 16:51:17 -06:00
Leonard Craft III
27557e5fdc
Convert noSketch to move flag (#10407) 2024-07-14 23:45:10 -05:00
Guangcong Luo
88be8d7b3c
Refactor types for Lowercase<string> (#10377)
TypeScript 4.8+ supports Lowercase for lowercase strings, which isn't
exactly what ID is, but can be used to type IDs in object keys and data
entries that previously required string. I'm calling it IDEntry in places
where it should be an ID but TypeScript doesn't support that.

Very conveniently, no additional casts will be needed when using ID
where IDEntry is expected.

It's caught at least a few bugs, which is also why I'm PRing: I didn't
write the code for the bugs it found, and don't know if it's the right
way to fix them.

This ballooned into several other type refactors.
2024-07-01 15:57:14 -07:00
Leonard Craft III
9f743177e2
Separate Ally Switch from standard protection counters (#10171) 2024-02-19 22:25:55 -06:00
Leonard Craft III
553e577205
Fix interaction of Court Change, Sticky Web, and Defiant or Competitive (#10131) 2024-01-30 14:32:57 -06:00
Karthik
73041e4137
Refactor noMetronome lists to metronome flag (#10110) 2024-01-13 14:00:19 -06:00
Guangcong Luo
3c51f8aa1f
Refactor BestOfGame (#10026)
This replaces some pretty jank code with much cleaner code.
Anything that would be more cleanly implemented by iterating the
players array is now done by iterating the players array.

Some instances of p1/p2 are lying around but we should slowly deprecate
them.
2024-01-07 01:45:23 -08:00
Kris Johnson
756a3f473c Mark various moves as unobtainable in Gen 9 2023-12-17 10:51:47 -07:00
Kris Johnson
e17923486f Gen 8: Fix move legality 2023-12-17 00:41:15 -07:00
Marty-D
cd284bcc77
Fix Psycho Shift in past gens 2023-12-16 10:18:22 -05:00
Kris Johnson
a0f10ffa51
Add DLC2 data (#9963)
* DLC2 returning Pokemon

* Returning legendaries too

* Partially add Raging Bolt and Iron Crown (#10)

* Add remaining Pre-DLC2 event data

* Fix tests

* Last event before DLC + split learnset files

* Learnsets + secret returning pokemon

* Some DLC 2 stuff (#12)

* Add New Mons

* Add Electro Shot

* Give Dipplin Dex Evo

* Update data/moves.ts

---------

Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>

* More tweaks

* formats

* Revealed moves (#11)

* Add Hard Press

* Add Psychic Noise

* Add Upper Hand

* Apply suggestions from code review

---------

Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>

* more things

* Fix typo

* a lot of other things

* MOVES! kinda

* b

* fickle beam confirmed chance

* Evo Item Undexit + Metal Alloy + Move Fixes (#19)

* Update move data

* Update Item Data

* Apply suggestions from code review

---------

Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>

* Add message for Fickle Beam BP double (#18)

* Add some tests and implement Tera Shell (#15)

* add some tests and draft of tera shell

* add text

* .

* add improvements from feedback, change behavior of terashell

* use AfterMove instead of AfterMoveSecondary

* add confirmation to multi-hit interaction

* improve based on feedback and general cleanup

* Apply suggestions from code review

---------

Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>

* Add Tera Shift and Teraform Zero (#16)

* Add Tera Shift and Teraform Zero

* Add short descriptions

* fixes

* More move changes

* Update unSketchable moves

List from Anubis

* more move things

* oops

* Implement new Neutralizing Gas/Paradox ability interaction (#17)

* Implement new Neutralizing Gas/Paradox ability interaction

* add test

* revert in dlc

* ok

* Update pastgens for Sketch (#20)

* Implement Stellar type (#13)

* Implement Stellar type

* stuff from research

* pain

* add tests for Dragon Cheer (#22)

Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>

* Update move flags (#23)

* Fix flags for new moves

* update old moves

* remove sparkling aria changes

* update metronome description

* update other move descriptions

* more formatz stuff

* Add Poison Puppeteer (#24)

* Add Poison Puppeteer

* i'm bad

* still bad

* Fix build

* oops

* Update data/moves.ts

Co-authored-by: Marty-D <Marty-D@users.noreply.github.com>

* Update data/moves.ts

Co-authored-by: Marty-D <Marty-D@users.noreply.github.com>

* Update data/items.ts

Co-authored-by: Marty-D <Marty-D@users.noreply.github.com>

* Update data/moves.ts

Co-authored-by: Marty-D <Marty-D@users.noreply.github.com>

* Fix Terapagos dex entries (#25)

* Update data/pokedex.ts

Co-authored-by: Marty-D <Marty-D@users.noreply.github.com>

* Update data/pokedex.ts

Co-authored-by: Marty-D <Marty-D@users.noreply.github.com>

* Update data/pokedex.ts

Co-authored-by: Marty-D <Marty-D@users.noreply.github.com>

* FIX BUILD

* Fix Regulation E formats (#26)

* Fix Regulation E formats

* add move bans

* nevermind

* Add Regulation F formats (#27)

* Fix interaction between Adaptability and Tera Stellar (#28)

* reg f bo3 ladder

* Update config/formats.ts

Co-authored-by: Leonard Craft III <leonardcraft64@gmail.com>

---------

Co-authored-by: Smudge <smudgerox@users.noreply.github.com>
Co-authored-by: Leonard Craft III <leonardcraft64@gmail.com>
Co-authored-by: Karthik <32044378+Karthik99999@users.noreply.github.com>
Co-authored-by: tofa <79044321+im-tofa@users.noreply.github.com>
Co-authored-by: Marty-D <Marty-D@users.noreply.github.com>
2023-12-15 21:35:01 -07:00
Kris Johnson
6bb3879e3a
Add Teal Mask DLC data (#9762)
Co-authored-by: Karthik99999 <bandagondak0217@gmail.com>
Co-authored-by: smudgerox <smudgerox@users.noreply.github.com>
Co-authored-by: Leonard Craft III <leonardcraft64@gmail.com>
Co-authored-by: Marty-D <Marty-D@users.noreply.github.com>
Co-authored-by: Karthik <32044378+Karthik99999@users.noreply.github.com>
2023-09-13 21:08:01 -04:00
Leonard Craft III
156a39405f
Refactor some move lists to move flags (#9396) 2023-03-18 22:21:00 -05:00
pyuk-bot
a5a9d96ef1
Remove Fly animation target leak in Gen 9 (#9327) 2023-01-14 19:06:59 -06:00
Leonard Craft III
fa56e1658f
Gen IX: Really fix Curse targeting behavior (#9218) 2022-12-27 13:43:07 -05:00
Leonard Craft III
043092bcff Revert "Gen IX: Fix Curse targeting behavior (#9205)"
This reverts commit dd529ec093.
2022-12-22 16:01:12 -06:00
Leonard Craft III
dd529ec093
Gen IX: Fix Curse targeting behavior (#9205) 2022-12-22 15:23:18 -06:00
Karthik
fd1fa2b53d
Properly remove Charge after using an Electric move (#9167) 2022-12-12 22:39:27 -06:00
Karthik
98544fe5f9
Fix Charge/Wind Abilities (#9113) 2022-12-04 12:53:18 -05:00
pyuk-bot
1a6668b3b0
Fix unobtainable move validation (#9096)
* Fix validation of moves unobtainable in Gen 9

* remove hyphen

* Update data/rulesets.ts

* Shorten unobtainable move rule name

Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
2022-11-30 23:08:08 -07:00
Kris Johnson
d50c8c249b
Add Gen 9 (#8997) 2022-11-17 20:46:29 -05:00