Script_RunImmediatelyUntilEffect runs a script until either a specified
effect may occur or it reaches an end.
All existing script commands and natives, and some specials, call
Script_RequestEffects which allows us to analyze them.
Any downstream script commands/natives/specials will be statically known
not to call Script_RequestEffects and treated as if they have all
effects. Manually tagging them with requests_effects=1 and calling
Script_RequestEffects will make them analyzable.
Using these, we're able to execute scripts until they either exit with
no effect, or would possibly have an effect. This allows us to:
1. Not run on frame map scripts or triggers if they would have no
effect.
2. Immediately run triggers if they only affect flags/vars. This removes
the lag frames when biking into the Cycling Road, for example.
3. Migrate on load/on transition/on resume/on return to field/on dive
warp scripts onto the global script context if they would block
(approximated via SCREFF_HARDWARE).
4. Support arbitrary control flow in trainer scripts. The trainer does
not see the player if the script has no effect, and the trainer will
use whichever trainerbattle command is branched to.
5. Support arbitrary scripts in trainer scripts. cant_see and
cant_see_if_* commands have been introduced so that scripts are able
to do something when the player interacts with the trainer even if
that trainer wouldn't see them.
* Check progress in non-battle PARAMETRIZEd tests
* Overworld Script Tests
* Backward-compatible BoxPokemon Refactor
Reuses space that contains zeros to provide space for:
- HP/status in the box
- 12-character nicknames
- Up to 63 PokéBalls
- Shininess separate from PID
- Hidden Nature
- Hyper Training
- Dynamax Level
- Gigantamax Factor
- Terastallization Types
- Shadow
Implements:
- OW_PC_HEAL to switch between Gen7- and Gen8+ behavior
- Nature Mints
- Dynamax Candy
- Hyper Training commands (canhypertrain/hypertrain)
- Gigantamax Factor commands (hasgigantamaxfactor/togglegigantamaxfactor)
- Terastallization Type on the summary screen
- Prevents Gigantamax Factor Pokémon from evolving into a species without a Gigantamax form
* fixup! Backward-compatible BoxPokemon Refactor
* displaydexinfo fix from Jasper