Tell players how many duplicates to keep for a card's remaining awakenings
All checks were successful
Validate and deploy Sokko G / validate (push) Successful in 22m57s
Validate and deploy Sokko G / deploy (push) Successful in 16s

The upgrade tip now gives the number of duplicates of the card needed for
every awakening still ahead. Two tiers crossed by the same level count as one
awakening.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Shinuwa 2026-11-24 10:38:14 +01:00
parent 461aa4e7c5
commit f73ea72d64
7 changed files with 20 additions and 9 deletions

View file

@ -315,6 +315,7 @@ export function validateSiteContent(site) {
"cards.cardSheet.eclatsAmount",
"cards.cardSheet.upgradeDuplicate",
"cards.cardSheet.nextAwakening",
"cards.cardSheet.lastAwakening",
"cards.cardSheet.awakeningWait",
"cards.cardSheet.awakeningTitle",
"cards.cardSheet.awakeningText",

View file

@ -440,6 +440,9 @@ test("a level costs Éclats by current power, so a rare pays the longer road to
test("awakening tiers stop levels, duplicates and experience until the card awakens", () => {
// Paliers à 70, 85 et 100 : une rare et une épique en franchissent trois, une légendaire deux, une mythique un seul.
assert.deepEqual(["rare", "epic", "legendary", "mythic"].map((rarity) => awakeningsAhead(rarity, 0, settings)), [[70, 85, 100], [70, 85, 100], [85, 100], [100]]);
// Il en reste un de moins une fois franchi, aucun au plafond ; deux paliers franchis par le même niveau ne font qu'un Éveil.
assert.deepEqual([6, 9, 12].map((level) => awakeningsAhead("rare", level, settings)), [[85, 100], [100], []]);
assert.deepEqual(awakeningsAhead("rare", 0, { ...settings, awakening: { ...settings.awakening, powers: [67, 70, 100] } }), [67, 100]);
assert.equal(awakeningPower("rare", 5, settings), 70);
assert.equal(awakeningPower("rare", 6, settings), null);
assert.equal(awakeningPower("epic", 2, settings), 70);