13 Commits

Author SHA1 Message Date
Dean
1d7f916240
[Refactor] Align ability display with mainline (#5267)
* 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
2025-03-16 02:51:02 +00:00
Dean
b298138157
[Bug] Fix NG crash when ability is reactivated for a Pokemon off the field (#5478) 2025-03-11 03:20:00 +00:00
Dean
929392fe8b
[Bug] Fix #5358 Abilities that Redirect Moves Consider Move-Typings before Ability Modifiers (#5464) 2025-03-11 03:02:51 +00:00
Sirz Benjie
408b66f913
[Misc][Refactor][GitHub] Ditch eslint for biome, and add a formatter (#5495)
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2025-03-09 14:13:25 -07:00
Sirz Benjie
60a4db7059
[Refactor] Refactor moves.ts part 1 (#5420) 2025-03-07 19:10:29 -06:00
schmidtc1
7a9b1e5033
[Bug] Fix critical hits not bypassing screens (#5470) 2025-03-06 09:14:22 +00:00
NightKev
6595966478
[Misc] getPokemonSpecies() no longer accepts undefined (#5477) 2025-03-06 02:18:24 +00:00
Wlowscha
89e8085c39
[Bug] Display Pokémon name in Focus Punch lost focus message (#5448) 2025-02-28 23:22:51 -05:00
Dean
905fec92e9
[Bug] Fix Neutralizing Gas not Deactivating on Faint and Capture (#5423) 2025-02-26 22:39:08 +01:00
Esca
883bf45bc0
[Bug][Move] Shed Tail now rounds incurred damage up, not down (#5219)
* 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>
2025-02-26 00:45:29 -08:00
damocleas
92ee9d06ca
[Balance] February 2025 Passive/Egg Move/Cost Changes 2 #5416
* Update egg-moves.ts

* Update starters.ts cost changes

* Update passives.ts

* Update mystery-encounter-utils.test.ts
2025-02-25 23:02:04 -05:00
Dean
870bff0e6e
[Bug][Ability] Fix Neutralizing Gas interactions #5381
* 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
2025-02-25 18:38:17 -05:00
Sirz Benjie
a51a504155
[Test] Move test folder out of src (#5398)
* move test folder

* Update vitest files

* rename test/utils to test/testUtils

* Remove stray utils/gameManager

Got put back from a rebase
2025-02-22 22:52:07 -06:00