DoBattlerEndTurnEffects and DoFieldEndTurnEffects need to be rewritten to better reflect later gens
Opened this issue · 3 comments
Description
As discussed, currently the end-turn resolution order is not cartridge accurate.
- Should loop through each active battler for each "
ENDTURN
" case ("by-state-each-battler order") - Some of the effects are also out of order
A detailed table of end-turn resolution order, with sources, combining USUM and SwSh research can be found here: BluRosie/hg-engine#199
Version
master (default, unreleased bugfixes)
Upcoming/master Version
Discord contact info
___aero___
This is also relevant to the start of turn effects, an example is #5016 which affects for example if Ditto with Imposter will transform into Normal or Terastal form Terapagos.
I didn't make a table for that, here's a Bulbapedia article instead: User:FIQ/Turn sequence
A C implementation for reference: SwitchInAbilityCheck
#5025 Should fix the first issue.
Also I looked at the second one and this will need a refactor and ideally combines DoFieldEndTurnEffects
DoBattlerEndTurnEffects
. I'm doing something else right now so for anyone who wants to work on it feel free to do it. Otherwise I'll do it sometime in the future.