1bdae4f295
test(loader): assert exact item set incl. demo items (restore completeness check)
2026-06-01 17:44:32 +02:00
8d88157573
feat(loader): load combinations.yaml; demo matches+torch -> lit_torch
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-06-01 17:38:17 +02:00
63af4c7641
docs(command): update UseCommand javadoc for the combination form
2026-06-01 17:32:58 +02:00
a89684807b
feat(command): route use X on Y to the combination engine
...
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-01 17:31:07 +02:00
e7b9891771
fix(combinations): guard null response; reject self-combination at load
...
- Combinations.tryUse: only write response when non-null and non-blank,
preventing NPE/IllegalArgument for effects-only recipes.
- CombinationFactory.fromDto: throw WorldLoadException when a == b,
since item singletons make a self-combination impossible at runtime.
- Tests: +effectsOnlyRecipeAppliesEffectsWithoutProduceOrResponse
(CombinationsTest 7→8), +rejectsSelfCombination
(CombinationFactoryTest 4→5).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-06-01 17:28:32 +02:00
89962b4b60
feat(game): Combinations engine for use X on Y
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-06-01 17:22:16 +02:00
667991df26
test(loader): cover unknown consume id rejection
2026-06-01 17:19:41 +02:00
3d183ad162
feat(loader): CombinationDto + CombinationFactory with id validation
2026-06-01 17:17:25 +02:00
9f9b0c0808
feat(model): World.combinations field + backward-compatible constructors
2026-06-01 17:13:05 +02:00
bbc4fc37f8
style(test): drop unused import in CombinationTest
2026-06-01 17:11:37 +02:00
b7094bf152
feat(model): Combination recipe record + order-independent key
2026-06-01 17:08:14 +02:00
6887102d19
feat(io): themed full-window menu overlay in the GUI
...
Replace the plain Swing JDialog menu with a glass-pane overlay that fills
the whole window: dark background matching the game palette, bundled font,
lavender heading, flat hover-highlighted buttons, Escape = last option. The
overlay hides the game chrome (HUD/map/quest panels) while in the menu and
rebuilds at the current frameScale*zoom on window resize, so it scales
correctly from startup.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-01 16:21:46 +02:00
9d3056d53e
fix: EOF ends game loop (ConsoleIO returns null on EOF); settings.json excluded from save slots
...
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-01 15:39:08 +02:00
635ea8004c
feat(io): SwingIO.choose renders the menu as buttons
2026-06-01 15:27:15 +02:00
163e2cc11b
refactor(app): drop dead newSession param, unused import, restore main javadoc
...
- Remove unused `saves` parameter from `newSession(GameIO, SaveService)`
→ signature is now `newSession(GameIO)`, call site updated accordingly
- Remove unused `import thb.jeanluc.adventure.menu.MenuAction` (switch
uses unqualified constants; import was dead, compile confirmed clean)
- Restore `/** Standard JVM entry point. @param args ignored */` Javadoc
on `main` and restore full log message "Fatal error during game startup"
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-06-01 15:25:01 +02:00
1f15bfe330
feat(app): main-menu shell loop wiring; gitignore saves/
...
Replace App.run with a main-menu shell (New Game / Load / Settings /
Quit) above the game loop, wire SaveCommand + MenuCommand into the
registry with an autosave callback, and remove the now-unused
QuitCommand. Migrate GameTest from QuitCommand to MenuCommand.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-01 15:17:46 +02:00
9632d27b25
feat(game): autosave on quest completion
2026-06-01 15:12:18 +02:00
4b2357cd5b
feat(command): save + menu commands (QuitCommand removal deferred to Task 11)
2026-06-01 15:10:10 +02:00
e564253f23
test(menu): cover pickSlot selection and Back sentinel
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-06-01 15:03:18 +02:00
6921af053a
feat(menu): MainMenu, SettingsMenu, MenuAction (frontend-agnostic)
2026-06-01 14:58:41 +02:00
735a92ca6e
test(settings): cover corrupt settings file falls back to defaults
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-06-01 14:56:14 +02:00
dfc50f0d9f
feat(settings): Settings + SettingsStore; runtime-togglable ConsoleIO
2026-06-01 14:52:28 +02:00
404221525c
test(save): cover version mismatch + slug; clean up tmp on move failure
...
Add loadRejectsIncompatibleVersion test asserting SaveException on schema
version 999, assert derived slug in listReturnsSlotMetadata, and harden
save() to delete the orphaned .tmp file when the non-atomic fallback move
also fails before re-throwing.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-06-01 14:50:10 +02:00
8eb433e02d
feat(save): SaveService disk persistence (atomic write, list, load)
2026-06-01 14:44:32 +02:00
1172f7c3fd
fix(save): restore visited set before setting current room; strengthen null-tolerance test
...
Reorder apply() so visitedRoomIds is restored before setCurrentRoom() is
called, ensuring the current room is never accidentally stripped from the
visited set by the subsequent clear(). Also adds a post-condition assertion
to applyToleratesMissingCollections that proves null roomItemIds leaves
room item tables empty after apply.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-06-01 14:42:15 +02:00
80a5112508
feat(save): SaveCodec capture/apply over a fresh world; tolerate null collections
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-06-01 14:34:48 +02:00
6d703c7caf
feat(save): SaveData/SaveSlotInfo/SaveException model
2026-06-01 14:29:55 +02:00
b73d0aaa82
feat(io): GameIO.choose numbered-menu primitive (console default)
2026-06-01 14:26:43 +02:00
beba1c7e72
feat: restore hooks for flags, quest progress, switch state
2026-06-01 14:21:56 +02:00
c1826c7df8
test(game): strengthen legacy-constructor delegation assertions
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-06-01 14:19:54 +02:00
dd2b1b331f
feat(game): GameSession bundles savable state; turn + autosave hook
2026-06-01 14:15:44 +02:00
9ea07470a9
feat(content): dark dungeon needs the lit lamp
...
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-05-31 23:08:42 +02:00
3cac6cb796
feat: darkness gating for go/look/take/examine + HUD light
...
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-05-31 23:07:36 +02:00
e65e3b600a
feat: Room.dark + Item.light flags and Light helper
...
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-05-31 23:04:42 +02:00
7295463805
feat(content): victory & flee endings; front-door flee switch
...
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-05-31 22:50:46 +02:00
3189b057a0
feat(game): EndingEngine + per-turn end check with summary
...
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-05-31 22:49:00 +02:00
f9bd2d9a67
feat: Ending model + endings.yaml loading (ordered, optional)
...
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-05-31 22:47:38 +02:00
55944a0343
feat(content): demo quest 'restore_power'; document quests command
...
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-05-31 22:34:57 +02:00
e360a754a6
feat(io): GUI quest-box under the map
...
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-05-31 22:33:57 +02:00
c2e5789118
feat(io,command): quests command, QuestText, per-turn quest tick
...
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-05-31 22:31:33 +02:00
fe9ac65f25
feat(loader): quests.yaml loading + startQuest effect mapping
...
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-05-31 22:29:52 +02:00
423cf85c39
feat(game): QuestEngine (auto-advance + announcements) and QuestView
...
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-05-31 22:27:18 +02:00
4e0e951a8d
feat(game): Quest model, QuestLog, START_QUEST effect
...
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-05-31 22:25:58 +02:00
93a5da3af7
feat(content): demo the state engine (generator unlocks/lights the cellar)
...
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-05-31 22:01:57 +02:00
acaae3c4f7
feat: switchable items apply effects when turned on
...
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-05-31 21:59:46 +02:00
ab008ee562
feat: NPC reactions gated by conditions, applying effects
...
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-05-31 21:57:23 +02:00
9d23cb01b7
feat: conditional NPC dialogue
...
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-05-31 21:55:15 +02:00
8cb2b360e6
feat: state-dependent room descriptions (LookCommand resolution)
...
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-05-31 21:52:57 +02:00
e3b80736dd
feat: condition-locked exits (+ room/dialogue state plumbing)
...
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-05-31 21:52:06 +02:00
c339d13244
feat(loader): ConditionDto/EffectDto with toModel mapping
...
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-05-31 21:47:11 +02:00