Commit graph

15 commits

Author SHA1 Message Date
71e10ec084 Add adventure unlock CTA and rebalance box loot pacing
- Add AdventureUnlockedEvent emitted by MetaEngine when a new adventure
  is unlocked, displayed as a CTA in the loot reveal flow
- Rebalance box_of_boxes: reduce box_not_great weight 10→7, boost
  box_ok_tier 5→7 for more variety in early game
- Add box_ok_tier and box_meta_basics drops to box_not_great loot table
  so basic boxes can escape the loop
- Double box_meta_basics weight in box_ok_tier (1→2) for faster
  meta progression
- Update bugs.md: resolve all 4 FIXME items
2026-03-11 20:47:20 +01:00
aeae979d05 Fix adventure parsing, add French accents, fix cosmetic translation bug
- Fix Loreline parsing: escape quotes in dialogue, remove [if] bracket
  syntax, remove # in text conflicting with tags
- Add French accents to all 9 .fr.lor translation files (hundreds of fixes)
- Fix cosmetic equip display: use item nameKey lookup instead of
  constructing key from cosmeticValue (fixes StardustLegendary MISSING)
- Deduplicate cosmetics in appearance menu
- Localize all hardcoded strings (welcome, inventory, adventure, cosmetic)
- Add new tests: Loreline parsing (19), cosmetic slot keys, slot+value
  uniqueness (302 total, 0 failures)
2026-03-11 20:40:07 +01:00
2c96cba174 Accents and bug tracking 2026-03-11 18:33:10 +01:00
c9f8a9566a Add adventure secret branches, Destiny finale, crafting system, and project docs
Integrate stats, resources, and cosmetics into adventures via conditional
branches gated by game state checks. Each of the 9 adventures now has a
secret branch that rewards exploration and encourages replay with subtle
hints on locked choices. The endgame box now triggers a Destiny adventure
that acknowledges all completed adventures and secret branches, with four
ending tiers culminating in an ultimate ending when all 9 secrets are found.

Also adds the crafting engine, CLAUDE.md and specifications.md for faster
onboarding.
2026-03-11 17:50:37 +01:00
4c4d528187 Fix bugs, add endgame/completion features, adventure dedup, and comprehensive renderer tests
Bug fixes:
- Fix double "NEW FEATURE UNLOCKED" message and broken enum-to-key mapping for all UIFeatures
- Fix Spectre markup crash when opening inventory with colors unlocked (unescaped rarity brackets)
- Fix latent Spectre markup crash in ResourcePanel (unescaped bar brackets)
- Fix WeightedRandom.PickMultiple picking with replacement causing duplicate drops
- Fix double AddItem bug (BoxEngine + RenderEvents both adding to state)
- Add StatType and FontStyle fields to ItemDefinition (were in JSON but missing from C# record)

New features:
- Endgame box (Mythic) that appears when all 8 resources are discovered, contains Crown of Completion
- Completion percentage tracker as mid-game meta unlock (tier 3), shown in both renderers
- Adventure pool depletion: adventure sub-boxes with already-unlocked themes are removed from loot pool
- Global error handling with log file output (openthebox-error.log)
- Tiered meta progression: 5 sequential meta boxes replacing single box_meta

New tests (180 new, 228 total):
- 5 panel rendering test classes covering all enum values (Portrait, Resource, Stats, Inventory, Chat)
- RenderContext and RendererFactory logic tests
- SpectreRenderer output tests across 4 context configurations
- BasicRenderer output and input method tests
- Simulation state mutation and full-run completion tests
2026-03-11 09:34:30 +01:00
77c70593ee Improve auto-opening box UX with clear messaging
- Auto-opened boxes now show "Box of Boxes opens automatically!" instead
  of the full opening sequence, making the cascade clear to the player
- Items that are immediately auto-consumed (auto-opening boxes) are
  hidden from loot reveal to reduce noise
- BoxOpenedEvent now carries IsAutoOpen flag set by BoxEngine
2026-03-10 20:34:35 +01:00
c580e1cf2e Localize all hardcoded English strings in renderers
Renderers now use LocalizationManager for all UI text: box opening,
loot reveal, feature unlock, prompts, and error messages. Added
missing localization keys to both en.json and fr.json.
2026-03-10 20:31:46 +01:00
2825621d0a Group duplicate boxes and inventory items with count display
Box selection and inventory now show "Boite pas ouf (x4)" instead of
listing each instance separately. Picks the first instance of the
selected type when opening.
2026-03-10 20:01:11 +01:00
d09bf72a90 Guarantee box_of_boxes in every non-auto-opening box
Every box now always drops a box_of_boxes (auto-open) alongside its
normal loot, ensuring the core loop never breaks. The player always
has at least one box to open next. Only auto-opening boxes (box_of_boxes
itself, box_adventure) are excluded to prevent infinite recursion.
2026-03-10 19:35:57 +01:00
f88a3cc3f6 Fix box name lookups falling back to raw IDs instead of localization
GetItem() returns null for box definition IDs, causing [MISSING:box_*]
display. Added GetLocalizedName() helper that checks both item and box
registries before resolving the localization key.
2026-03-10 19:29:31 +01:00
9c4fd0d73a Fix runtime deserialization bugs, add test suite and publish support
- Fix LootTable.GuaranteedRolls type (int -> List<string>) to match JSON schema
- Fix BoxEngine guaranteed rolls to iterate item IDs directly
- Fix BoxEngine resource condition evaluation for "any" targetId
- Make ItemDefinition.DescriptionKey optional
- Fix font meta item nameKeys to use proper localization keys
- Add 43 xUnit content validation tests (deserialization, cross-refs, localization)
- Add self-contained single-file publish via publish.ps1
- Update README with distribute and test sections
2026-03-10 19:25:02 +01:00
05289da2e2 Add README.md 2026-03-10 18:51:43 +01:00
e0cdc7a6de Add init.ps1 setup script, remove Loreline binaries from repo
- Add PowerShell init script that downloads Loreline v0.7.1 from GitHub
- Script also checks for .NET 10 SDK and restores NuGet packages
- Remove Loreline DLL/XML/deps from git tracking (now fetched by init.ps1)
- Update .gitignore to exclude entire lib/ directory
2026-03-10 18:49:26 +01:00
b1f8ceec66 Add complete content: recipes, French translations, music/cookie events
- Add 34 crafting recipes (materials, consumables, cosmetics, adventures, boxes)
- Add French translations for all 8 remaining adventures
- Add missing item definitions (resource_max_*, music_melody, cookie_fortune)
- Add MusicPlayedEvent and CookieFortuneEvent for special box types
- Make box_story, box_cookie, box_music reachable from box_of_boxes
- Fix content file copying in csproj (None -> Content)
- Add global.json pinning .NET 10 SDK
- Add graceful Console.Clear() error handling
- Add recipe localization keys (EN/FR)
- Add adventure localization keys (EN/FR)
2026-03-10 18:45:54 +01:00
04894a4906 Initial project setup: Open The Box CLI game
- .NET 10 console app with Spectre.Console and Loreline integration
- Black Box Sim architecture (simulation separated from presentation)
- Progressive CLI rendering (9 phases from basic to full layout)
- 25+ box definitions with weighted loot tables
- 100+ item definitions (meta, cosmetics, materials, adventure tokens)
- 9 Loreline adventures (Space, Medieval, Pirate, etc.)
- Bilingual content (EN/FR)
- Save/load system
- Game Design Document
2026-03-10 18:24:01 +01:00