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

@ -298,6 +298,18 @@ const MIGRATIONS = [
DROP TABLE gift_packs;
ALTER TABLE gift_packs_next RENAME TO gift_packs;
CREATE INDEX gift_packs_player_idx ON gift_packs(player_id, opened_at);
`,
// Améliorations des Expéditions : niveau et expérience de terrain (en % du niveau suivant) de chaque édition possédée par un joueur.
// La progression suit l'exemplaire gardé : seuls les doublons quittent une collection.
`
CREATE TABLE card_progress (
player_id TEXT NOT NULL REFERENCES players(id),
edition_id TEXT NOT NULL,
level INTEGER NOT NULL DEFAULT 0 CHECK (level >= 0),
field_xp INTEGER NOT NULL DEFAULT 0 CHECK (field_xp BETWEEN 0 AND 99),
updated_at INTEGER NOT NULL,
PRIMARY KEY (player_id, edition_id)
) STRICT;
`
];