* [WIP] Refactor ability attribute apply args
* [WIP] update ability signatures
* Update callsites in pokemon.ts
* Update callsites in moves.ts
* Update abattr callsites in move-phase
* Update abattr callsites in battler-tags
Also removed stat drop ability application from cancelling ME stat boost effects
* format with biome and remove cancelled from weather lapse
* Update abattr callsites in MEP
* Update callsites in turn-start-phase
* Update abAttr callsites in misc phases
* Remove latent test functionality
* update ability attribute callsite in shield dust test
* update abattr callsite in winstrate challenge encounter
* Fix some tests to mock proper methods
* Remove improper condition in mimicry's ability application
* Fix improper simulated check in moody's apply method
* Pass source to postApplyDamage in pokemon.ts
* [wip] fix cud chew tests
* Make cud chew consumption not subclass postTurnAbAttr
* Fix regression in flower veil
* Update trySetStatus test in pokemon to respect new return value for undefined
* Remove empty, unused file
* Fix blockCrit method broken in merge
* Fix unnecessary attr type cast in move phase
* Address typing issue in safeguard test
* Improve documentation and get rid of ts-expect-error directive
* Minor comment/TSDoc updates and fixes
* Apply suggestions from code review
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>
https://github.com/pagefaultgames/pokerogue/pull/5932
* Fixed modifier code, removed instances of "0 ID = no mon"
* corrected casing + dejanked seed tag
* Added test file, added overload to `findModifier` if given type predicate
* fixed test
* Revert predicate stuff for now
going in separate PR
* Fix id check syrup bomb test
Wasn't running phase due to being a turn end effect
* [WIP] Changed test to use destiny bond as proper regression
* Removed `instant` and `ignoreUpdate` parameters from `tryTransferHeldItemModifier`; fixed post-battle loot code to _not_ break type safety
* Fixed up tests
* Reverted unneeded changes
* Removed outdated modifier test
* Fix import
* Apply Biome
* Update battler-tags.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update battler-tags.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update arena-tag.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Update arena-tag.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Add abilityAttr.is methods
* [WIP] move modifier stuff around
* Untangle circular deps from modifiers
* Move unlockables to own file
* Untangle all circular deps outside of MEs
* Move constants in MEs to their own files
* Re-add missing import to battle.ts
* Add necessary overload for getTag
* Add missing type import in weather.ts
* Init modifier types and pools in loading-scene
* Remove stray commented code
* Apply kev's suggestions from code review
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Move game-mode to its own file
Reduces circular imports to 325
* Move battler-index to own file
Reduces circular deps to 314
* Move trainer-variant to own file
Reduces circ deps to 313
* Move enums in pokemon to their own file
* Move arena-tag-type to its own file
* Move pokemon-moves to its own file
* Move command to own file
* Move learnMoveType to own file
* Move form change item to own file
* Move battlerTagLapseType to own file
* Move anim enums to own shared file
* Move enums out of challenges
* Move species form change triggers to own file
Reduces circ imports to 291
* Update test importing pokemon move
* Replace move attribute imports with string names
* Untangle circular deps from game data
* Fix missing string call in switch summon phase
* Apply kev's suggestions from code review
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Ensure ChargeMove's is method calls super
* Use InstanceType for proper narrowing
* Apply kev's suggestions from code review
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
---------
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
* Rename `Abilities` to `AbilityId`
* Rename `abilities.ts` to `ability-id.ts`
* Rename `Moves` to `MoveId`
* Rename `moves.ts` to `move-id.ts`
* Rename `Species` to `SpeciesId`
* Rename `species.ts` to `species-id.ts`
* Rename `Biome` to `BiomeId`
* Rename `biome.ts` to `biome-id.ts`
* Replace `Abilities` with `AbilityId` in comments
* Replace `Biome` with `BiomeId` in comments
* Replace `Moves` with `MoveId` in comments
* Replace `Species` with `SpeciesId` in comments
* 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>
* 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