Skip to content

[Rogue] adjust fatebound delayed coinflip resolution timing#11430

Open
seanpeters86 wants to merge 3 commits intomidnightfrom
rogue-fatebound-flips
Open

[Rogue] adjust fatebound delayed coinflip resolution timing#11430
seanpeters86 wants to merge 3 commits intomidnightfrom
rogue-fatebound-flips

Conversation

@seanpeters86
Copy link
Copy Markdown
Member

@seanpeters86 seanpeters86 commented May 2, 2026

Summary

This fixes Fatebound coinflip timing for delayed flips.

Previously, delayed Hand of Fate flips could resolve using stale pre-queue state, which caused multi-flip chains like Overflowing Purse to evaluate from the wrong streak context. Coinflip side effects like Rush to the Inevitable energy gain and Lucky Coin progress could also be applied when the flip was scheduled rather than when it actually resolved.

Changes

  • Defer Hand of Fate coin result selection until the delayed event executes
  • Resolve delayed multi-flip chains from current Fatebound state instead of queued state
  • Move Fatebound coin side effects to flip resolution time
  • Add a target-based delayed coinflip path so delayed flips do not depend on action_state lifetime

Behavior impact

  • Overflowing Purse delayed flips now evolve from earlier flip outcomes correctly
  • Rush to the Inevitable and Lucky Coin progression now line up with actual coin resolution timing
  • Immediate flips continue to behave the same apart from using the shared resolution path

Validation

  • Checked engine/class_modules/sc_rogue.cpp for diagnostics: no errors
  • Ran a debug sim and verified that delayed Tails flips now resolve at their delayed timestamp and use updated streak state

External log validation

Cross-referenced against a live Fatebound Rogue log (Imperator Averzian Mythic):

Delayed chain timingRush to the Inevitable energy events show repeated pairs separated by ~250–300ms, consistent with separate delayed event resolutions rather than a single precomputed burst:

  • 00:45.632 and 00:45.929
  • 01:05.601 and 01:05.934
  • 03:07.859 and 03:08.112

Buff state changes between paired eventsFatebound Coin (Heads) aura log and Fatebound Coin (Tails) aura log show streak state actively changing within those delayed windows:

  • At 00:45: Heads removed 00:45.632 → Tails applied 00:45.659, Tails stack[2] 00:45.955
  • At 01:05: Heads removed 01:05.601 → Tails applied 01:05.636, stacking to [3] by 01:06.314
  • At 03:07: Heads removed 03:07.859 → Tails applied 03:07.887, Tails stack[2] 03:08.136

This confirms that the inputs to the equal-stacks check (L8037) and current-side derivation (L8066) differ meaningfully between chained delayed resolutions in real gameplay, validating that evaluating these at execution time rather than queue time produces correct results.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts Fatebound (Rogue) delayed Hand of Fate coinflip behavior so coin result selection and associated side effects are evaluated at delayed event execution time (instead of at queue time), preventing stale streak context during multi-flip chains.

Changes:

  • Defers Hand of Fate coin result selection until the delayed event executes, so streak/bias is based on current buff state.
  • Extracts coinflip resolution side effects into a shared resolve_fatebound_coinflip() path and adds a target-based delayed trigger overload.
  • Updates delayed multi-flip chaining (e.g., Controlled Chaos follow-up flips) to schedule off the execution-time context.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread engine/class_modules/sc_rogue.cpp Outdated
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