Give each player their own daily card and send only the visible crop of its illustration
Some checks failed
Validate and deploy Sokko G / validate (push) Successful in 22m10s
Validate and deploy Sokko G / deploy (push) Failing after 25s

- Each player draws their own daily card and zoom point on their first visit, so a shared answer no longer helps; the migration keeps past games with their day's shared card.
- The server crops the illustration with sharp to the part visible at the current zoom; the full image only arrives once the game is over.
- The admin overview shows the day's winners and players instead of a single card.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Shinuwa 2026-11-18 16:47:52 +01:00
parent 41325a3a32
commit fc43444995
17 changed files with 839 additions and 118 deletions

View file

@ -26,6 +26,8 @@ for (const editionId of ["aurora-wolf-standard", "aurora-wolf-standard", "aurora
for (const card of seedService.catalog.cards.filter((item) => item.kind === "destination")) seedService.addCard(partner.id, seedService.catalog.editions.find((edition) => edition.cardId === card.id).id);
seedDatabase.db.prepare("UPDATE players SET stardust = 500 WHERE id = ?").run(partner.id);
writeFileSync(join(tmpdir(), "sokkog-cards-e2e-partner.json"), JSON.stringify({ token: seedService.createSession(partner.id).token }));
// Chaque joueur a sa propre Carte du jour, jamais exposée par l'API avant la fin de la partie : le parcours la lit en base.
writeFileSync(join(tmpdir(), "sokkog-cards-e2e-db.json"), JSON.stringify({ path: process.env.CARDS_DB_PATH }));
// Une base neuve n'a aucune variation mythique : les parcours de jeu et d'administration en ont besoin.
const insertVariation = seedDatabase.db.prepare("INSERT INTO mythic_variations(edition_id, card_id, finish_id, status, updated_at, updated_by) VALUES (?, ?, ?, 'active', 0, NULL)");
for (const cardId of ["starvoid-dragon", "crimson-moon-kitsune", "milky-way-panda", "constellation-magpie", "solar-dawn-capybara", "aurora-wolf"]) {