Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arbitrary trainer scripts + on frame/trigger softlock prevention #5033

Draft
wants to merge 9 commits into
base: upcoming
Choose a base branch
from

Commits on Jul 25, 2024

  1. Arbitrary trainer scripts + on frame/trigger softlock prevention

    Script_HasNoEffect returns TRUE if the script definitely has no player-
    visible effect, or FALSE if it may/does have a player-visible effect.
    
    Opcodes have been manually tagged with whether they abort if they would
    have a player-visible effect, and the natives and specials have been
    manually tagged with whether they definitely have no player-visible
    effect or not.
    
    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. 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.
    3. 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.
    mrgriffin committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    1eb51c4 View commit details
    Browse the repository at this point in the history
  2. Address Jasper's review

    mrgriffin committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    525d2a7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4315fae View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d2f5e3c View commit details
    Browse the repository at this point in the history
  5. Address Salem's review

    mrgriffin committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    7f7ba91 View commit details
    Browse the repository at this point in the history

Commits on Jul 26, 2024

  1. Configuration menu
    Copy the full SHA
    47be8d4 View commit details
    Browse the repository at this point in the history
  2. Address Egg's review

    mrgriffin committed Jul 26, 2024
    Configuration menu
    Copy the full SHA
    1a8d4b6 View commit details
    Browse the repository at this point in the history
  3. fixup! Address Egg's review

    mrgriffin committed Jul 26, 2024
    Configuration menu
    Copy the full SHA
    dbb61e8 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    937d4a4 View commit details
    Browse the repository at this point in the history