* TS: enable strict-null
* fix battle-scene.ts
* fix voucher.ts
* adapt more files to strict-null
* adapt more files to strict-null ( 2)
* adapt ability.ts to strict-null
* adapt `arena.ts` to strict-null
* adapt TagAddedEvent constructor to strict-null
* adapt phases.ts.to strict-null
* adapt status-effect.ts to strict-null
* adapt `account.ts` to strict-null
* adapt `configHandler.ts` to strict-null
* adapt `ability.ts` to strict-null
* adapt `biomes.ts` to strict-null
* adapt `challenge.ts` to strict-null
* adapt `daily-run.ts` to strict-null
* adapt `nature.ts` to strict-null
* adapt `pokemon-forms.ts` to strict-null
* adapt `tainer-names.ts` to strict-null
* adapt `types.ts` to strict-null
* adapt `weather.ts` to strict-null
* adapt `egg-hatch-phase.ts` to strict-null
* adapt `evolution-phase.ts` to strict-null
* adapt `pokemon-sprite-sparkle-handler.ts` to strict-null
* adapt `evolution-phase.ts` to strict-null
* adapt `game-mode.ts` to strict-null
* adapt `utils.ts` to strict-null
* adapt `voucher-ui-handler.ts` to strict-null
* adapt `src/ui/unavailable-modal-ui-handler.ts` to strict-null
* adapt `src/ui/ui.ts` to strict-null
* adapt `src/ui/ui-theme.ts` to strict-null
* adapt `src/ui/title-ui-handler.ts` to strict-null
* adapt `src/ui/time-of-day-widget.ts` to strict-null
* adapt `src/ui/text.ts` to strict-null
* adapt `src/ui/target-select-ui-handler.ts` to strict-null
* adapt `src/ui/settings/settings-keyboard-ui-handler.ts` to strict-null
* adapt more files to strict-null (3)
* adapt more files to strict-null (4)
* adapt more files (mostly tests) to strict-null (5)
* adapt more files to strict-null (6)
* adapt more files to strict-null (7)
* Update `src/data/pokemon-evolutions.ts` for strict-null
Partial update `src/data/pokemon-species.ts` for strict-null
* adapt more files to strict-null (8)
* adapt more files to strict-null (9)
* Strict some more nulls (still a few errors remaining)
* adapt rest of the files to strict-null (9)
* fix tests (check for null instead of undefined)
* repalce a lot of `??` with bangs
And added TODO notice as usual
* fix more tests
* all tests pass now
* fix broken game-loop after trainer battle
add some console.warn for missing cases and falling back to default
* remove guessed fallback from utils.rgbHexToRgba
* add TODO for this.currentBattle = null
* adjust getPokemonById() return to include `null`
* fix compilation errors
* add test for pokemon.trySetStatus
* `chanceMultiplier` shouldn't be optional
* allow `null` for currentPhase
* adjust hasExpSprite logic for no keymatch found
* reduce bang usage in account.updateUserInfo()
* fix new strict-null issues after merge
* fix `strict-null` issues in dropdown.ts
and sand_spit.test.ts
* fix egg-gacha
* adapt gul_missile.test.ts to strict-null
* fix move.ts strict-null
* fix i18n.ts strict-null
* fix strict-null issues
* fix baton_pass test
after accidentially breaking it
* chore: fix compiler errors
* revert accidential changes in baton_pass.test.ts
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Hardcoded Pokemon should have proper names
* Add evil admin placeholder images
* Add admin names to locale files
* Add evil team admin dialogue
* current things.
* rename
* team galactic wants to be special
* Revert debug changes
* Added Trainer Names and Titles
* [Hotfix] Fix interactions of some moves not changing types (#3183)
* [Hotfix] Fix wild spawns not having their HA (#3190)
* Add evil admin placeholder images
* Add admin names to locale files
* Add evil team admin dialogue
* Added new sprites
* Make simple admin trainer pools
* Add Korean localization
* Revert this
* [Feature] Named Evil Team Admins
* Dateien removed
* Revert override
* French only needs one pair of evil team bosses :)
* Some things Temp Mentioned in the PR
* Removed NoDuplicates again...Because it only works on the speciality pool....
Also reordered the second admin wave. So we guarantee it is never the same one
* German dialogue
* Offset
* Jördis just better
* Credit for the artists (see https://www.deviantart.com/icejkai/art/Magma-Admin-Courtney-Trainer-Sprite-544510574)
* Order
* Added tsdoc and named it more clear
* Fixed formatting and made it a void function
* Changed offset to number and updated tsdoch
* Improve readability
* Removed extra lines
* Fix this
* Revert override
* colress gets his own pool because @blitzy wants it (and i agree)
* Added Rood (some plasma sage guy)
* has voucher is not false by default. So only it will be set true for evil team leaders, gym leaders, elite 4 and champions
* Apply suggestions from code review
Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>
Co-authored-by: returntoice <dieandbecome@gmail.com>
* Added the localization also to japanese
* Update src/locales/ko/trainers.ts
Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com>
* CA
* Removed Colress
* Colress Last Stand
---------
Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>
Co-authored-by: returntoice <dieandbecome@gmail.com>
Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com>
* Add helper function to modify the turn order for tests
* Replace manual speed modification with new helper function
* Replace `vi.spyOn()` instances with helper function
* prevent double-application of status contact abilities and switch out abilities
* use SwitchPhase for ForceSwitchOutAbAttr instead of switchOut()
* add tests for baton pass/uturn
* PR comments
* Update src/test/moves/baton_pass.test.ts
* add test for forced switch after mutual KO + revive
* tweak condition to fix uturn/baton pass
* improve docs
* style/typo nits from CR
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* CR feedback
* use doSelectPartyPokemon + rename
* int -> number
Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>
* Update fonts
* Add locales/ja files
* Add some more files
* Add more ui stuff
* Fix failing typescript doc being generated
* Add the 4 ui handlers
* Add i18n.ts
* Try something in text.ts
* Fix some more errors
* Add ja type icons
* Add missed message keys
* Update src/plugins/i18n.ts
Co-authored-by: Enoch <enoch.jwsong@gmail.com>
* Update src/ui/text.ts
Co-authored-by: Enoch <enoch.jwsong@gmail.com>
* Update src/plugins/i18n.ts
Co-authored-by: Enoch <enoch.jwsong@gmail.com>
* Apply TLs from xsn34kzx
Co-authored-by: Amani H. <109637146+xsn34kzx@users.noreply.github.com>
* Translate essential text (move, ability descriptions)
* Translate missed move/ability
* Translated battle.ts
- All phrases are taken from USUM script via Poké Corpus https://abcboy101.github.io/poke-corpus/
(I used the USUM script because it is in hiragana/katakana. If we decide to change these phrases to Kanji later, I will refer to the SV script to modify them again.)
-
* Update battle.ts
* Update battle.ts
* Update src/locales/ja/battle.ts
Co-authored-by: Enoch <enoch.jwsong@gmail.com>
* Update battle.ts
---------
Co-authored-by: EnochG1 <enoch.jwsong@gmail.com>
Co-authored-by: Amani H. <109637146+xsn34kzx@users.noreply.github.com>
Co-authored-by: Chapybara-jp <charlie.beer@hotmail.com>
* implement gulp missile
* add tests
* change fly to dive
* show ability when reverting to normal form
* update ai score, tests
* update score condition
* adjust conditions, damage
* add underwater test
* update damage in test
* partial commit
* apply offset to all hybrid filter
* make dropDownType to public for offsetHybridFilter function
* refactoring defaultSettings to additional suport default cursor.
* fix to remember last cursor on hover mode
* remove unnecessary reset code
* fix sort reset function
* update resetFilter function
* update requested changes
* remove log msg
* fix checking default on sort
* refactoring hasDefaultValues function for readability
* fix lastdir bug
* [filter-ui] Improvements to starter selection and filtering user experience
Original messages of 14 squashed commits:
* final cleanup and code comments
* automatically go to the list of starters when closing filters
* FilterBar cleanup. Associate each DropDown with an id and access them through it
* reset all filters when creating a new game. Set different default gen filter for challenge mode
* start of code cleanup plus some documentation
* fix filter bar label coloring for legacy theme
* change generation filter default values to be all generations selected
* fix navigation between team and filtered Pokemon
* add missing localisation keys
* first pass at improving navigation between the UI elements
* have each filter group handle its default values instead of the filter bar
* revamp dropdown class. add possibility to display both a sprite and text label at the same time
* groundwork to be able to move around starter ui elements more easily
* add hybrid filtering type for Gen and Type filters, clean up implementation for radial type
* [loc][ko][zh] localisation of starter ui filters for Chinese and Korean
Co-authored-by: Enoch <enoch.jwsong@gmail.com>
Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com>
* [loc][de] German translations for the filters
Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>
---------
Co-authored-by: Enoch <enoch.jwsong@gmail.com>
Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com>
Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>
* [Hotfix] Fix interactions of some moves not changing types (#3183)
* [Hotfix] Fix wild spawns not having their HA (#3190)
* Add evil admin placeholder images
* Add admin names to locale files
* Add evil team admin dialogue
* Added new sprites
* Make simple admin trainer pools
* Add Korean localization
* Increase evil boss money multiplier from 2.25 to 2.5
---------
Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* add confirmExit popup
* add translation entries for `confirmExit`
* Update src/ui/starter-select-ui-handler.ts
Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>
---------
Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>
* added revive function in gamaManager & a double-battle test
* extended timeout of double battle test referencing to battle test
* less code, deleted unused param, clearer description of test
* add back dbond to move in test
* more straight forward testing
* reverse back override
* polish double battle test a bit
* [Hotfix] Fix interactions of some moves not changing types (#3183)
* [Hotfix] Fix wild spawns not having their HA (#3190)
* Fix some cases of wrong affixes
* There are two trainer send out messages
---------
Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Create enemy-ai.md
* Finish enemy-ai doc
* Fix outspeed logic + document enemy command functions
* Fix errors in target score formula
* Add example section and implementation guidelines
* Add info on matchup score range
* Fix GitHub rendering issues (maybe)
* Add types to function comments
* Trying to fix GitHub rendering issues again
* Use images for "cases" equations instead
Mirror of PR #1333. Thanks to 0zuzu (https://github.com/0zuzu) for providing the original fix.
Co-authored-by: 0zuzu <63069680+0zuzu@users.noreply.github.com>
* Basic version of code for updating party ui name to be red when at max stack
* Updated text to be red when pokemon is at max stack
* Removed some comments and fixed a private property issue
* Fixed a const instead of a let statement, and added some comments on the logic
* Accidentally broke last commit. Intentionally fixed this commit
* Updated the code to not have red text for pokemon name as that was too confusing with fainted pokemon. Now the party slot has a descriptor label which can be used to set the text to show if the pokemon is able/not able to receive the transfer items
* Updated transfer logic to use new isTransferrable property instead of getTransferrable method and merged with latest