tests: M4 dead-participant skip RED (4 tests, turn.dead-skip.test.js)
Desired behavior locked: - dead PC not removed from turnOrderIds - dead PC turn still comes up (nextTurn visits them) - dead PC on their turn can deathSave - dead PC not auto-set isActive=false by applyHpChange All 4 RED on current code. Root cause: nextTurn filters isActive, applyHpChange sets isActive=false on death, computeTurnOrderAfterRemoval drops dead from turnOrderIds. TODO BUG-3/M4 updated with test refs.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
## M4 — Initiative skip bug + dead-participant handling
|
||||
|
||||
### Dead participants must NOT be skipped in turn order
|
||||
### Dead participants must NOT be skipped in turn order (BUG-3 / M4)
|
||||
- Current: dead (HP=0) → `isActive=false` → removed from turn order → skipped
|
||||
- WRONG. Dead participants still occupy initiative slot.
|
||||
- PCs (unconscious): death saves still resolve on their turn
|
||||
@@ -14,7 +14,12 @@
|
||||
(sets isActive=false on death), `computeTurnOrderAfterRemoval`.
|
||||
- Characterization tests (`src/tests/Combat.characterization.test.js`) lock CURRENT
|
||||
(buggy) behavior — those tests must be UPDATED to desired behavior, not
|
||||
preserved. Red desired-test first, then fix.
|
||||
preserved.
|
||||
- RED test locked: `shared/tests/turn.dead-skip.test.js` (4 tests).
|
||||
- dead PC not removed from turnOrderIds
|
||||
- dead PC turn still comes up (nextTurn visits them)
|
||||
- dead PC on their turn can deathSave
|
||||
- dead PC not auto-set isActive=false by applyHpChange
|
||||
|
||||
### JUMP_TURN_TO(participantId) manual turn override
|
||||
- DM clicks participant → cursor jumps → that participant's turn now.
|
||||
|
||||
Reference in New Issue
Block a user