Skip to content

[Warlock] Add Unstable Affliction stack remains expression - #11643

Merged
nyterage merged 1 commit into
simulationcraft:midnightfrom
millanzarreta:wl-ua-add-stack-remains
Jul 29, 2026
Merged

[Warlock] Add Unstable Affliction stack remains expression#11643
nyterage merged 1 commit into
simulationcraft:midnightfrom
millanzarreta:wl-ua-add-stack-remains

Conversation

@millanzarreta

Copy link
Copy Markdown
Contributor

Unstable Affliction (UA) applications have independent 8-second-duration application stacks, and the module has special handling to manage the correct decrement of those stacks. While the existing dot.unstable_affliction.stack expression returns the current number of stacks and dot.unstable_affliction.remains returns the time until the complete DoT expires, there was no way for the APL to determine when individual stacks would expire or when the target would fall below a specific number of stacks.

This PR adds the following target-specific expressions:

  • dot.unstable_affliction.stack_remains.N: Returns the time remaining before the target falls below N Unstable Affliction stacks, or 0 if the target already has fewer than N stacks.
  • dot.unstable_affliction.stack_remains.current: Returns the time remaining before the target loses its next UA stack, or 0 if UA is not active.

For example, with 5 active UA stacks:

  • dot.unstable_affliction.stack_remains.5 returns the time until the first stack expires and the target drops to 4 stacks.
  • dot.unstable_affliction.stack_remains.3 returns the time until the third stack expires and the target drops below 3 stacks.
  • dot.unstable_affliction.stack_remains.1 returns the time until the final stack expires.
  • dot.unstable_affliction.stack_remains.current is equivalent to dot.unstable_affliction.stack_remains.5 in this case and always returns the time until the next stack expires.

The numeric argument must be a positive integer no greater than 99, the current maximum number of Unstable Affliction stacks.

To support these expressions, the independent stack expiration events are now tracked per target. These events are stored in application order, which is also their expiration order because every Unstable Affliction application has the same duration. Each event is removed from the tracking list when it executes, and the list is cleared when the Unstable Affliction DoT expires, is canceled, or the target data is reset.

Stack expiration events invalidated by a previous Unstable Affliction expiration or cancellation are ignored. This prevents an old event from decrementing the stacks of a later Unstable Affliction application on the same target.

The expressions use the action's current expression target, allowing them to work correctly with target-specific APL behavior such as target_if and cycle_targets.

@nyterage
nyterage merged commit b75c764 into simulationcraft:midnight Jul 29, 2026
28 checks passed
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