feat: daily challenges + streak + rank tiers system
Daily Challenges (api/challenges.php):
- GET: returns 3 randomized challenges per day (deterministic per user+date)
- 10 challenge types: play X games, win X, play specific game, solve puzzles,
beat bot, claim daily, win streak
- Rewards scale with player level (+10% coins per level)
- POST claim: grants coins + XP, records transaction
- Streak tracking with bonus multiplier
Challenges UI (rewards/scenes/challenges.js):
- Progress bars per challenge
- Claim button with coin burst + fly-to-HUD animation
- Streak badge showing consecutive days
- Staggered card entrance animation
- Haptic success on claim
Rank Tiers (rewards/scenes/ranks.js):
- 7 tiers: Bronze → Silver → Gold → Platinum → Diamond → Master → Grandmaster
- Rating ranges defined for each tier
- getTier(), getTierProgress(), getNextTier() utilities
- Arabic + English names, colors, icons
Co-Authored-By:
Claude Opus 4.6 <noreply@anthropic.com>
Showing
api/challenges.php
0 → 100644
Please register or sign in to comment