f1ae7b3119cb3794d8064590cb97fe40e17e3bd9
- Add content migration (003_content.sql): zones, monsters, items, loot tables - Add inventory migration (004_inventory.sql) and logs migration (006_logs.sql) - Add Mulberry32 PRNG (src/utils/rng.js) for deterministic combat - Add combat system (src/game/combat.js) with turn order, crit, mage bonus, 20-round cap - Add rewards/loot system (src/game/rewards.js) and leveling (src/game/leveling.js) - Add hunt endpoint (POST /api/hunt) with full combat flow in DB transaction - Add hunt integration tests and unit tests for rewards/leveling/combat - Fix session middleware to use memory store in tests (avoids cleanup hang) - Fix huntService transaction (db.transaction() returns wrapper, must call separately) - Add huntService to helpers.js cache invalidation for test isolation
Emberfall — A Fantasy PBBG
A persistent browser-based game (PBBG): players register, create a hero, spend regenerating Energy on actions (hunting, expeditions, training), fight monsters, collect loot, and climb leaderboards. Progress persists between sessions and continues to "happen" while the player is offline (timers, energy regen).
For the AI agent building this
Start with NOTES.md, then STATUS.md. Do not read every doc up front.
Open only the docs referenced by the step you are working on.
Doc map
| File | Read it when... |
|---|---|
NOTES.md |
ALWAYS first. Rules, stack, constraints. |
STATUS.md |
ALWAYS second. Pick the next unchecked step. Update it when done. |
docs/WORKFLOW.md |
You are unsure how to work or what "done" means. |
docs/ARCHITECTURE.md |
Creating or moving files; deciding where code goes. |
docs/DATABASE.md |
Touching the database or writing migrations. |
docs/API.md |
Writing or calling any route. |
docs/GAME_DESIGN.md |
Implementing any game mechanic. |
docs/BALANCE.md |
Writing formulas, numbers, loot tables, monsters. |
docs/SECURITY.md |
Auth, input handling, anything user-facing. |
docs/UI_GUIDE.md |
Building pages/CSS/frontend JS. |
docs/CODING_STANDARDS.md |
Style, naming, error handling. |
docs/TESTING.md |
Writing or running tests. |
docs/DECISIONS.md |
Making a choice that deviates from the docs. |
For the human
cp .env.example .env
npm install
npm run migrate
npm run seed
npm start # http://localhost:3000
npm test
(These scripts are created by the agent in STATUS.md Phase 0.)
Languages
JavaScript
89.6%
HTML
5%
CSS
4%
Shell
1.4%