Skip to content

fix(buff_state): QueueLogic overflow replaces in place + honor added_active - #248

Merged
Roddygithub merged 1 commit into
mainfrom
fix/queue-logic-in-place
Sep 18, 2026
Merged

Roddygithub merged 1 commit into
mainfrom
fix/queue-logic-in-place

Conversation

@Roddygithub

Copy link
Copy Markdown
Owner

EI QueueLogic.FindLowestValue replaces the shortest non-front stack in place (stacks[IndexOf(toRemove)] = toAdd), preserving queue order. The port popped the victim and appended at the end, rotating the queue and changing which stack fronts next.

Aligns the mid-combat apply path, and honors added_active on both apply paths (EI BuffSimulator.Add calls _logic.Activate, moving the stack to the front).

Tests: 2 new regression tests; 344 passed, ruff + mypy clean.

@Roddygithub
Roddygithub force-pushed the fix/queue-logic-in-place branch from fdd518c to 6f88500 Compare August 20, 2026 10:36
…active

EI QueueLogic.FindLowestValue replaces the shortest non-front stack in
place (stacks[IndexOf(toRemove)] = toAdd), preserving queue order. The
port popped the victim and appended at the end, rotating the queue and
changing which stack fronts next. Align the mid-combat apply path, and
honor added_active on both apply paths (EI BuffSimulator.Add calls
_logic.Activate, moving the stack to the front).

Signed-off-by: Roddy
@Roddygithub
Roddygithub force-pushed the fix/queue-logic-in-place branch from 6f88500 to d4836e3 Compare September 18, 2026 17:43
@Roddygithub
Roddygithub merged commit 0b5358d into main Sep 18, 2026
11 checks passed
@Roddygithub
Roddygithub deleted the fix/queue-logic-in-place branch September 18, 2026 17:50
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.

1 participant