Files
funman300 1ef2c436ab
CI / Build, lint & test (push) Successful in 2m5s
feat: Phase 5 — events system complete
Adds a data-driven event system (#47 schema, #48 activation, #49 TOTW):

- EventDefinition JSON schema (event_type, effects, date range, is_manual)
- data/events/totw_week1.json — TOTW event active by date range (2024–2030),
  injects 5 TOTW cards into the market as [EVENT] listings
- data/events/seasonal_events.json — Spring Festival and Icon Weekend,
  manual-activation-only example events
- migrations/0004_events.sql — events override table (NULL/1/0 per event)
- services/event — load_event_definitions, compute_is_active (date range +
  manual override), get_active_events, get_all_with_status, activate/deactivate
- routes/events — GET /events, GET /events/:id, POST .../activate, .../deactivate
- services/market::refresh_npc_listings now accepts event_defs, injects bonus
  market cards from active events at 2× premium price
- 5 new integration tests (events list, single, activate/deactivate cycle,
  404 on unknown, market injection verification); 19/19 passing

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 16:02:45 -07:00

45 lines
1.1 KiB
JSON

[
{
"id": "spring_festival",
"name": "Spring Festival",
"description": "Celebrate the season! Special Hero players appear in the market. Activate manually to begin.",
"event_type": "seasonal",
"starts_at": null,
"expires_at": null,
"is_manual": true,
"effects": {
"pack_weight_boosts": [],
"bonus_market_cards": [
"card_hero_001",
"card_hero_002",
"card_hero_003"
],
"unlocks_sbc_ids": [],
"unlocks_objective_ids": []
}
},
{
"id": "icon_weekend",
"name": "Icon Weekend",
"description": "Legendary Icons are available on the market. Activate manually to begin.",
"event_type": "special",
"starts_at": null,
"expires_at": null,
"is_manual": true,
"effects": {
"pack_weight_boosts": [
{ "rarity": "icon", "multiplier": 5.0 }
],
"bonus_market_cards": [
"card_icon_001",
"card_icon_002",
"card_icon_003",
"card_icon_004",
"card_icon_005"
],
"unlocks_sbc_ids": [],
"unlocks_objective_ids": []
}
}
]