* Make type changing moves change type after abilities but before ion deluge/electrify
* Create unified test file for galvanize, pixilate, and refrigerate
* Make type boost items like silk scarf affect the move after its type change
* Add tests for type boost item interaction
* Remove leftover log messages
* Update spies in type-change ability tests
* Add automated tests for normalize
* Fix test name injection for tera blast
* Add automated test for tera blast normalize interaction
* Restore pokemon as a type-only import in moves.ts
* Add aerilate to type changing tests
* Rename galvanize test file
* Fix utils import
* Apply suggestions from code review
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Remove unnecessary mockRestore
* Remove unnecessary nullish coalescing
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update src/field/pokemon.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
---------
Co-authored-by: Madmadness65 <59298170+Madmadness65@users.noreply.github.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Added changes to markdown files, reworked test boilerplate code + comment fixes
* Update comments.md
Removed references to jsdoc.
Removed mention of @extends which doesn't even exist in tsdoc
Increased clarity of documenting `args` parameter.
Moved to using active voice instead of passive voice
* Fix truncated sentence in returns example
* fix create-test-boilerplate.js
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update gameManager.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update comments.md
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update gameManager.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update gameManager.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update gameManager.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update gameManager.ts
* Fixed doc thing
* Fixed the things
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Fixde boilerplate to use snake case
* Update .gitignore to include workspace files
* Update linting.md, fix lefthook etc.
* Fix tpyo
* Update create-test-boilerplate.js
Co-authored-by: Dean <69436131+emdeann@users.noreply.github.com>
* Update create-test-boilerplate.js
Co-authored-by: Dean <69436131+emdeann@users.noreply.github.com>
* Update create-test-boilerplate.js
Co-authored-by: Dean <69436131+emdeann@users.noreply.github.com>
* Reverted boilerplate code fixes and applied review comments
Will now be handled by milkmaiden
* Fixed up documentation for comments.md and linting.md
Comments.md added info pertaining to Kev's review
linting.md i just stopped spouting misinformation
* Update `biome.jsonc` comments
Update `comments.md`
Update docs for `AddSubstituteAttr` in `move.ts` to match example
* Apply suggestions to the suggestions
---------
Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Dean <69436131+emdeann@users.noreply.github.com>
* isCaught function in Dex now returns the correct result
* Removed log messages
* Added tests to check caught status of battle forms
* Update src/ui/pokedex-page-ui-handler.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Remove unneeded fields from src/ui/filter-text.ts
* Add setOverlayMode to phaseInterceptor
* initialize pokemon starters before running tests
* Add getWrappedText to mockText
* Add initial pokedex test
* Add test for wrapping cursor in pokedex view
* Make pokedex use getPassiveAbility instead of checking passive map
Allows for tests to mock passives
* Add test for filtering double ability combinations
* Add test for filtering by types
* Mark failing test as TODO
* Apply suggestions from code review
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Madmadness65 <59298170+Madmadness65@users.noreply.github.com>
* Use ts-expect-error instead of ts-ignore in comments
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Add save for pokedex tests
* Add test for filtering by cost reduction
* Add test for filtering by shiny
* Add tests for filtering by cost reductions
* Fix typo in test name
* Update test/ui/pokedex.test.ts
Co-authored-by: Wlowscha <54003515+Wlowscha@users.noreply.github.com>
* Update Mode import in pokedex test
* Replace reference to Mode with UiMode
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Madmadness65 <59298170+Madmadness65@users.noreply.github.com>
Co-authored-by: Wlowscha <54003515+Wlowscha@users.noreply.github.com>
* Moved SelectBiomePhase in front of NewBattlePhase
* disguise test now has to go to QuietFormChangePhase
---------
Co-authored-by: Jimmybald1 <147992650+IBBCalc@users.noreply.github.com>
* Fix type hint after enemy disappears
* Add automated test for type hint bugfix
* Make onField default to true
* Replace reference to Mode with UiMode and battleType with BattleStyle
* Extract Mode enum out of UI and into its own file
Reduces circular imports from 909 to 773
* Move around utility files
Reduces cyclical dependencies from 773 to 765
* Remove starterColors and bypassLogin from battle-scene
Reduces cyclical dependencies from 765 to 623
* Fix test runner error
* Update import for bypassLogin in test
* Update mocks for utils in tests
* Fix broken tests
* Update selectWithTera override
* Update path for utils in ab-attr.ts
* Update path for utils in ability-class.ts
* Fix utils import path in healer.test.ts
* Add isPartner method to trainer class
* Ensure force switches cannot pull pokemon from the wrong trainer
* Add override for battle type
* Fixup tests and broken assumptions
* Make move fail override semi-invuln check
Bandaid fix because move effect phase does not allow for the move to fail if all of its conditions fail
* Restore overrides
* Apply kev's suggestions from code review
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Fix illusion test battle type invocation
* Update struggle and healer tests to use battleStyle
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Add test for beak blast applying after user faints
* Rewrite tags for contact protected and check moveFlags.doesFlagEffectApply
* Add test to beak blast ensuring a long reach user does not get burned
* Re-add DamageProtectedTag to relevant inheritance chains
* Move resetSummonData to faintPhase instead of pokemon.apply
* Remove passing of grudge and destiny bond tags to faint phase
* sheer force #, sheer force and burning jealousy test fix, and move chance fixes
* removed order up sheer force interaction mention and test - updated comments
* remove electro shot from changes
* Updating tera starstorm targeting condition so that it is a spread move on the turn that terastallization happens
* added new unit tests to verify behavior of tera starstorm under non-tera conditions as well as on terastallization turns
* Move ability.ts to subfolder
* Extract types out of ability.ts
* Update imports in ability.ts and friends
* Cleanup imports in ability.ts
* Re-add imports lost during sort
* Update imports forgotten during rebase
* Re-import proper type from enums
* Update biome.jsonc
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Add commit to force tests to rerun
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Move LearnMoveSituation to its own file
* Remove unused selfStatLowerMoves array
* Move all-moves to its own file
* Move TurnMove interface to its own file
* move AiType to its own file
* Move PokemonMove to its own file
* Move DamageCalculationResult interface to its own file
* Move fieldPosition to its own file
* Move hit-result to its own file
* Move DamageResult to its own file
* Move SpeciesWildEvolutionDelay to its own file
* move EvolutionItem to its own file
* Move exp to its own masterlist, simplify initVariantData
* Update test/sprites/pokemonSprite.test.ts
* Extract loadPokemonVariantAssets out of BattleScene
* move variant.ts and update pokemon.loadAssets
* Add fuzzy matching for applying variant recolors
* Move glsl shaders to their own files
* Remove extra variants from shader masterlist
Their exp sprites have since been removed.
Co-authored-by: Unicorn_Power <189861924+Unicornpowerstar@users.noreply.github.com>
* Make exp sprite keys a set instead of an array
* Remove outdated exp sprite jsons
Co-authored-by: Unicorn_Power <189861924+Unicornpowerstar@users.noreply.github.com>
---------
Co-authored-by: Unicorn_Power <189861924+Unicornpowerstar@users.noreply.github.com>
* Add PostSummonHealAbAttr and give it to appropriate abilities
* Add attr to insomnia
* Remove attr from leaf guard (it does not activate on gain with sun up)
* Add tests and remove attr from shields down
* Add PostSummonRemoveBattlerTag and give it to oblivious and own tempo
* Add tests for oblivious and own tempo
* Fix oblivious test sometimes failing
* Remove Comatose changes as it doesn't reapply
* Remove unused tagRemoved field
* Fix tests checking status instead of tag
* Fix attr comments
* Add PostSetStatusHealStatusAbAttr
* Add ResetStatusPhase
* Modify pokemon.resetStatus to use ResetStatusPhase
* Move post status effects to ObtainStatusEffectPhase
* Ensure status overriding (ie rest) works properly
* Add PostApplyBattlerTagRemoveTagAbAttr for own tempo and oblivious
* Guard removeTag call in PostApplyBattlerTagRemoveTagAbAttr
* Commenting
* Handle Mold Breaker case in MoveEndPhase
* Remove PostSummonHealStatusAbAttr from purifying salt
* Fix not passing overrideStatus to canSetStatus
* Apply suggestions from code review
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Add isNullOrUndefined import
* Add canApply to new attrs
* Add followup argument back
* Remove guard around new MoveEndPhase
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Checks for hit result status on Grip Claw application
* Adds a boolean check for the Pollen Puff edge case in canBeMultiStrikeEnhanced
* Adds parental bond test
* Adds grip claw and multi lens tests
* Move trainer-config.ts
* move TeraAIMode enum to its own file
* Move TrainerPoolTier enum to its own file
* Move TrainerSlot enum to its own file
* Reorder and group imports
* Move TrainerPartyTemplate to its own file
* Remove speciesPoolPerEvilTeamAdmin method
* Apply kev's suggestions from code review
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Fix typo in zinzolin's name
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Reuse global scene between tests
Co-authored-by: PigeonBar <56974298+PigeonBar@users.noreply.github.com>
* Add missing each method to mockContainer
* Fix select-modifier-phase test
* Sanitize overrides before tests
Co-authored-by: PigeonBar <56974298+PigeonBar@users.noreply.github.com>
* Sanitize overrides before tests
Co-authored-by: PigeonBar <56974298+PigeonBar@users.noreply.github.com>
* [WIP] fix things
* Fix tests not working with --no-isolate
* Update npm tests to use no isolate
* Update test-shard-template
* Update package.json
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
---------
Co-authored-by: PigeonBar <56974298+PigeonBar@users.noreply.github.com>
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update splash-messages.ts 1
* Add Pokemon name splash text
This will display a random Pokemon's name, followed by an exclamation point (ex. "Bulbasaur!").
* Make Pokemon name splash message weighted
* Update splash-messages.ts
* Update splash-messages.ts
* fix trailing spaces
* Update splash-messages.ts
* Update splash-messages.ts
* Add splashes which use random Pokemon
* Update splash message tests
* Update splash-messages.ts
* Update splash-messages.ts
* Missing comma
* Fix length on test
It even says to do so whenever weight multipliers are adjusted...
* Update splash-messages.ts
* add missing prefix thing
* adjusted comment in splash_messages.test.ts
* Update splash-messages.ts
* fix blank line
* Add gender splash message code
This makes the specific April Fools splash message functional.
Also fixed a linter issue with the randomPokemon code.
* Update title-ui-handler.ts changed battles won fallback number to -1
* Update splash-messages.ts
* changed afd to 2 days
* Update splash_messages.test.ts
* Update src/data/splash-messages.ts
Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>
---------
Co-authored-by: Madmadness65 <blaze.the.fireman@gmail.com>
Co-authored-by: Madmadness65 <59298170+Madmadness65@users.noreply.github.com>
Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>
* Create new turnData field for tracking damageResults, check for HitResult in Reviver Seed modifier
* Optional chaining for cases like stealth rock
* Adds HitResult.SELF for confusion to distinguish from indirect damage
* Adds HitResult.SELF to damage sound effect switch
* Cover edge case of salt cure, insert HitResult for ALL damage regardless of optional variable
* Change Liquid Ooze HitResult to OTHER from HEAL
* Adjust OHKO moves to not bypass endure or RSeed
* Add tests for reviver seed
* Fixes endure to no longer block indirect damage, updates weather damage to be HitResult.OTHER, adds/fixes unit test
* Change destiny bond to HitResult.OTHER so it doesn't trigger rseed
* Adds destiny bond unit test
* Creates additional unit tests for endure
* Rename SELF hitresult to CONFUSION
* Update CONFUSION enum
* Refactors implementation per Wlowscha's suggestions: removes damageSources array and preventEndure variable
* Rename HitResult.OTHER to INDIRECT, create INDIRECT_KO for PSong/DBond, add functionality for INDIRECT_KO to damageanim/number handler
* Fixes hit result for stealth rock
* Removes unnecessary check, makes DamageResult default to EFFECTIVE, updates remaining damageAndUpdate calls to use INDIRECT
* Refactors damageAndUpdate to replace optional parameters with object parameter
* Fixes based on Kev's suggestions
* Updates tsdocs for damageAndUpdate
* Fix merge conflict
---------
Co-authored-by: Wlowscha <54003515+Wlowscha@users.noreply.github.com>