* 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>
* Properly handle cases where enemy switches in due to revival
* Fix user ally using move when revived
* Move revival blessing function to move.ts
* Properly filter for the right switch phase to remove
* Re-add bug fix
* Add test
* [BUG] fixes#5472 - transform on reload
* Fix the bug where transformed pokemon failed to load sprite on reload if it was not the base form
* Now properly loads the transformed sprite assets during summon phase
* Stop ShowAbilityPhase from ending until the bar has popped out
* Remove ability bar hiding from messagePhase
* Remove abilityBar reference from base Phase class
* Add HideAbilityPhase to hide ability bar after effects
* Add willSucceed to ability attrs
* Update AbAttrs and PostInitAbAttrs
* Update PreDefendAbAttrs
* Update postDefend, postMoveUsed, StatStage, postSetStatus, and PostDamage
* Update preAttack and fieldStat
* Partially implement postAttack
* Finish PostAttack
* Update PostSummon
* Update PreSwitchOut
* Update preStatStageChange
* Update PostStatStageChange, PreSetStatus, PreApplyBattlerTag
* Update postTurn and preWeatherEffect
* Update postWeatherChange
* Update postWeatherChange
* Update PostTerrainChange
* Update CheckTrapped and PostBattle
* Update postFaint
* Update PostItemLost
* Bug fixes from test cases
* Fix intimidate display
* Stop trace from displaying itself
* Rename to canApply
* Fix ability displays using getTriggerMessage
* Ensure abilities which are mistakenly shown are still hidden
* Fix ability bar showing the wrong ability with imposter
* Add canApply for imposter
* Update abilities using promises and `trySet...` functions
* Committing overrides changes is bad
* Document apply and canApply
* Update PreLeaveFieldAbAttr
* Remove boolean return type apply functions
* Remove redundant assignment
* Remove ability display from abilities that shouldn't have it
* Move queueAbilityDisplay to battlescene
* Remove unused shown variable
* Minor changes
* Fix using id instead of battlerindex in queueAbilityDisplay
* Fix PostBattleInitFormChangeAbAttr displaying
* Prevent crashes in case an ability for a pokemon not on the field is shown
* Stop more abilities from displaying
* Move enemy ability bar to the right side
* Automatically reload bar if shown while already out, fix specific abilities
* Remove duplicate call to clearPhaseQueueSplice
* Remove ShowAbilityPhase import from ability.ts
* Update PostDefendTypeChangeAbAttr to use PokemonType
* Update PostSummonAddArenaTagAbAttr
* Minor changes
* Shed Tail rounds incurred damage up
* Altered Substitute/Shed Tail success condition to account for rounding up
* Altered the test to match correct functionality
* Update src/data/move.ts
Removed default value in constructor due to it having become redundant
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
Co-authored-by: Sirz Benjie <142067137+SirzBenjie@users.noreply.github.com>
* Add neutralizing gas arena tag
* Add PostSummonAddArenaTagAbAttr
* Add PreLeaveField attr for neutralizing gas
* Remove old SuppressFieldAbilitiesAttr
* Fix ability suppression logic
* Add basic tests
* Reapply onGain abilities when neutralizing gas ends
* Untodo ability remval test
* Add more tests
* Modify gastro acid to call onLose attributes when suppressing
* Properly cancel abilities on switch in
* Add documentation
* Remove partial designation
* Update locale key usage
* Reactivate the last source's other abilities when it becomes the last remaining
* Fix loop vars
* Add access modifiers for SuppressAbilitiesTag
* Minor changes
* Move test to reflect new location
* Remove promises from abattr function signatures