V1.3.1: initiative in quests, tooltips no longer clipped, deploy script
- Quests take initiative rolls like battles do; each quest group lists highest first. The total is roll plus bonus and can exceed 20 (test added). - Info tooltips are drawn against the viewport, so the party overview table (or any scrolling container) can't cut them off. - backend: `npm run deploy` applies migrations and regenerates the Prisma client in one step; README explains why both are needed on a server. - All packages at version 1.3.1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1896,6 +1896,15 @@ describe('initiative', () => {
|
||||
expect(playerView.Goblin.initiative).toBe(12);
|
||||
expect(playerView.Quick.character.userId).toBeTruthy();
|
||||
|
||||
// Only the die stops at 20: a natural 20 plus a bonus goes past it.
|
||||
expect((await patch(goblinRow, dmAuth, { initiativeRoll: 20 })).body.participant).toMatchObject({ initiativeRoll: 20, initiative: 22 });
|
||||
|
||||
// Quests take initiative exactly as battles do.
|
||||
await request(app).patch(e).set(dmAuth).send({ mode: 'QUEST' });
|
||||
expect((await patch(heroRow, playerAuth, { initiativeRoll: 19 })).body.participant.initiative).toBe(19 + heroBonus);
|
||||
await request(app).patch(e).set(dmAuth).send({ mode: 'BATTLE' });
|
||||
await patch(heroRow, playerAuth, { initiativeRoll: 20 });
|
||||
|
||||
// The DM can re-roll anyone, or clear a roll.
|
||||
expect((await patch(goblinRow, dmAuth, { initiativeRoll: 1 })).body.participant.initiative).toBe(3);
|
||||
expect((await patch(heroRow, dmAuth, { initiativeRoll: null })).body.participant).toMatchObject({ initiativeRoll: null, initiative: 0 });
|
||||
|
||||
Reference in New Issue
Block a user