Commit Graph

3399 Commits

Author SHA1 Message Date
Felix Staud 725e681538 remove `phaser3spectorjs`
It's a WebGL debugging tool but I've never seen anyone using it
2024-07-26 13:07:22 -07:00
Felix Staud c5e587e11b delete `pokenode-ts` dependency 2024-07-26 13:04:55 -07:00
Felix Staud 71403cecae migrate some `typescript-eslint` to @stylistic/eslint-plugin-ts
as stated here: https://typescript-eslint.io/blog/deprecating-formatting-rules#upgrading-to-eslint-stylistic

- fix eslint complaints inside `i18next.d.ts`
2024-07-26 13:02:26 -07:00
Felix Staud 04c8f27f60 fix pokemonSprite.test.ts to run locally
It should ignore hidden (starting with `.`) files!
2024-07-26 12:50:12 -07:00
Felix Staud 3e22cdd8cf bump `vite` to version 5 2024-07-26 12:36:19 -07:00
Felix Staud 22c68224ec remove `vite-plugin-fs` dependency...
- removed `api-generatort-script.ts` file (this was in consultations with devs https://discord.com/channels/1125469663833370665/1250836282926436413/1266469312609259550)
2024-07-26 12:35:43 -07:00
Felix Staud 5f6712888e bump up `vitest` and `eslint` version to resolve inflight warning...
- remove and disable `eslint-plugin-import` due to not supporting `eslint@9` yet (can be reactivated later)
- bump `eslint` to `9.7.0`.
  - bump `@typescript-eslint/eslint-plugin` to `8.0.0-alpha.54`
  - update `@typescript-eslint/parser` to `8.0.0-alpha.54`
  - update `typescript-eslint` to `8.0.0-alpha.54`
- update `vitest` to `2.0.4`
  - update `@vitest/coverage-istanbul` to `2.0.4`
2024-07-26 11:54:28 -07:00
Opaque02 1dac6f766e
Emergency delete unlock all functionality - should remove the unlock all functionality but keeps the isBeta utils function for future stuff (#3153) 2024-07-26 16:52:32 +01:00
flx-sta f0335afbe0
[Unittest] remove held item rng (white herb) from intimidate.test.ts (#3151) 2024-07-25 20:30:41 -04:00
sirzento 7fac3269e1
[BUG] Fixes bug that prevents pokemon with froms from hatching as rare/epic shiny variant and preventing illegal variants from legendary gacha (#2940)
* Changed PokemonSpecies hasVariants function to also include for pokemon with differend forms

* Added check to prevent illegal shiny variants from happening if the egg rolls the gacha legendary and has no variants

* Simplified variant check. Fixed spelling on unit test

* Bugfix for legacy eggs

* Removed formIndex variable

* Changed unit test

* Added new line to unit test function

Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>

---------

Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
2024-07-25 19:27:09 -04:00
Mumble 233c926721
[Bug] Caught Pokemon Summary-Modifier Display Fix (#3145)
* Fixed modifiers not displaying on summary screen

* Addressed Typedoc issues

* Documentation added

---------

Co-authored-by: Frutescens <info@laptop>
2024-07-25 18:40:47 -04:00
José Ricardo Fleury Oliveira a604e00369
[Localization] Translated missing portuguese entries and some fixes (#3142) 2024-07-25 16:31:22 +01:00
AJ Fontaine 3e47881faf
[Feature] [Item] Add White Herb item (#2719)
* More work

* More work

* Should be finished

* Fixed an error in checking target

* Moved white herb effect to StatChangePhase, 50% chance of consumption

* Added graphics for White Herb

* Balance and documentation

* Add localization entry for White Herb apply msg

* Add new keys to other localization files

* German translations

Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>

* Update item sprite atlas

* Redo item atlas

* Remove whitespace in move.ts

* Moved decrement outside conditional

* Fix item atlas

---------

Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>
2024-07-25 13:01:03 +01:00
NightKev 9f01b52d6b
[Bug] Prevent evolution causing a swap from the second ability to the HA (#3138)
* Prevent evolution causing a swap from the second ability to the HA

* Add tests

* Update `starter-select-ui-handler.ts`
2024-07-25 12:50:17 +01:00
Opaque02 2d51fc5394
Fixed form names not working in starter select (#3139) 2024-07-25 12:39:03 +01:00
Leo Kim 29a5dd0068
[Bug] fix and condition of shiny and passive (#3136) 2024-07-25 00:11:21 -04:00
Leo Kim 8f30befe5b
[Bug] Hotfix for Starter select UI with Filter (#3121)
* fix remove pokemon menu

* fix dropdown all is not changing bug

* fix bug when go down with no starter on start button

* fix starter corsor bug on deletion. out of screen cursor bug

* fix challenge log

* fix lint error
2024-07-24 20:46:46 -04:00
cam b32634819a
[Fix][Sprite] Politoed Back Sprites (#3130)
* [Fix][Sprite] Politoed Back Sprites

Retrieved first version from history.
Rearranged frames to make jump a little less floaty.
Set same anim length for all variations.
Json is identical for all variations.
Spritesheet frame position is identical for all variations.
Trimmed the frame of extra space
Reduced file size of spritesheets and JSON due to less unique frames needed.

* [Fix][Sprite] Politoed Back Sprites  - Reformatted JSON to texturepacker standard

Reformatted json.
2024-07-24 20:34:17 -04:00
Corrade 928a3ae977
[Bug] Fixed OHKO moves being affected by accuracy and evasion battle stats (#3117)
* Fixed OHKO moves being affected by accuracy and evasion battle stats

* Added related tests for Fissure, unskipped related test for Hustle

* Tweaked fissure accuracy and evasion tests to use spyOn() for getAccuracyMultiplier() as per feedback

* Fixed accuracy test for Fissure
2024-07-24 20:34:02 -04:00
Mumble 45d9c65a3e
Bug Fix (#3129)
Co-authored-by: Frutescens <info@laptop>
2024-07-24 23:37:20 +01:00
AJ Fontaine 64d9c11713
[Balance] Fix N-Solarizer etc appearing without secondary mon registered in dex (#2713)
* Fix reins et al being available without unlocking second mon

* Small fix

* Parentheses for safety

* Add documentation to new function
2024-07-24 23:36:16 +01:00
Tempoanon 3caa51be81
[Misc] Change fresh start achievement icon to reviver seed
Mystic ticket icons in the achievements just confuse players
2024-07-24 16:23:20 -04:00
schmidtc1 e1662b8251
[Bug] Adjust how counter attacks target to account for uturn/voltswitch and double battles (#2462)
* Adjust how counter attacks target to account for uturn/voltswitch

* Creates move flag for metal burst/comeuppance to redirect in some cases

* Remove debug printing

* Bit shifts the redirect counter flag

* Removes extraneous class from prior testing

* Remove vitest timestamp file that was accidentally added
2024-07-24 16:07:32 -04:00
Mumble 3c93aa6d36
[Bug] Game Stats Sub-Legendary NaN bug for new game files (#3122)
* Bug Fix

* Update src/system/game-stats.ts

Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>

* Fixing a test

* Revert "Fixing a test"

This reverts commit 1bdbe2da5a.

* Test Re-Run

---------

Co-authored-by: Frutescens <info@laptop>
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
2024-07-24 15:49:17 -04:00
Jannik Tappert f3a98efd39
[Localization] Correctly Localized German names of the BGM for Evil Teams (#3124) 2024-07-24 15:41:59 -04:00
Mumble 091a15c8a8
[Tests] Updating Leftovers test (#3123)
* Bug Fix

* Update src/system/game-stats.ts

Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>

* Fixing a test

* Fixed import

* Revert "Bug Fix"

This reverts commit 834844978e.

---------

Co-authored-by: Frutescens <info@laptop>
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
2024-07-24 15:25:55 -04:00
schmidtc1 54feaa0b32
[Bug] Fixes bug with frenzy moves keeping the confusion counter despite disruption (#3041)
* Adds frenzyMissFunc trigger on NO_EFFECT hit result

* Refactors FrenzyAttr to properly lapse tags each turn and remove tags on disrupt

* Makes comment on CONFUSED tag clearer

* Changes all integer usages to number in battler-tags

* Update getBattlerTag function to use number instead of integer
2024-07-24 14:07:51 -04:00
EmberCM a526403534
[Bug] Fix HP rounding issues (#2968) 2024-07-24 14:05:26 -04:00
Mumble 26c98f4afe
[QoL] Summary Option for Caught Pokemon (#2921)
* Option to view Summary before adding new Pokemon to party

* Fixed issues described by HopsWas

* Adjusted makeRoomForConfirmUi to improve window spacing

* Fixed ESLint issue + addressed OrangeRed review

* Fixed Github pages issue

* Removed duplicate unshiftPhase

* Fixed phase order

* Don't start from beginning of catch function

* Option to view Summary before adding new Pokemon to party

* Fixed issues described by HopsWas

* Adjusted makeRoomForConfirmUi to improve window spacing

* Fixed Github pages issue

* Fixed phase order

* Quick fix

* This should fix the summaryOption feature without bugging confirm-ui-handler in other cases

* Revert "Merge remote-tracking branch 'origin/summaryOption1' into summaryOption1"

This reverts commit ea7d0ce59e, reversing
changes made to 4c565958da.

* Added a better conditional that reflects its source and purpose

---------

Co-authored-by: Frutescens <info@laptop>
Co-authored-by: AJ Fontaine <fontbane@gmail.com>
2024-07-24 14:03:32 -04:00
Tempoanon 3f9f7914db
[Ability] Cloud Nine now displays a message on activation
Maintains parity with Air Lock. Both of these probably need to be localized. Should fix issue 491 though
2024-07-24 13:52:18 -04:00
NightKev 5111c916a8
[Bug] Make on-summon abilities trigger after the switch check (#3118)
* Make on-summon abilities trigger after the switch check

* Add test
2024-07-24 13:38:06 -04:00
Leo Kim 79e2b1215c
[Move] Water Shuriken guarantees 3 hits with battle bond (#2687) 2024-07-24 10:58:26 -04:00
NightKev d1e1879920
[Bug] Fix tags not resetting on switch (#3119)
Fixes #2982
2024-07-24 10:27:37 -04:00
AJ Fontaine 0ba8959b11
[Move] Fully implement Jungle Healing/Lunar Blessing status heal (#2785) 2024-07-24 10:24:02 -04:00
Kiriox c37527cf97
[Localization] Implement Form localization (#3030)
* Implement Pokemon forms localization

* Update French pokemon-form.ts

* Update French pokemon-form.ts

* Update pokemon-form.ts

* Add battle forms korean translation from returntoice

Co-authored-by: returntoice <dieandbecome@gmail.com>

* Add cosplay forms korean translation from returntoice

Co-authored-by: returntoice <dieandbecome@gmail.com>

* Add pichu form korean translation from returntoice

Co-authored-by: returntoice <dieandbecome@gmail.com>

* Add castform forms korean translation by returntoice

Co-authored-by: returntoice <dieandbecome@gmail.com>

* Add remaining forms korean translation by returntoice

Co-authored-by: returntoice <dieandbecome@gmail.com>

* French typo corrections pokemon-form.ts

* Update Korean pokemon-form.ts

* Modify froakiBattleBond

like rockruff of OwnTempo case, it is froakie, not greninja.

* Modify zygardePc

Power construct is more important information
Switch its position to 50% or 10% to avoid overlapping with the sprite

* Modify mispelling

* Added german forms

* Changed Gigadynamax and Unendynamax so it fits at all

* Add partner pikachu and eevee form localization

* Add mimikyu forms localization

* Partner Pikachu, Partner Evoli und Mimikyu Formen hinzugefügt

* Update pokemon-form.ts

* Update partners

* Fix conflicts

* Fix useless ? by flx-sta

Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>

* Fix switch use by flx-sta

* Fix conflicts

* Please work !!!!!!!

* Update src/locales/fr/pokemon-form.ts

Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>

* Update src/locales/fr/pokemon-form.ts

Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>

* Add pt_br primal localization

Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br>

* Add pt_br pikachu localization

Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br>

* Add pt_br castform localization

Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br>

* Add pt_br 3g localization

Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br>

* Add zh_cn localization

Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com>

* Add pt_br other localization

Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br>

* Add es castform localization

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

* Add es burmy localization

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

* Add es shellos localization

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

* Add es rotom localization

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

* Add es basculin localization

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

* Add es deerling localization

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

* Add es froakie localization

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

* Add es scatterbug localization

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

* Add es furfrou localization

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

* Add es xerneas localization

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

* Add es zygarde localization

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

* Add es pumpkaboo localization

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

* Add es flabebe localization

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

* Add es oricorio localization

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

* Add es minior localization

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

* Add es magearna localization

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

* Add es marshadow localization

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

* Add es sinistea ocalization

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

* Add es eiscue localization

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

* Add es indeedee localization

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

* Add es rockruff localization

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

* Add es mimikyu localization

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

* Add es zarude localization

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

* Add es squawkabilly localization

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

* Add es tatsugiri localization

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

* Add es gimmighoul localization

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

* Add es poltchageit localization

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

* Add es paldeaTauros localization

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

* Add es primal localization

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

* Add es pikachu localization

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

* Add es partner localization

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

* Fix typedocs error

* Fix typedocs error

* cn form prefix added

Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com>

* Fix german translate error

* Fix typo Zh_CN

Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com>

* Update pokemon-form.ts [Localization(it)]

* Update src/locales/es/pokemon-form.ts

Co-authored-by: InnocentGameDev <asdargmng@gmail.com>

* Fix megas forms bug and add forgotten forms

* Fix wrong ko config

* Add fr localization for new forms

Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>

* Add de localization for new forms

Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>

* Remove forgotten debug line

Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>

* Optimize battle forms

* Update pokemon-form.ts (additional forms, italian localization)

* The same typo is in the zh_TW placeholder text too.

Co-authored-by: Madmadness65 <59298170+Madmadness65@users.noreply.github.com>

* Fix forgotten megaY

Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>

* Add capitalizeString to utils

* Fix typedoc error

* Update src/data/pokemon-species.ts

Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>

* Add ko localization for new forms

Co-authored-by: MrWaterT <87186129+MrWaterT@users.noreply.github.com>

---------

Co-authored-by: Lugiad <adrien.grivel@hotmail.fr>
Co-authored-by: returntoice <dieandbecome@gmail.com>
Co-authored-by: Mr.WaterT <water.t.works@gmail.com>
Co-authored-by: MrWaterT <87186129+MrWaterT@users.noreply.github.com>
Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
Co-authored-by: Benjamin Odom <bennybroseph@gmail.com>
Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br>
Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com>
Co-authored-by: InnocentGameDev <asdargmng@gmail.com>
Co-authored-by: EnochG1 <enoch.jwsong@gmail.com>
Co-authored-by: mercurius-00 <80205689+mercurius-00@users.noreply.github.com>
Co-authored-by: Niccolò <123510358+NicusPulcis@users.noreply.github.com>
Co-authored-by: Madmadness65 <59298170+Madmadness65@users.noreply.github.com>
2024-07-24 02:30:19 -04:00
Leo Kim 62fd574ce5
[QoL] New Starter Select UI with Filter (#2916)
* update images for new UI

* add updated starter UI with filter code

* update starter-select test code

* update win filter condition to pass test

* remove unnecessary console log

* update test code to match current filter UI

* merge update

* apply bugfix & chrry-pick small issues fix which are handled beta branch

* resolve conflicts

* fix lint errors

* Fixed a bug where the target location for escaping using the left and right buttons on the starter button did not account for scrolling

* update filter bar label color change when activated

* fix lint error

* fix lint

* fix octolock.text.ts. it looks override import error. idk why it is happend in this PR. but it looks ok now

* add passive dropdown in unlocks filter

* fix lint

* fix double button sound bug. refactoring genSpecies -> allSpecies, starterContainers -> starterContainer which are remove unnecessary generation axis

* optimize updateStarterValueLabel function which is bottleneck of UI update latency

* apply translation of gen filter label. fix lint

* add # candies sort option

* merge beta

* resolve confilcts

* fix offset of starter and start cursor

* make compatible with starter UI

* add missing feature

* add images for legacy UI. adjust the position and size of the starterContainerWindow
2024-07-23 22:33:14 -05:00
innerthunder 9c80e6d80d
[Bug][Beta] Fix Hyper Beam, etc. permanently recharging (#3115)
* Fix Hyper Beam, etc. permanently recharging

* Fix override in hyper beam test
2024-07-23 20:20:02 -04:00
flx-sta 1563b8e581
[Test] Add test for rollout move (#3114)
* add test for rollout move

Co-authored-by: Zach Day <zachdayz@gmail.com>

* fix tests still using `SINGLE_BATTLE_OVERRIDE`

---------

Co-authored-by: Zach Day <zachdayz@gmail.com>
2024-07-24 00:46:22 +01:00
NightKev 5edaec9f98
[Bug] Remove ability swap code in `PlayerPokemon.evolve()` (#3113) 2024-07-23 17:31:26 -04:00
mcmontag 0e5fd80431
[Move] Implement Stockpile, Spit Up, Swallow (#2960)
* feat: Implement Stockpile, Spit Up, Swallow

* chore: Minor, likely unnecessary null checks

* feat: Localization

* Undo non-English localizations (unsure if they went through proper channels)

* ko localization

from @EnochG1

Co-authored-by: Enoch <enoch.jwsong@gmail.com>

* linting fix

* add tests, tiny (non-functional) tweaks

* Remove unnecessary cast

* Update src/data/move.ts

(oops)

* remove some unnecessary comments, rename something for clarity

---------

Co-authored-by: Enoch <enoch.jwsong@gmail.com>
2024-07-23 17:30:42 -04:00
NightKev ef5e0d4c24
[Refactor] Code readability update (#3085)
* Clean up/clarify `src/field/pokemon.ts` a bit

Code provided by DerTapp on Discord

* Update `PokemonSpeciesForm.getAbilityCount()`

* Update `PokemonSpeciesForm.getAbility()`

* Add explicit `Abilities.NONE` checks

* Add tests

* Add jsdoc and implement test suggestions
2024-07-23 14:59:59 -04:00
AJ Fontaine 4a04ef50c3
[Balance] More TM fixes (#3081)
* More TM fixes

* Leaf Storm

* Removed sexy matcha
2024-07-23 17:08:27 +01:00
flx-sta 5cb1125bca
fix `Overrides` capitalization (#3111) 2024-07-23 17:07:32 +01:00
NightKev a0502fb0b5
[Refactor] Replaces the single and double battles overrides with a single override (#3104)
`SINGLE_BATTLE_OVERRIDE` and `DOUBLE_BATTLE_OVERRIDE` are now `BATTLE_TYPE`

Also updates all uses of the old overrides with the new one
2024-07-23 11:19:47 -04:00
Tempoanon 11c5c0a3d9
[Move] Aeroblast is a wind move (#3109)
* Hardcoded Pokemon should have proper names

* Aeroblast is a wind move
2024-07-23 11:17:32 -04:00
innerthunder 1d39f8d638
[Bug] Fix Thousand Arrows not hitting targets under the effects of Magnet Rise (#3100)
* Fix Thousand Arrows not hitting through Magnet Rise

* Add integration test for Thousand Arrows vs. Magnet Rise

* ESLint

* Remove unnecessary checks in integration tests
2024-07-23 10:19:48 -04:00
chaosgrimmon 630deb92e5
[Sprite] Mega Latis using opposite's eye colour (#3102)
* [Sprite] Mega Latis using opposite eyes

Taken from counterpart Lati

* [Sprite] Update Mega Latios eyes

* [Sprite] Update Mega Latias eyes

* [Sprite] Mega Latias duplicated palette value

Colour taken from non-exp Mega Latias
2024-07-23 10:16:21 -04:00
Adrian T. 799458c946
[Bug] Fix hustle not applying attack boost (#3101) 2024-07-23 10:15:58 -04:00
schmidtc1 e84649854d
[Bug] Enemy pokemon's Harvest creates berry icons on the player's side when triggered (#3077) 2024-07-22 20:42:55 -04:00
José Ricardo Fleury Oliveira d3c9392721
Localization(pt): Updated move.ts (#3078)
* Localization(pt): Updated move.ts and fixed King's Shield

* more fixes
2024-07-22 20:00:47 -04:00