Commit Graph

111 Commits

Author SHA1 Message Date
André Bastos Dias
6938f1f807
Show the hint message for Ogerpon Terastallization only on one side (#11810)
Some checks failed
Node.js CI / build (18.x) (push) Has been cancelled
2026-03-17 23:40:12 -06:00
André Bastos Dias
f494d48434
Fix injective field position indexing (#11789) 2026-03-03 14:32:45 -07:00
TurboRx
7a55285dd1
Fix Stomping Tantrum incorrectly doubling after canceled two-turn moves (#11760)
* fix stomping tantrum not doubling when fly is canceled by smack down

* Update sim/battle-actions.ts

Co-authored-by: André Bastos Dias <80102738+andrebastosdias@users.noreply.github.com>

---------

Co-authored-by: TurboRx <TurboRx@users.noreply.github.com>
Co-authored-by: André Bastos Dias <80102738+andrebastosdias@users.noreply.github.com>
2026-02-13 09:57:20 -07:00
André Bastos Dias
08562488b0
Refactor Illusion switch out check (#11742)
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
2026-02-03 16:09:04 -07:00
André Bastos Dias
684150d9d7
Implement Mega Stones as {key: value} pairs (#11684)
* Implement Mega Stones as pairs {key: value}

* Fix Mega Evolution check

* Add constructor guards to Dex getters

* Update config/formats.ts

---------

Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
2026-01-08 14:59:22 -07:00
André Bastos Dias
ce3cff6168
Legends Z-A: Multiple fixes (#11617)
* Legends Z-A: multiple fixes

* Fix knocking Mega stones

* Revert Tatsugiri-Mega naming

* Revert "Revert Tatsugiri-Mega naming"

This reverts commit 49b97f1e06.

* Revert Tatsugiri-Mega renaming

* Renam Meowstic-Mega to Meowstic-M-Mega

* Apply suggestions from code review

* Remove type mismatch error for megaStone

---------

Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
2025-12-12 12:39:15 -07:00
Kris Johnson
30ff784f2c
Z-A: Add DLC Pokemon (#11613)
* Z-A: Add DLC Pokemon

* za ou learnsets

* zaou changes

* skip test 4 now

* dfadasas
2025-12-12 00:04:05 -07:00
Kris Johnson
f159beb578 fix things 2025-10-15 20:14:30 -06:00
Kris Johnson
051a404478 Add Legends: Z-A Pokemon and items 2025-10-15 16:46:14 -06:00
André Bastos Dias
5ead2874eb
Reset ability and item state on switch in (#11488) 2025-10-06 18:19:07 -07:00
André Bastos Dias
7eca4741ab
Fix Tera Stellar not applying <60 bp boost on first use (#11455)
Some checks failed
Node.js CI / build (18.x) (push) Has been cancelled
2025-09-21 20:47:21 -07:00
André Bastos Dias
73bf84e9b4
Fix OHKO moves in Gen 3 (#11355)
* Fix OHKO moves in Gen 3

* Fix lint
2025-08-11 14:16:09 -06:00
André Bastos Dias
0d9a9f3ef8
Fix Recycle in Gens 3-4 (#11348)
* Fix Recycle in Gens 3-4

* Revert refactor

* Add Recycle as a sourceEffect
2025-08-11 14:14:15 -06:00
André Bastos Dias
9bcca73a33
Modify HP after forme regression (#11261)
* Modify HP after forme regression

* Clip negative HP

* Change method name

* Don't reveal illusion

Should be redundant

* Move message timing

* Fix dynamax

* Clip HP for possible OMs

* Check using baseMaxHp

* Conditions.........

* Use ternary operation

* Fix comment
2025-07-11 01:32:43 -06:00
André Bastos Dias
dc7294ed6e
Remove unused code (#11215)
Some checks failed
Node.js CI / build (18.x) (push) Has been cancelled
* Remove unused Move#negateSecondary
* Remove unused 'SubDamage' event
* Remove unused Move#pressureTarget
* Partially remove unused Move#spreadModifier
2025-06-22 08:21:19 -07:00
André Bastos Dias
6513f4b18a
Activate Wonder Guard if the target is immune (#11130)
* Activate Wonder Guard if the target is immune

* Lint

* Correctly check for immunities

* Refactor runImmunity

* Change all move.type to move

For example, this fixes Thousand Arrows vs Air Ballon Terapagos. Tera Shell was not activating.

* Remove unnecessary cast
2025-05-31 01:28:46 -06:00
André Bastos Dias
a7f7e9049c
Send detailschange after forme regression (#11113) 2025-05-16 10:26:36 -07:00
André Bastos Dias
d25aba9aff
Fix: Terastallize Ogerpon and Terapagos with different Tera types (#10814) 2025-05-13 14:44:46 -07:00
André Bastos Dias
6b3d0eefbd
Fix Sparkling Aria's interaction with Shield Dust (#10882)
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
2025-04-23 16:57:31 -07:00
Guangcong Luo
d0e3531e8b Fix burned Explosion damage
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
2025-03-14 22:45:59 -07:00
André Bastos Dias
f2736e1a3f
Fix Psychic Noise's interaction with Life Dew (#10892)
* Fix Psychic Noise's interaction with Life Dew

* Add FIXME comment

* Remove unreachable code

* Update to ESLint 9
2025-03-09 12:05:02 -06:00
Guangcong Luo
e25bec3620 Remove some implicit conversions
boolean -> number and number -> string should be explicit. Probably
string -> number should be, too, but I'm not ready to turn on the lint
option yet.

This was supposed to be part of the big ESLint refactor but I forgot
to push it. <_<
2025-02-25 22:55:01 -08:00
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
André Bastos Dias
ce76114c12
Implement fainted forme regression (#10810) 2025-01-25 14:06:40 -06:00
André Bastos Dias
dfcb64ec4c
Redo: Fix [from] message (#10798) 2025-01-10 00:36:13 -06:00
André Bastos Dias
041bf6a8b2
Fix Terastallization base power buff for priority moves called by Encore (#10808)
* Fix: Tera priority bump and Encore

* Line

* Fix check for multihit
2025-01-09 22:55:30 -07:00
Kris Johnson
392ab2df4a
Revert "Fix [from] message (#10796)" (#10797)
Some checks failed
Node.js CI / build (16.x) (push) Has been cancelled
This reverts commit 5468a36da1.
2025-01-05 22:24:11 -07:00
André Bastos Dias
5468a36da1
Fix [from] message (#10796) 2025-01-05 22:23:06 -07:00
Alex "Mathy
5d014a8df7
Fix Morpeko form permanence (#10663)
Some checks failed
Node.js CI / build (16.x) (push) Has been cancelled
2024-11-06 22:45:01 -07:00
Alex "Mathy
0744e94360
Keep Morpeko's form while Terastallized (#10662) 2024-11-06 19:20:23 -07:00
Kris Johnson
44b0f7d8c1
Battle Actions: Clean up runMove and useMove function args (#10492)
* Battle Actions: Clean up `runMove` and `useMove` function args

* sdfsdf
2024-08-18 09:00:13 -06:00
Karthik Bandagonda
16d9ffe07e
Fix interaction between Encore and priority-blocking effects (#10434) 2024-07-22 20:54:06 -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
Kris Johnson
0884e45f73
SSB: Implement balance changes (#10301)
* SSB: Implement balance changes

* meowdy

* add tico

* Update data/mods/gen9ssb/random-teams.ts

Co-authored-by: HiZo <96159984+HisuianZoroark@users.noreply.github.com>

---------

Co-authored-by: HiZo <96159984+HisuianZoroark@users.noreply.github.com>
2024-05-17 21:16:45 -06:00
Karthik
76c2e598c6
Let's Go: Implement itemless megas (#10212) 2024-03-24 22:56:13 -04:00
Karthik
44541b30d0
Fix Tera Stellar interaction with multihit moves (#10185) 2024-02-24 00:14:29 -06:00
pyuk-bot
20dead22c9
Fix more Dragon Darts interactions (#10161) 2024-02-12 22:53:36 -06:00
Karthik
8344a1da71
Fix Commander invulnerability check (#10137) 2024-01-30 14:33:12 -06:00
Karthik
06d88748a5
Refactor STAB (again) (#10099) 2024-01-13 23:48:47 -06:00
singiamtel
acd02f8efd
Fix Prankster info leak (#10065)
* Fix prankster hint so it doesn't leak info

* Fix condition

* Add unit test to verify there's no hint
2024-01-02 22:49:13 -07:00
Karthik
0e1841f6c6
Make STAB code much more readable (#9985)
* Make STAB code much more readable

* move Terapagos-Stellar check
2023-12-17 17:12:07 -07: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
pyuk-bot
a8c4f4dcf6
Fix when Ogerpon's ability should change on Tera (#9863) 2023-11-15 19:57:18 -06:00
pyuk-bot
98d026a7d1
Pokemon transformed into Ogerpon cannot Tera (#9774) 2023-09-14 20:39:59 -05:00
Karthik
468fa67f3c
Fix Illusion interaction with Ogerpon (#9765) 2023-09-13 22:16:38 -04: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
5296a28b8d
Implement cantusetwice move flag (#9740) 2023-09-06 20:12:30 -05:00
pyuk-bot
8dc70cc701
Gen 9: Allow Hacked Megas, etc. to Tera (#9684) 2023-07-31 23:12:46 -05:00
Hisuian Zoroark
3503347bf4
Prevent Commanded Dondozo from switching out through moves (#9679) 2023-07-31 00:31:45 -05:00