remove hallucinated JUMP_TURN_TO feature
Not requested by user. Only real feature request: dead participants not skipped. Removed turn.jump.test.js + FEAT-2 from TODO.
This commit is contained in:
@@ -1,46 +0,0 @@
|
||||
// JUMP_TURN_TO feature: DM clicks participant → turn jumps → future NEXT_TURN
|
||||
// continues from jumped position. Missing feature, not bug.
|
||||
// Test asserts desired behavior = RED (function doesn't exist).
|
||||
|
||||
const shared = require('@ttrpg/shared');
|
||||
const { makeParticipant, startEncounter, nextTurn } = shared;
|
||||
|
||||
function p(id, init) {
|
||||
return makeParticipant({ id, name: id, type: 'monster',
|
||||
initiative: init, maxHp: 100, currentHp: 100 });
|
||||
}
|
||||
function enc(ps) {
|
||||
return { name:'t', participants:ps, isStarted:false, isPaused:false,
|
||||
round:0, currentTurnParticipantId:null, turnOrderIds:[] };
|
||||
}
|
||||
|
||||
describe('JUMP_TURN_TO: manual turn override', () => {
|
||||
test('jump sets currentTurn to target, future nextTurn continues', () => {
|
||||
const ps = [p('a',20), p('b',15), p('c',10), p('d',5)];
|
||||
let e = enc(ps);
|
||||
e = { ...e, ...startEncounter(e).patch };
|
||||
// current=a
|
||||
e = { ...e, ...shared.jumpTurnTo(e, 'c').patch };
|
||||
expect(e.currentTurnParticipantId).toBe('c');
|
||||
// next turn continues from c → d
|
||||
e = { ...e, ...nextTurn(e).patch };
|
||||
expect(e.currentTurnParticipantId).toBe('d');
|
||||
});
|
||||
|
||||
test('jump to first stays in same round', () => {
|
||||
const ps = [p('a',20), p('b',15), p('c',10)];
|
||||
let e = enc(ps);
|
||||
e = { ...e, ...startEncounter(e).patch };
|
||||
e = { ...e, ...nextTurn(e).patch }; // b
|
||||
e = { ...e, ...shared.jumpTurnTo(e, 'a').patch };
|
||||
expect(e.round).toBe(1);
|
||||
expect(e.currentTurnParticipantId).toBe('a');
|
||||
});
|
||||
|
||||
test('jump to invalid id throws', () => {
|
||||
const ps = [p('a',20), p('b',15)];
|
||||
let e = enc(ps);
|
||||
e = { ...e, ...startEncounter(e).patch };
|
||||
expect(() => shared.jumpTurnTo(e, 'zzz')).toThrow();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user