Make duplicates awaken cards at Power 70, 85 and 100

Opening packs stays useful once a collection is complete: the level that reaches an awakening tier can no longer be bought with Éclats, a duplicate or field experience. The card awakens without Éclats, with one of its own duplicates (a mythic also takes its legendary version) or with duplicates of its collection and rarity: 6 rares, 2 epics or 1 legendary, numbers that follow the 24/8/3 drop rates so a tier costs about the same packs at every rarity. Tiers and counts are admin settings, and the balance guide records the simulations and the options set aside.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Shinuwa 2026-11-19 09:40:41 +01:00
parent c7f951920e
commit 0ecb2cdbc5
12 changed files with 285 additions and 25 deletions

View file

@ -2050,7 +2050,31 @@ test("an administrator opens expeditions and a player leaves alone, follows the
await expect(summary.getByRole("list", { name: "Stats", exact: true }).getByRole("listitem")).toHaveCount(4);
await expect(sheet.getByRole("region", { name: "Améliorer", exact: true }).getByRole("button", { name: /^Améliorer · 70 Éclats$/ })).toBeVisible();
await expect(sheet.getByRole("heading", { name: "Équipements", exact: true })).toHaveCount(0);
// Une légendaire franchit ses paliers d'Éveil à 85 puis 100 : l'amélioration annonce le prochain.
await expect(sheet.getByRole("region", { name: "Améliorer", exact: true })).toContainText("Prochain palier d’Éveil : Puissance\u00a085.");
await partner.keyboard.press("Escape");
// Devant le palier (Puissance 80), l'Éveil remplace l'amélioration aux Éclats : le joueur a un doublon du Loup, qui l'éveillerait.
const { path: progressDatabasePath } = JSON.parse(await readFile(join(tmpdir(), "sokkog-cards-e2e-db.json"), "utf8"));
const setWolfLevel = (level) => {
const progressDatabase = new DatabaseSync(progressDatabasePath);
progressDatabase.prepare("UPDATE card_progress SET level = ? WHERE edition_id = 'aurora-wolf-standard' AND player_id = (SELECT id FROM players WHERE discord_id = 'e2e-partner')").run(level);
progressDatabase.close();
};
setWolfLevel(2);
await partner.reload();
await partner.getByRole("button", { name: "Voir Loup des Aurores", exact: true }).first().click();
await sheet.getByRole("tab", { name: "Amélioration", exact: true }).click();
await expect(summary).toContainText("Éveil nécessaire pour atteindre la Puissance\u00a085");
const awakening = sheet.getByRole("region", { name: "Éveil · Puissance\u00a085", exact: true });
await expect(awakening.getByRole("button", { name: "Éveiller avec un doublon", exact: true })).toBeEnabled();
await expect(awakening.getByRole("button", { name: "Éveiller avec 1 doublon de la collection", exact: true })).toBeVisible();
await expect(awakening).toContainText(/Doublons de rareté Légendaire disponibles dans .+ : [01] sur 1\./);
await expect(sheet.getByRole("region", { name: "Améliorer", exact: true })).toHaveCount(0);
await awakening.screenshot({ path: join(tmpdir(), "sokkog-cards-awakening.png") });
await partner.keyboard.press("Escape");
// La suite du parcours reprend le Loup au niveau 0.
setWolfLevel(0);
await partner.reload();
await partner.getByRole("navigation", { name: "Sections de Sokko TCG" }).getByRole("link", { name: "Historique", exact: true }).click();
await expect(partner.locator(".nebula-history-list li").filter({ hasText: "Expédition terminée" })).toContainText("★ · 2 h");
// Alertes Discord : désactivées tant que le joueur ne les active pas, une par une.