Let Sokko TCG players level up cards for Expeditions with Éclats or duplicates

- Each owned rare or better edition keeps a level and field experience; a level costs Éclats by current power, so every rarity reaches the same cap and a rare pays the longer road.
- A duplicate of the same edition gives a whole level; every claimed expedition grants field experience to the cards it sent.
- A one-way bridge turns stardust into Éclats at an admin-tuned rate.
- The card sheet shows level, power, stats and experience with upgrade buttons; expeditions use the upgraded power.
- Administration › Guilde tunes the cost formula, duplicate levels, field experience and the bridge rate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Shinuwa 2026-11-15 14:52:44 +01:00
parent 6b7605d04e
commit e0ffccd1c8
22 changed files with 373 additions and 10 deletions

View file

@ -314,6 +314,15 @@ export function createCardsApiHandler({
json(res, 201, body.mode === "group" ? service.expeditions.createGroup(session.player.id, body, requestKey) : service.expeditions.startSolo(session.player.id, body, requestKey));
return true;
}
if (req.method === "POST" && url.pathname === "/api/cards/progress/upgrade") {
const body = await readBody(req);
json(res, 200, service.expeditions.upgradeCard(session.player.id, { editionId: body.editionId, method: body.method }));
return true;
}
if (req.method === "POST" && url.pathname === "/api/cards/eclats/convert") {
json(res, 200, service.expeditions.convertStardust(session.player.id, { eclats: (await readBody(req)).eclats }));
return true;
}
const expeditionGroup = routeMatch(url.pathname, /^\/api\/cards\/expeditions\/([^/]+)\/(join|leave|depart)$/);
if (req.method === "POST" && expeditionGroup) {
const [expeditionId, action] = expeditionGroup;