Commit Graph

3322 Commits

Author SHA1 Message Date
kvngrnr aba9310ddf
[Enhancement] Color code for used PP in fight UI (#2014)
* Colorcode pp in fight ui if only half/quarter of maxPP is left

* Use three-level color coding for remaining pp

* use if/else for calculating pp color

---------

Co-authored-by: Kevin Greiner <greiner@infai.org>
2024-06-09 15:30:33 -04:00
José Ricardo Fleury Oliveira 8807efe002
[Localization][pt] Fixed ace trainer name typo (#2015) 2024-06-09 15:27:55 -04:00
ReneGV fdc2d1cd02
[enhacement] Show Egg tier icon on starter UI (#1933)
* Show Egg tier on starter UI

* Use CamelCase on method name

* Remove egg if evolved

* Adding ts-doc
2024-06-09 12:45:21 -04:00
Jannik Tappert a99bcbce3d
[Localization] Achievements are now based on Player Gender (because some languages differ based on that). (#1721)
* Achivments(localization of name and description) now depend on the player gender

* Fixed Name in ptBr config

* Now the achivments are also shown with a gender specific title

* Changed it so it checks if PlayerGender is undefined first

* Update src/locales/de/config.ts

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

* Update src/locales/en/config.ts

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

* Update src/locales/es/config.ts

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

* Update src/locales/fr/config.ts

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

* Update src/locales/it/config.ts

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

* Update src/locales/ko/config.ts

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

* Update src/locales/pt_BR/config.ts

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

* Update src/system/voucher.ts

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

* Update src/locales/zh_CN/config.ts

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

* Update src/locales/zh_TW/config.ts

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

* Update src/ui/achv-bar.ts

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

* Update src/ui/achv-bar.ts

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

* Update src/ui/achv-bar.ts

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

* Update src/ui/achv-bar.ts

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

* Update src/system/achv.ts

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

* Update src/system/achv.ts

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

* Update src/system/achv.ts

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

* Update src/ui/achvs-ui-handler.ts

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

* Update src/ui/achvs-ui-handler.ts

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

* Update src/ui/achvs-ui-handler.ts

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

* instantiate player gender on in AchvBar constructor

* Reverted the change made only for the tests. And adjusted the import to use the new enum file

* Changed a import to make vite build it again correctly

* Again some changes to the imports for the github docs that was complaining

* The new challenges are also now localized and gender based

* Readded getDescription

---------

Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
Co-authored-by: ImperialSympathizer <imperialsympathizer@gmail.com>
2024-06-09 12:40:23 -04:00
Ei c77508aef3
[Bug] Fixed getAttackMoveEffectiveness (#2006) 2024-06-09 12:37:50 -04:00
sodam 10ffe04274
[Localization][ko] #1761 Korean trainer dialogue (other unnamed trainers) (#1987)
* localized other unnamed trainers's dialogue

* Update src/locales/ko/dialogue.ts

Co-authored-by: Lee ByungHoon <o.ohmry@gmail.com>

* Update src/locales/ko/dialogue.ts

Co-authored-by: Lee ByungHoon <o.ohmry@gmail.com>

* Update src/locales/ko/dialogue.ts

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

---------

Co-authored-by: Lee ByungHoon <o.ohmry@gmail.com>
Co-authored-by: returntoice <dieandbecome@gmail.com>
2024-06-09 12:29:15 -04:00
José Ricardo Fleury Oliveira 6e599de870
[Localizatoin][ptBR] achievements (#1981) 2024-06-09 12:22:18 -04:00
Tempoanon 04bad2e15d
[Feature] Update E4 teams (#1851)
* Update E4s

* Accidentally made double Poliwrath

* Fixed some typos in the champ part

* Update based on Fontbane's comments
2024-06-09 12:20:00 -04:00
InnocentGameDev 81431c9ad5
[Localization] Locales punctuation fix in descriptions in (en/es/de/it/fr/ko/pt/zh) modifier-type.ts, and other German locales punctuation fixes (#1696)
* Fix locales punctuations

  In: en, es, fr, it, pt_BR, zh_CN, zh_TW, de, ko

  + Fix somes locales

Co-authored-by: Dakurei <maxime.palanchini@gmail.com>

* Update src/locales/ko/modifier-type.ts

Shiny/Ability charm punctuation fix by MrWaterT

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

---------

Co-authored-by: Dakurei <maxime.palanchini@gmail.com>
Co-authored-by: MrWaterT <87186129+MrWaterT@users.noreply.github.com>
2024-06-09 11:57:53 -04:00
Greenlamp2 67cb79a435
revert changes in trainer.ts to fix an issue induced by #1986 (#2005) 2024-06-09 10:54:15 -04:00
Xavion3 d06e5d2fc6
Fix doubles battles bugs with challenges (#1986)
* Fix doubles battles bugs with challenges

* Make a fully illegal party gameover instead of error
2024-06-09 14:37:33 +02:00
Madmadness65 c1405c7fd6
[Hotfix] Add Mixed Battle BGM entries for the Gen 1-5 trainers (#1988)
* Add Mixed Battle BGM entries for the Gen 1-5 trainers

* Also fix regular trainers
2024-06-09 01:48:32 -05:00
td76099 8a0eaa0009
[Bug] Fixing multi-hit drain moves so they heal based on individual hit and not total turn damage (#1974) 2024-06-08 23:53:03 -04:00
Matthew ce3a9c9c87
artist request base shiny revert (#1980) 2024-06-09 12:28:56 +10:00
Madmadness65 67a0ae49b3
Add new Gym Leader, Elite Four, and Champion music (#1971) 2024-06-08 20:51:37 -05:00
SquillWall a1171eceb9
[QoL] Show currently bound controls on starter menu for last active device (#1859)
* show currently bound controls on starter menu for last active device

* add special handling for touch controls

* remove hardcoded controls for all locales
2024-06-09 03:35:11 +02:00
Xavion3 07f0a67c78
Make getTypes ignore transform when ignoring overrides (#1976) 2024-06-08 21:08:30 -04:00
Xavion3 f0a826b8f4
[Bug] Fix Victini's generation for challenges. (#1973)
* Make victini count as gen 5 challenge instead of 4

* Add comment
2024-06-08 21:06:36 -04:00
Pancakes ae02943b16
Use secure cookies 2024-06-08 21:03:33 -04:00
40chyan 60a3edb918
[Localization] challenge.ts zh_cn translation (#1958)
* Update challenges.ts

* Update challenges.ts
2024-06-08 19:06:27 -05:00
Xavion3 8e0e8952da
Fix switching moves in challenge mode (#1972) 2024-06-09 01:05:18 +02:00
Greenlamp2 dd40c8caa2
added silent option to run tests and added a missing properties in the MockText (#1967) 2024-06-08 21:24:57 +01:00
Greenlamp2 c301a54039
[Improvement] Refactored Test Phase Management with Error Handling (#1962)
* better phase management in tests

* cleanup runFrom/to

* first step of async error handling

* second step of async error handling, halt await, still an issue with select-starter test

* added back whenAboutToRun

* added back full run suite for starter-select.test.ts
2024-06-08 20:54:20 +01:00
SeafoamQueen 0af0ad5b49
[Bug] Fix run away ability (#1890)
* Added fix for Run Away ability being trapped by trapping abilities.
Added fix for ghost type pokemon not having a 100% chance to run from battles.

* Removed log statement

* Removed commented out code

* Removed ghost type run away mechanics
2024-06-08 15:46:16 -04:00
Yentis 3f9eaf4a5d
Add setting for showing type effectiveness hints (#1061)
* type hints

* fix overwritten change

* don't set color to white, just leave it unchanged

* remove unrelated code

* don't show hints if no opponents, use type effectiveness instead of move effectiveness

* fix color not going back to white when new opponent is sent

* move effectiveness to move info container

* add effectiveness overlay, partial hints only show move effectiveness, improve colors

* lint

* docs

* remove full hints, move container to right of enemy info box

* hide effectiveness while flyout is visible

* move setting to display, use default style color instead of white
2024-06-08 15:33:13 -04:00
Adrian T 5e5ece868c
[Localization][es] Add missing curly brace (#1965) 2024-06-08 15:04:50 -04:00
MadridPawmot 281f0df220
[Localization][es] Update menu.ts (#1964) 2024-06-08 14:47:01 -04:00
Lugiad 751e28d2fc
[Localization][fr] French update the menu.ts (#1955)
* Update French menu.ts

* Update French menu.ts
2024-06-08 14:38:52 -04:00
MadridPawmot 66734c396b
[Localization][es] Spanish translation (#1963)
* Translated challenges.ts to Spanish

* Added Spanish translation

* Added Spanish translation

* Translated Pokerogue exclusive items to Spanish
2024-06-08 14:35:51 -04:00
José Ricardo Fleury Oliveira 40727bdc16
[Localization] Localize "Loading asset:" text (#1961)
* localized "Loading..." texts

* fixes

* localized loading asset

* fix
2024-06-08 14:34:05 -04:00
José Ricardo Fleury Oliveira 480a2568a9
[Localization] Fixed the localization of getModeName and "Wave" text (#1953)
* localized getModeName

* wave fix
2024-06-08 11:28:45 -04:00
José Ricardo Fleury Oliveira 7cee16cee2
[Localization] Localized game-mode and save-slot-select-ui-handler (#1728)
* localized game-mode and save-slot-select-ui-handler

* Update src/locales/de/game-mode.ts

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

* Update src/locales/de/save-slot-select-ui-handler.ts

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

* Update French save-slot-select-ui-handler.ts

* Update French game-mode.ts

* Update French game-mode.ts

* Update Spanish game-mode.ts and save-slot-select-ui-handler.ts

* fixes

* fix 2

* Update src/locales/ko/game-mode.ts

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

* Update src/locales/ko/save-slot-select-ui-handler.ts

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

* fix 3

---------

Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>
Co-authored-by: Lugiad <adrien.grivel@hotmail.fr>
Co-authored-by: GoldTra <ericpazos02@gmail.com>
Co-authored-by: returntoice <dieandbecome@gmail.com>
2024-06-08 11:03:01 -04:00
José Ricardo Fleury Oliveira 3c94d5aa83
[ptBR Localization] Added many translations (#1951)
* translations

* english parity
2024-06-08 10:53:25 -04:00
dorri-riddo 1fdfc6256f
[Localization] #1761 Korean trainer dialogue (blueberry academy) (#1950)
* [Localization] #1761 Korean trainer dialogue (blueberry academy)

* 오타 수정
2024-06-08 10:29:59 -04:00
Lee ByungHoon a4cb75aaf0
[Bug] Fix to show current locale in setting (#1942)
* [Bug] Fix to show current locale in setting

* Add default value of lauguage option
2024-06-08 10:15:53 -04:00
Lugiad bd5d16802a
[Localization] Added French localization for challenges (#1945)
* Update challenges.ts

* Update French challenges.ts

* Update French challenges.ts

* Update French challenges.ts

* Update French challenges.ts
2024-06-08 09:51:29 -04:00
sodam 64d36c9864
[Localization] Added Korean localization for challenges (#1946)
* traslated challenge mode script

* modified my mistake

Co-authored-by: Sangmin Lee <66083363+GINK-SS@users.noreply.github.com>

* deleted unnecessary word

---------

Co-authored-by: Sangmin Lee <66083363+GINK-SS@users.noreply.github.com>
2024-06-08 09:49:17 -04:00
Seonghyeon Cho 2d9f05030b
[Localization] Fix typo in skill name (비검천충파 -> 비검천중파) (#1937) 2024-06-08 09:47:35 -04:00
hayuna b4cf80a984
[Bug] Override battles into single only if not fighting with trainers (#1949) 2024-06-08 09:41:56 -04:00
Jannik Tappert 3ef495c126
Fixed Spelling mistake in Tate & Lizas Double Dialogue (#1944) 2024-06-08 19:59:49 +10:00
Xavion3 8142f26833
Fix endless starter points (#1941) 2024-06-08 15:31:31 +10:00
Xavion3 696ff6eae3
Add Challenges (#1459)
* Initial challenge framework

* Add type localisation

* Change how challenges are tracked

Also fixes the difficulty total text

* MVP

Renames challenge types, temporarily hides difficulty, and implements challenge saving.

* Attempt to fix one legal pokemon in a double battle

* Make monotype ignore type changing effects

* Make isOfType correctly detect normal types

* Try to fix double battles again

* Make challenge function more like classic

* Add helper function for fainted or not allowed

* Add framework for fresh start challenge and improve comments

* Try to fix evolution issues

* Make form changing items only usable from rewards screen

* Update localisation

* Additional localisation change

* Add achievements for completing challenges

* Fix initialisation bug with challenge achievements

* Add support for gamemode specific fixed battles

Also make monogen challenges face the e4 of their generation

* Add better support for mobile in challenges

* Localise illegal evolution/form change message

* Update achievement names

* Make alternate forms count for monogen

* Update monotype achievement icons

* Add more comments

* Improve comments

* Fix mid battle form changes

* Reorder mode list

* Remove currently unused localisation entry

* Add type overrides for monotype challenges

Meloetta always counts for psychic and castform always counts for normal

* Change how form changes are handled

Now attempts a switch at the start of each turn instead of immediately

* Add start button to challenge select screen

* Make starter select back out to challenge screen if using challenges

* Fix daily runs

* Update tests to new game mode logic
2024-06-08 01:07:23 -04:00
Matthew 9c97e37c27
initVouchers correctly (#1940) 2024-06-07 23:50:07 -04:00
Madmadness65 bf5b6e3f6b
[Enhancement] Add more legendary battle music; add music preference setting (#1753)
* Add more legendary battle music; add music preference setting

* Replace BDSP tracks

"Souless", they say. Naysayers, I say.

* Update for settings menu refactor

* Remove unnecessary Reshiram/Zekrom music calls

The default legendary battle music is the Reshiram & Zekrom battle theme anyways, so removing these lines make it functionally identical.

* Update for settings menu refactor AGAIN
2024-06-07 21:52:14 -05:00
sodam aa7c354be8
[Localization] #1761 Korean trainer dialogue (Gym leader in Johto region with Elite-4) (#1878)
* [Localization] #1761 Korean trainer dialogue(Gym leader in Johto with Elite-4)

* [Localization] #1761 Korean trainer dialogue(Gym leader in Johto with Elite-4)

* fixed word (by korean grammer)

* made chuck's dialogue clear

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

* made lorelei's dialogue clear

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

* fixed the spacing at dialogue.ts

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

* fixed the spacing at dialogue.ts (with GINK-SS)

* Modified Karen's dialouge more characteristic

---------

Co-authored-by: returntoice <dieandbecome@gmail.com>
2024-06-07 22:32:30 -04:00
NightKev ff7429f240
[Bug] Update Sweet Scent to reduce evasion by 2 (#1910)
cf https://bulbapedia.bulbagarden.net/wiki/Sweet_Scent_(move)
2024-06-07 21:42:17 -04:00
Matthew 3022aabc32
Cleanup format, show correct value for money rewards (#1926) 2024-06-08 02:09:12 +01:00
Matthew Olker 7422ebdb28 Walker asked me to commit to main 2024-06-07 19:43:21 -04:00
Greenlamp2 1a149bfa04
[Testing] Flexible Testing Wrapper for Phaser-Based Battle-Scenes (#1908)
* refactor executed code while importing and initializing all of these in loading-scene

* reset to main

* fix server url

* added rule no-trailing-spaces

* made progress

* test somme data from a session save is working

* trying to launch a battle

* added fetch wrapper to load data locally

* trying to mockAllSettled

* pushPhase & shiftPhase

* check integrity of exported session

* set toke + loggedInUser in tests

* progress on starting new battle

* tring to test phase but it's async

* mocking fetch

* working mock fetch

* need to handle pile of data

* attempt to use real phaser classes

* reorder overrides

* refactored to use some real classes from phaser

* removed useless things

* started to work on some container mock

* finished the mockContainer time to add some logic

* some more mock containers

* removed addMethods since there is the mock classes now

* commented issues

* attempt to create mockTextureManager

* fix tests

* mockSprite & mockText

* yes but not really

* yes but not really

* fix tutorial callback

* reached mode title

* added achievement tests

* fix test achievements with current state of mock

* correct sequence loading for BattleScene with mockLoader !

* deep dive into next step

* working wait until starter selection screen

* added newGame method into wrapper

* expect to save_slot

* trying to manage pokemon sprite for getAll without success yet

* added test for egg output

* fixed egg test for June

* fix tests + locate next issue to fix

* we are in battle baby

* added new game in one-line

* export is working but export only what's in the fetch

* fix start game as guest

* refactored how we start a battle + cleanup

* overrided mewtwo but issue with currentBattle

* refactor: rename InitAchievements to initAchievements

* added missing mock method

* override level and pokemon forms working as intended

* bringToTop Obj

* remove launch battle in achivement test

* fix getIndex when same pokemon

* can run all tests

* first attack, faint, and shop modifiers, MockClock

* on method for container

* added doAttack one-liner

* one-line export data

* removed throw error

* feat: Make `scenes` property of `GameWrapper` class public

The `scenes` property of the `GameWrapper` class was changed from private to public. This change allows external access to the `scenes` map, which is used to store Phaser scenes. This modification was made to enable easier manipulation and interaction with the scenes in the game.

* correction

* removed CanvasRenderer

* added a param to remove console.log and added a param to preven scene create call

* fix encounter wave 30 when it's a trainer

* test double-battle

* test fight without KO

* test double fight no ko

* fix crashing texture + added Text wrapper to log fight

* fix tests on boss - trainer - rival

* chore: Refactor BattleScene initialization and add new phases

Refactor the BattleScene initialization code to remove unnecessary delay and improve performance. Also, add new phases for the title and unavailable states to enhance the game experience.

* rework of Game tests

* skipFn is working

* added onNextPrompt and restore Og Start

* better newGame

* added skipFN in remove

* not yet working test but updated interceptors

* do attack work but not on PostSummonPhase phase when there is mention of silcoon and wurmple

* error located, it's just a double fight, i was not there yet

* single OHKO & double no OHKO

* added expirationFn into next prompt

* all tests are passing

* working test on non damaging move from opponent

* cleaned a bit

* removed phaser initialisation on every tests

* renamed test file

* added load system data

* added some ability support

* added onKill & onSummon abilities test

* removed useless test + cleanup

* removed useless test + cleanup

* fixed tests after merge main

* added itemHeld endTurn trigger test (toxic orb)

* added runFrom..To

* added mustRun to assert currentPhase

* added no-miss move to test things

* cleaner restore mock

* fix test

* fix moxie test + game speed

* improve test speed

* added onOurself and onOpponent mvoe test

* added onDamage test for tackle

* removed timeout in intervals to run tests faster

* cleanup

* added never crit override + separate file per test + remove randomness in randBattleSeedInt

* move folders

* better org

* renamed itemHeld folder to items

* fix deploy.yml

* cleanup

* simplified the gameManager start battle and allow single pokemon in party

* remove the need of mode development

* added input handler to test inputs + remove time from phaser into inputController

* added keyboard support

* added fakeMobile support

* added details

* removed a console.log + added logUp

* move test to folder

* fixed canvas issue

* added starter select tests

* added some more test on starter-select

* added battle-order tests

* added battle-order tests

* fixing Phaser RNG

* ordering stats for better reading

* fix tests for main

* adapt battle-order test to be more readable

* fix merge

* fix some errors and silent all errors from gameWrapper since it's not possible to avoid them

* fix mocks to manage childs & stuffs

* added some docs

* fix achievement test

* removed an unused file

* separate misc tests to clean battle.test file

* added a basic french lokalization test

* added i18n where it needs to be used only

* revers extracted method

* removed unused method

* removed handler fetch since we do not test anything server related

* fix test with handlers removed

* added intrepid sword test

* fix enum exp party

---------

Co-authored-by: Frederico Santos <frederico.f.santos@tecnico.ulisboa.pt>
2024-06-07 18:33:45 -04:00
Madmadness65 3d87e86e58 Fix minor typo in Surskit's German name 2024-06-07 16:57:26 -05:00