feat: Phase 3 — polish & settings complete

Card pool:
- TOTW cards (5): overall 88-92, rarity "totw"
- Hero cards (5): overall 85-88, rarity "hero"
- Icon cards (5): overall 93-95, rarity "icon" (permanent, non-loan)

Packs:
- TOTW Pack (30,000 coins): 5 TOTW cards guaranteed
- Icon Pack (50,000 coins): 3 icon cards guaranteed
- Hero Pack (20,000 coins): 5 hero cards guaranteed

Objectives:
- Milestone objectives (6): win 10/50, score 100/500 goals, 10 SBCs, 25 packs

Formations:
- GET /formations returns 12 valid formation strings

Multiple named squads (#20):
- POST /squad with no squad_id always creates a new squad
- POST /squad with squad_id updates that specific squad
- GET /squads: list all squads for the club (metadata only)
- GET /squads/🆔 squad with players + chemistry
- DELETE /squads/🆔 remove a squad

Per-position goal stats (#41):
- Migration 0003: position_goals table
- POST /matches/result accepts optional goal_positions: ["ST","CAM",...]
- GET /statistics now includes position_goals map

Settings (#44-46):
- GET /settings: { difficulty, preferred_formation } with defaults
- PUT /settings: upsert any key-value combination

Draft mode skeleton (#38):
- GET /draft/squad?difficulty=... returns a randomly generated 11-player squad

Integration tests:
- 9 new tests covering: formations, pack buy/open, SBC submit, settings R/W,
  multiple squads, draft endpoint, goal position tracking, win streak

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
funman300
2026-06-25 15:46:20 -07:00
parent 0afce0dd59
commit 4ae1081aa9
21 changed files with 739 additions and 138 deletions
+68
View File
@@ -0,0 +1,68 @@
[
{
"id": "milestone_10_wins",
"title": "First Champion",
"description": "Win 10 matches total.",
"objective_type": "milestone",
"metric": "matcheswon",
"target": 10,
"reward_coins": 2000,
"reward_pack_id": null,
"reward_xp": 500
},
{
"id": "milestone_50_wins",
"title": "Seasoned Winner",
"description": "Win 50 matches total.",
"objective_type": "milestone",
"metric": "matcheswon",
"target": 50,
"reward_coins": 10000,
"reward_pack_id": "gold_pack",
"reward_xp": 2500
},
{
"id": "milestone_100_goals",
"title": "Century Scorer",
"description": "Score 100 goals total.",
"objective_type": "milestone",
"metric": "goalsscored",
"target": 100,
"reward_coins": 5000,
"reward_pack_id": null,
"reward_xp": 1000
},
{
"id": "milestone_500_goals",
"title": "Goal Machine Legend",
"description": "Score 500 goals total.",
"objective_type": "milestone",
"metric": "goalsscored",
"target": 500,
"reward_coins": 25000,
"reward_pack_id": "rare_gold_pack",
"reward_xp": 5000
},
{
"id": "milestone_10_sbcs",
"title": "SBC Aficionado",
"description": "Complete 10 Squad Building Challenges.",
"objective_type": "milestone",
"metric": "sbcscompleted",
"target": 10,
"reward_coins": 3000,
"reward_pack_id": "silver_pack",
"reward_xp": 750
},
{
"id": "milestone_25_packs",
"title": "Pack Addict",
"description": "Open 25 packs.",
"objective_type": "milestone",
"metric": "packsopened",
"target": 25,
"reward_coins": 5000,
"reward_pack_id": null,
"reward_xp": 1500
}
]