Skip to content

feat: Daily Missions system — 3 rotating missions per day with XP + Ozzies - #356

Draft
driver727-pixel wants to merge 2 commits into
mainfrom
gamma/daily-missions-dc01
Draft

feat: Daily Missions system — 3 rotating missions per day with XP + Ozzies#356
driver727-pixel wants to merge 2 commits into
mainfrom
gamma/daily-missions-dc01

Conversation

@driver727-pixel

Copy link
Copy Markdown
Owner

Summary

Implements the "3 Daily Missions" system — each day, 3 missions are selected from a pool of 10 templates across 5 activity types. Missions track progress and reward XP + Ozzies on completion.

How It Works

  1. Date-seeded selection: A PRNG seeded on the date key (YYYY-MM-DD) selects 3 missions from different types, ensuring variety and consistency across all players
  2. Progress tracking: Missions advance via trackProgress(type, increment) — e.g., when a player forges a card, call trackProgress("forge") to advance forge-type missions
  3. Completion: When progress >= target, status transitions to "completed" and rewards are displayed
  4. Daily reset: Missions reset at midnight (new date key generates new selection)

Mission Templates

ID Title Type Target XP Ozzies
forge_1 Forge a Card forge 1 50 15
forge_2 Forge 2 Cards forge 2 100 30
battle_1 Win a Battle battle 1 75 25
battle_2 Enter 2 Battles battle 2 100 35
trade_1 Send a Trade trade 1 50 20
trade_2 Complete a Trade trade 1 75 30
mission_1 Complete a Delivery Run mission 1 75 25
mission_2 Complete 2 Delivery Runs mission 2 120 40
collection_1 Save to Collection collection 1 50 15
collection_2 Grow Your Collection collection 3 100 40

Files Changed

File Change
src/lib/dailyMissions.ts Mission templates, date-seeded selection, progress tracking, localStorage
src/hooks/useDailyMissions.ts React hook with trackProgress() and refresh()
src/components/DailyMissionsPanel.tsx Mission cards with progress bars, type icons, reward display
src/pages/CardForge.tsx Mount DailyMissionsPanel above forge layout
src/index.css Daily mission panel and card styles

Feature Flag

Ships behind VITE_FF_MISSIONS (Sprint 0 flag). Default false.

Integration Points

The trackProgress(type, increment) method is the hook point for other features to advance missions:

  • Card Forge: trackProgress("forge") on successful forge
  • Arena: trackProgress("battle") on battle completion
  • Trades: trackProgress("trade") on trade creation/acceptance
  • Mission page: trackProgress("mission") on delivery completion
  • Collection: trackProgress("collection") on card save

Testing

  • ESLint: passes clean
  • TypeScript: tsc --noEmit passes clean
Open in Web Open in Cursor 

cursoragent and others added 2 commits April 23, 2026 04:31
…ture flags, server stubs, Firestore rule stubs

- docs/DATA_MODEL.md: audit of all existing Firestore collections with document shapes
- docs/AGENT_STATUS.md: daily sync artifact for Gamma/Charlie coordination
- src/lib/sharedTypes.ts: append-only shared contract file (DailyStreak, Mission, BattlePassState, Crew, RankedSeason, RankedEntry, ShareLink)
- src/lib/featureFlags.ts: central feature-flag registry (all default false)
- server/battlePass.js, server/ranked.js, server/crews.js, server/dailyRewards.js: no-op handler stubs
- firestore.rules: read-only stub rules for dailyStreaks, missions, battlePass, crews, rankedSeasons, shareLinks

Co-authored-by: SP Digital <driver727@gmail.com>
…zzies

- src/lib/dailyMissions.ts: date-seeded mission selection from 10 templates, progress tracking, localStorage persistence
- src/hooks/useDailyMissions.ts: React hook with trackProgress() for type-based advancement
- src/components/DailyMissionsPanel.tsx: mission cards with progress bars, rewards, completion state
- CardForge.tsx: mounted DailyMissionsPanel above forge layout
- index.css: daily mission panel and card styles

Mission types: forge, battle, trade, delivery run, collection save
Each day selects 3 from different types via PRNG seeded on date key

Co-authored-by: SP Digital <driver727@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants