Files
aurorabot/shared/modules/quest/AGENTS.md
syntaxbullet 6abbd4652a
Some checks failed
Deploy to Production / test (push) Failing after 33s
Refresh repository documentation
- Rewrite AGENTS and README files to match the current app layout
- Document API routes, trivia UI, and the active panel design language
2026-04-09 21:10:10 +02:00

33 lines
821 B
Markdown

# Quest module
## Model
- quests are event-driven
- user progress is stored in `user_quests`
- completion is automatic once progress reaches the quest target
## Main methods
- `assignQuest()`
- `updateProgress()`
- `handleEvent()`
- `completeQuest()`
- `getUserQuests()`
- `getAvailableQuests()`
- `createQuest()`
- `getAllQuests()`
- `deleteQuest()`
- `updateQuest()`
## Rules
- max active quests comes from `gameSettingsService`
- `assignQuest()` uses `onConflictDoNothing()`
- `handleEvent()` matches either exact trigger names or `trigger:` prefixes, for example `ITEM_COLLECTED:42`
- rewards can include balance and XP and are paid inside the completion transaction
## Notes
- completed assignments remain in `user_quests`
- `EVENTS.QUEST.COMPLETED` is emitted for the bot/UI layer after reward distribution