* update instruction for pad in run history UI
* move getGamepadType function to ui.ts
* Update src/ui/ui.ts
Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>
---------
Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>
* Complete after you implementation (no localization)
* reset override changes
* Remove hardcoded English text, add tests
* Fix test
* Make sure phases occur in the correct order
* fix after-you issues
- fix i18n interpolation ot state "target name" and not "pokemon name" as the target takes the offer, not the user
- fix some tsdocs
- add override to apply
- update scene.findPhase to be able to use generic types. Add tsdocs
* add move-trigger.afterYou for DE
* fix after_you.test.ts
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
* Add ability and passive tooltips to starter select screen
* Remove explicit casts to BattleScene
* Increase tooltip size, reverse y when necessary, and always show passive tooltip
* Add ability name to tooltip title and persist tooltips between Pokemon
* Use vi function mocks
* Fixed Delta Stream remaining active when last mon dies to indirect damage
* Rebasing changes
* Linting fix
* Combined if statements
* Changed params to optional
* Added unit test
* Apply suggestions from code review
* Fix test and remove `.js` from import
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Make `OPP_MOVESET_OVERRIDE` fully override the enemy's moveset
* Update tests with new override behavior
* Fix tests
* Fix another test
* Move overrides no longer required to be arrays
* Remove `SPLASH_ONLY` test utility variable
* Update moveset override helper functions
* Missed some tests
* Learn Move Phase rewrite
* Typedocs
* messages with confirm do not need an extra button press no more
* Added Documentation
* This does not work
* so sad
* Some updates
* Eslint issues + clean up
* Additions to handle learning during evolution + test fixes
* some more checks
* Update src/overrides.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update src/test/phases/learn-move-phase.test.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Added new function and updated tests
* Fixed bracketing and added parameter types
* Added Sketch to the conditional
* Added some fixes. Weird stuff going on.
* Whoops
* async implementation done
* Update src/phases/learn-move-phase.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Made showText=> summary a promise
* adapt learn-move-phase to `async-await`
* await add
---------
Co-authored-by: frutescens <info@laptop>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
* fix#762 by using slotIndex to add to party
for now the new pokemon was ALWAYS just pushed to the party array. Now it's put into the slot that was also previously selected as the mon to release
* add docs for `Pokemon.addToParty()`
* add simple tests for addToParty
* update `isBetween` docs. Remove `.js` imports
* [DOCS] adding JSDocs to `arena.ts` (#3590)
* adding some docs
* Update src/field/pokemon.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* seems like battleStats changed to statStages
* Apply suggestions from code review
editing doc text
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
* Update tsdocs, convert comment to tsdoc in `pokemon.ts`
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
* [Bug] Fix scrappy (+ some immunity move and ability) in inverse battle (#4067)
* fix scrappy + etc. update inverse battle test code
* update test code following request from swain
* fix and optimize imports (#4061)
- remove any `.js` extension imports
- remove unncessary dynamic imports of `modifier.ts` file. The file was being imported statically & dynamically. Made it pure static
- increase vite chunk-size warning limit
Co-authored-by: Mumble <171087428+frutescens@users.noreply.github.com>
* Fusion hotfix
* returned main
* Faint cry properly retrieved for non fused Pokemon with forms
* Revert "[DOCS] adding JSDocs to `arena.ts` (#3590)"
This reverts commit b73fd97760.
* Revert "[Bug] Fix scrappy (+ some immunity move and ability) in inverse battle (#4067)"
This reverts commit 31fcbf49f4.
* Revert "fix and optimize imports (#4061)"
This reverts commit d1bd6974e4.
* Fixed sprite key generation
---------
Co-authored-by: DustinLin <39450497+DustinLin@users.noreply.github.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
Co-authored-by: Leo Kim <47556641+KimJeongSun@users.noreply.github.com>
Co-authored-by: frutescens <info@laptop>
- remove any `.js` extension imports
- remove unncessary dynamic imports of `modifier.ts` file. The file was being imported statically & dynamically. Made it pure static
- increase vite chunk-size warning limit
Co-authored-by: Mumble <171087428+frutescens@users.noreply.github.com>
* Refactor Lapsing Modifiers, Lerp Hue of Count
* Fix Unit Tests
* Add Documentation to `hslToHex` Function
* Change Descriptions for New Behavior
* Add Documentation to Lapsing Modifiers
* Add Unit Tests for Lures
* Update Unit Tests for X Items and Lures
* Update Boilerplate Error Message
* Update Boilerplate Docs
* revert to normal forms when fainted
* Remove `.js` from import
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
* Translated bgm-name.json
Song titles from Bulbapedia and https://w.atwiki.jp/gamemusicbest100/
Kept mainline game abbrevs., changed PMD to ポケダン for clarity
Added translations for the original songs
* Update bgm-name.json
* Update bgm-name.json
* Update bgm-name.json
* fix username-finder issues & refactor `login-form-ui-handler`
- reduce redundancy
- add hover effect for interactable game objects
- add error handler for "No save files found!"
- Make user finder errors support i18n
* add `disableInteractive` to mockContainer
* Fix off-by-one error in some random number calls
* Fix mock RNG function used by tests
Also remove unnecessary extra RNG mock from Glaive Rush test
* Just some github UI manipulation don't mind me
* Update Glaive Rush test
* Remove unnecessary `Math.floor()`
* Remove resolved comment
* Add tsdocs to various functions
* Remove `src/rng.md` file
* Update tsdoc
* [Localisation] [JA] Begun translation on arena-flyout.json
* Added english names to bgm-name.json
* Translated common.json
* Added English dialogue-double-battle.json
To make translation easier
* Added English dialogue-final-boss.json
* Added english dialogue-misc.json
* Added English dialogue.json
* Translated fight-ui-handler.json
* Update filter-bar.json
Changed 飴 to アメ for consistency with its spelling in Pokemon GO
* Update game-stats-ui-handler.json
changed 孵化 to ふか
* Update growth.json
Added kanji
* Update menu-ui-handler.json
changed 孵化 to ふか
* Update modifier-type.json
Changed name of IV Scanner to match with other files, the rest of the item descriptions need to be changed to Kanji as well.
* Update modifier.json
* Changed move-trigger.json
Added kanji and new moves.
* Update party-ui-handler.json
Added kanji
* Update pokemon-info-container.json
Changed to Kanji
* Translated pokemon-summary.json
The metFragment formatting is taken from BW
* Update run-history.json
Corrected some misinterpretations.
Added correct original line of "Welcome to Hall of Fame!"
* Added english splash-messages.json
* Update move-trigger.json
* Update move-trigger.json
* Update move-trigger.json
* Update arena-flyout.json
* Update move-trigger.json
* Translated arena-flyout.json
* Update weather.json
* Update save-slot-select-ui-handler.json
changed wave to ラウンド
* Update game-stats-ui-handler.json
* Update challenges.json
* Update achv.json
Corrected some mistakes, misspelling
* Added some translations dialogue.json
Youngster translation done
Female rival dialogue done, needs check
* Update dialogue.json
* Update dialogue.json
* Update dialogue.json
* Update dialogue.json
* Update dialogue.json
* Use BattlerTag for move-disabling effects
* Fix RUN command causing freeze
* Improve documentation
* Clean up and document PokemonMove.isUsable
* Fix isMoveDisabled missing return
* Tags define the message shown when disabling interrupts a move
* Fix -1 duration on Disable effect
* Add tests for Disable
* En loc and fix message functions
* Fix Disable test
* Fix broken imports
* Fix test
* All disable tests passing
* Localize remaining strings
* Move cancellation logic out of lapse; use use TURN_END for lapse type
* Prevent disabling STRUGGLE
* Inline struggle check function
* Restore RechargingTag docs
* Move cancellation logic back to tag
Wanted to increase similarity to the existing code base to avoid that stupid hyper beam error but it's still happening here
* Fix hyper beam test
* Remove erroneous shit
* Fill movesets with SPLASH for disable test
* More robust condition for disable checking
* Remove DisabledTag lapse
* Simplify DisablingBattlerTag lapse
* Cancel disable-interrupted moves instead of failing them
* Avoid disabling virtual moves
* Consistent access modifiers across Disable tags
* Add abstract function for message when player tries to select the disabled move
* Fix syntax mistake
* Always disable last-used non-virtual move
* Overhaul tests + add tests
* Implement loadTag for DisabledTag
* Update translations
* Update translations
* Reimplement phase changes
* fix battlertag strings
* Fix disable test not running
* Update name of base class
* Rename "disabling" to "restriction"
* Fix sneaky string fuckup
* Fix test failure
* fix merge problems
* fix merge problems
* Update tests
* rerun RNG test
* Properly mock stats in test
* Document everything in battlertag
* More docs + typo fix
* Update tests
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Use default values in the `Battle` class
Turn a couple of comments into tsdoc comments
Replace a `!!` with `?? false`
* Replace `integer` with `number`
* Fix inconsistencies with ability triggers on variable-type moves
* Fix aura effects not accounting for the move user
* Fix Wonder Guard evaluating move type as if the defender used the move
* Some additional test coverage for move-type-changing effects
* Add `isTransferrable` property to `BattlerTag`s
* Update Baton Pass to check `isTransferrable` for `BattlerTag`s
* Don't mark Salt Cure as transferrable
* Add Destiny Bond, remove `GroundedTag` and `ExposedTag`
* Fix daily mode test
* Add test
* Rename `isTransferrable` to `isBatonPassable`
* cherry picked commits / manual copy
* better dex tracking for summary after regular egg hatching
* ui changes
* updated egg hatch bg, added candy tracker, icon anims for new shiny or new form unlock
* added i18 line, reset overrides
* touchup
* code cleanup, documentation and slight refactor
* sprite display fix
* load interrupts, simple sfx and no summary for small egg amounts
* Garbage Collection + Eslint/Docs approved.
* time logging and optimisation
* skip redundant load
* more time logs and fix pre-load issues
* more detailed loading logs
* changed loading to be on demand from cursor nav
* fix missing variant icon fallback
* removing redundant time logs and code touchup
* code cleanup
* Comments so developer doesn't get bugged about garbage collecton
* remove logs n stuff
* lang settings touchup and final touchup plus uploading blank egg summary bg
* fix nits, js imports, extra docs, magic numbers changed
* extra docs and spacing nits
* Update Github
---------
Co-authored-by: James Diefenbach <z5421232@ad.unsw.edu.au>
Co-authored-by: Frederico Santos <frederico.f.santos@tecnico.ulisboa.pt>
Co-authored-by: frutescens <info@laptop>
Co-authored-by: Mumble <171087428+frutescens@users.noreply.github.com>
* [Bug] Fix reloads causing RNG inconsistencies
* Minor revisions
* Allow reload helper to directly access getSessionSaveData()
* Changed Moody and Acupressure to use seeded RNG
* Fix broken unit test
* [Bug] Fix eggs having exploitable RNG
* Fix Wind Rider test having random chance to fail
* Revert egg's ID back to its own unseeded generation
* Remove change from wind rider test
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Mumble <171087428+frutescens@users.noreply.github.com>
* Create Getters, Setters, and Types
* Work on `pokemon.ts`
* Adjust Types, Refactor `White Herb` Modifier
* Migrate `TempBattleStat` Usage
* Refactor `PokemonBaseStatModifier` Slightly
* Remove `BattleStat`, Use "Stat Stages" & New Names
* Address Phase `integers`
* Finalize `BattleStat` Removal
* Address Minor Manual NITs
* Apply Own Review Suggestions
* Fix Syntax Error
* Add Docs
* Overhaul X Items
* Implement Guard and Power Split with Unit Tests
* Add Several Unit Tests and Fixes
* Implement Speed Swap with Unit Tests
* Fix Keys in Summary Menu
* Fix Starf Berry Raising EVA and ACC
* Fix Contrary & Simple, Verify with Unit Tests
* Implement Power & Guard Swap with Unit Tests
* Add Move Effect Message to Speed Swap
* Add Move Effect Message to Power & Guard Split
* Add Localization Entries
* Adjust Last X Item Unit Test
* Overhaul X Items Unit Tests
* Finish Missing Docs
* Revamp Crit-Based Unit Tests & Dire Hit
* Address Initial NITs
* Apply NIT Batch
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
* Fix Moody Test
* Address Multiple Messages for `ProtectStatAbAttr`
* Change `ignoreOverride` to `bypassSummonData`
* Adjust Italian Localization
Co-authored-by: Niccolò <123510358+NicusPulcis@users.noreply.github.com>
* Fix Moody
---------
Co-authored-by: flx-sta <50131232+flx-sta@users.noreply.github.com>
Co-authored-by: Niccolò <123510358+NicusPulcis@users.noreply.github.com>
* Added Donate Link to Community Page
Removed the cookies from the html and added a Donations link on the community page (with guidance from Walker)
* Added Translation Key
* show passive name even if it is locked or disabled
* update passive label with updated new icons
* fix icon remains bug, when go start button and filterbar
* fix for [Bug] Moves That a Pokemon Knows and are not in their List of Learnable TMs Display as "Not Able" Rather than Learned #3930
* convert switch case block to if/elif/else
* [Localisation] [JA] trainer-classes.json
Names taken from Poke Corpus and Bulbapedia.
Some double team names do not exist in the official games so I created some new fitting/localised/funny ones (e.g. (solo) サイキッカー -> (double) サイキッ家)
As we are using Scarlet/Violet Kanji usage conventions, I decided to write all class titles that were Hiragana only in BW/B2W2 with Kanji instead.
* Translate trainer-names.json
Should we localise the names of Finn and Ivy?
Two possible ideas:
Finn -> チトセ (Finn may come from the "Whale Fin" snake plant; Latin Name Sansevieria Masoniana. The Sansevieria family is known as チトセラン属 in Japanese. チトセ(千歳 millenium;long time) can be a reference to endless loop of Classic Mode)
Ivy -> タイチ (Ivy -> IV. IV in Japanese is 固体値 (こたいち). タイチ also sounds like 対置 (opposition)
* Update trainer-classes.json
* Translate trainer-titles.json
* fix: Enable female gender for all default starters and all existing saves
* Fixed Fresh Start so it doesn't restrict gender
---------
Co-authored-by: Mumble <171087428+frutescens@users.noreply.github.com>
Co-authored-by: frutescens <info@laptop>
* I hope this is good enough
* renamed variable to better name
* Remove random newline
* When player is ready cool box
* Fixed cancel behavior
* standardized action/cancel behavior
* Added comments
---------
Co-authored-by: frutescens <info@laptop>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Double shiny odds
"anyone wanna double the base shiny odds for me" - damo, 2024
* Adjust Shiny Charm to compensate for increased base odds
* Remove magic number
* Update tsdoc and remove unneeded `console.log()`
* Clarify tsdoc
* Moves copied by Dancer should not consume PP
* Add test for Dancer (unfinished)
* Delete src/test/abilities/dancer.test.ts
This test is not finished lol
* Add test
* Translate tutorial.json via GitLocalize
* Translate challenges.json via GitLocalize
* Translate menu-ui-handler.json via GitLocalize
---------
Co-authored-by: José Ricardo <josefleury@discente.ufg.br>
* implement test for final boss encounter phase switch
* Update Eternatus tests & helper function
* fix endless_boss test following GameManager update
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Implement Tera Shell
* Apply suggestions from code review
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update src/data/ability.ts
Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>
* Add comments and fixed damage condition to `applyPreDefend`
* Fix speed tie breaking things in tera shell test
* Change deprecated `startBattle` calls
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>