Skip to content

Fix macro replay after auto-yield input flow changes#10930

Open
Madwand99 wants to merge 5 commits into
Card-Forge:masterfrom
Madwand99:MacroReplayReliability
Open

Fix macro replay after auto-yield input flow changes#10930
Madwand99 wants to merge 5 commits into
Card-Forge:masterfrom
Madwand99:MacroReplayReliability

Conversation

@Madwand99

Copy link
Copy Markdown
Contributor

This PR updates macro replay to work with the newer input flow introduced around auto-yield changes in #10606.

After those changes, the macro system could no longer assume that recorded actions would be replayed against the same simple prompt sequence as before. In practice, replay could stall or drift when prompts appeared between recorded actions, especially around:

  • pass priority across phase/stack changes
  • simultaneous triggered ability ordering
  • target/list selection prompts
  • optional confirm/decline prompts
  • mana payment prompts and recorded mana-source selections

Without adapting to those input-flow changes, recorded macros can fail even when the original sequence is still legal and repeatable.

The main change is that replay now treats recorded actions as choices that may need to wait for, skip past, or satisfy the current GUI input prompt. RecordActionsMacroSystem keeps the macro sequencing/retry logic, while MacroActionReplayer handles GUI-specific replay of individual recorded actions against the current Input type.

This work was split off from the Macro Window UI work (#10746) so the replay compatibility fixes can be reviewed on their own.

Comment thread forge-game/src/main/java/forge/game/player/actions/PassPriorityAction.java Outdated
@tool4ever

Copy link
Copy Markdown
Contributor

I'm not convinced trying to solve this with somewhat convoluted heuristics is a good direction:
can't you simply suppress yield suggestions or anything else that messes replay up during it? I can't really think of a reasonable use case that's worth attempting to include auto-pass as part of a macro sequence...

@Madwand99

Copy link
Copy Markdown
Contributor Author

I've changed the PR to suppress auto-yield behavior during recording/replay. This just leaves the numerous miscellaneous improvements to replay handling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants