2 Commits

Author SHA1 Message Date
Sirz Benjie
54ce58411b
[Bug] Fix forced switch bugs in enemy partner trainer battles (#5644)
* 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>
2025-04-18 09:35:46 +00:00
Dean
31835e6d53
[Bug] Fix #4972 Status-Prevention Abilities do not Cure Status (#5406)
* 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>
2025-04-07 16:32:10 -07:00