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

@ -83,7 +83,7 @@ function CardAwakening({ catalog, progress, busy, runMutation, content }) {
// de ses statistiques.
function CardProgress({ catalog, state, progress, eclats, locked, busy, runMutation, onPreview, content }) {
const atCap = progress.nextCost == null;
const nextAwakening = progress.awakeningsAhead?.[0];
const awakeningsAhead = progress.awakeningsAhead ?? [];
return <>
{!atCap && progress.awakening && <CardAwakening catalog={catalog} progress={progress} busy={busy} runMutation={runMutation} content={content} />}
{!atCap && !progress.awakening && <section className="nebula-card-upgrade" aria-labelledby="nebula-card-upgrade-title">
@ -93,8 +93,8 @@ function CardProgress({ catalog, state, progress, eclats, locked, busy, runMutat
{progress.spare > 0 && <button className="nds-button" data-variant="secondary" type="button" disabled={busy} onClick={() => runMutation(() => upgradeCard(progress.editionId, "duplicate"))}>{content.upgradeDuplicate}</button>}
</div>
<p className="nebula-form-help">{fillTemplate(content.upgradeHelp, { eclats: formatEclats(eclats) })}</p>
{/* Tant qu'un palier reste à franchir, les doublons valent plus pour l'Éveil que pour un niveau ordinaire. */}
{nextAwakening && <p className="nds-inline-notice" data-variant="info">{fillTemplate(content.nextAwakening, { power: nextAwakening })}</p>}
{/* Tant qu'un palier reste à franchir, les doublons valent plus pour l'Éveil que pour un niveau ordinaire : un par Éveil restant. */}
{awakeningsAhead.length > 0 && <p className="nds-inline-notice" data-variant="info">{fillTemplate(awakeningsAhead.length > 1 ? content.nextAwakening : content.lastAwakening, { power: awakeningsAhead[0], count: awakeningsAhead.length })}</p>}
</section>}
<CardPlan key={`${progress.plan.id}-${progress.plan.points}-${JSON.stringify(progress.plan.allocation)}`} progress={progress} oblivions={state.items?.oblivion ?? 0} locked={locked} busy={busy} runMutation={runMutation} onPreview={onPreview} content={content.plan} statNames={content.stats} />
</>;