19 Commits

Author SHA1 Message Date
967766956f Merge branch 'main' into feature/treasure-ui-and-inventory 2026-03-16 00:05:36 +00:00
9eef50e0c9 Merge pull request 'Feature: implement loot resolution system with gold and item tracking from defeated creatures' (#11) from feature/loot-resolution into main
Reviewed-on: #11
2026-03-16 00:05:14 +00:00
cbb3efafd7 Merge branch 'main' into feature/loot-resolution 2026-03-16 00:05:05 +00:00
Keith Solomon
626d5ca05c Merge branch 'feature/post-combat-rewards' 2026-03-15 19:03:37 -05:00
68654a8cc0 Merge pull request 'Feature: implement game shell UI with room navigation and combat mechanics' (#9) from feature/game-shell-ui into main
Reviewed-on: #9
2026-03-15 23:57:34 +00:00
40ce9644ab Merge branch 'main' into feature/game-shell-ui 2026-03-15 23:57:24 +00:00
473ea83cdf Merge pull request 'Feature: Implement staged backend features' (#8) from staging/features into main
Reviewed-on: #8
2026-03-15 19:06:33 +00:00
7fb3bd6cf5 Merge branch 'main' into staging/features 2026-03-15 19:04:06 +00:00
Keith Solomon
fb6cbfe9fb Feature: implement game shell UI with room navigation and combat mechanics 2026-03-15 14:02:19 -05:00
9c7acf6825 Merge pull request 'Feature: implement run state management with combat resolution and room entry' (#7) from feature/run-state-flow into staging/features
Reviewed-on: #7
2026-03-15 18:53:14 +00:00
102cbfeaad Merge branch 'staging/features' into feature/run-state-flow 2026-03-15 18:53:03 +00:00
377a533466 Merge pull request 'Feature: implement combat' (#6) from feature/combat into staging/features
Reviewed-on: #6
2026-03-15 18:52:27 +00:00
e3f90ca545 Merge branch 'staging/features' into feature/combat 2026-03-15 18:52:08 +00:00
79b9e448b7 Merge pull request 'Feature: implement combat turn resolution with player and enemy actions' (#5) from feature/combat-turns into feature/combat
Reviewed-on: #5
2026-03-15 18:46:14 +00:00
aea00d31e8 Merge pull request 'Feature: implement room entry flow with encounter resolution and logging' (#4) from feature/room-entry-flow into staging/features
Reviewed-on: #4
2026-03-15 18:30:14 +00:00
fdaa2e3135 Merge branch 'staging/features' into feature/room-entry-flow 2026-03-15 18:28:40 +00:00
67453df51e Merge pull request 'Feature: enhance encounter resolution with creature names and result labels' (#3) from feature/encounter-resolution into staging/features
Reviewed-on: #3
2026-03-15 18:19:53 +00:00
cff5f786a0 Merge pull request 'Feature: implement dungeon state management with room expansion and exit handling' (#2) from feature/dungeon-state into staging/features
Reviewed-on: #2
2026-03-15 18:19:15 +00:00
5debb5bd5e Merge pull request 'Feature: Add foundational rules and mechanics' (#1) from feature/rules-foundation into main
Reviewed-on: #1
2026-03-15 17:58:14 +00:00

View File

@@ -269,4 +269,46 @@ describe("run state flow", () => {
expect(isCurrentRoomCombatReady(run)).toBe(true);
});
it("lists available traversable exits for the current room", () => {
const run = createRunState({
content: sampleContentPack,
campaignId: "campaign.1",
adventurer: createAdventurer(),
});
expect(getAvailableMoves(run)).toEqual([
expect.objectContaining({
direction: "north",
generated: false,
}),
]);
});
it("travels through an unresolved exit, generates a room, and enters it", () => {
const run = createRunState({
content: sampleContentPack,
campaignId: "campaign.1",
adventurer: createAdventurer(),
at: "2026-03-15T14:00:00.000Z",
});
const result = travelCurrentExit({
content: sampleContentPack,
run,
exitDirection: "north",
roller: createSequenceRoller([1, 1]),
at: "2026-03-15T14:05:00.000Z",
});
expect(result.run.currentRoomId).toBe("room.level1.room.002");
expect(result.run.dungeon.levels["1"]!.discoveredRoomOrder).toEqual([
"room.level1.start",
"room.level1.room.002",
]);
expect(result.run.dungeon.levels["1"]!.rooms["room.level1.room.002"]!.discovery.entered).toBe(
true,
);
expect(result.run.log[0]?.text).toContain("Travelled north");
});
});