Explain each score bonus on hover: what triggers it and what it adds
Affinity, each resonance, cohesion, Expertise and the bonus cap now open a tooltip saying what triggered them and how much they add, with the values in force when the result was computed (results store them as bonusPcts; older ones get the explanation without a figure). The departure preview, group cards and return report share the same badges, and cohesion now shows in the report too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
9802db816e
commit
45d9180ed1
8 changed files with 61 additions and 21 deletions
|
|
@ -2,10 +2,10 @@
|
|||
// maintenant (seule ou en groupe), et l'inscription d'une carte.
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { fillTemplate, formatCountdown } from "./dailyShare.js";
|
||||
import { conditionText, dangerText, editionEntry, formatDecimal, formatEclats, helpScore, synergyLabels, tagLabel } from "./expeditionFormat.js";
|
||||
import { conditionText, dangerText, editionEntry, formatDecimal, formatEclats, helpScore, synergyBadges, tagLabel } from "./expeditionFormat.js";
|
||||
import { ExpeditionCardTile } from "./ExpeditionCardTile.jsx";
|
||||
import { DestinationArt, MainStatMark, MaskIcon } from "./ExpeditionLabels.jsx";
|
||||
import { PowerName, TierTile } from "./ExpeditionOutcome.jsx";
|
||||
import { BonusBadges, PowerName, TierTile } from "./ExpeditionOutcome.jsx";
|
||||
import { NebulaCard } from "./NebulaCard.jsx";
|
||||
|
||||
|
||||
|
|
@ -106,7 +106,7 @@ export function ExpeditionGroupCard({ catalog, group, cards, content, now, busy,
|
|||
const left = Math.max(0, group.recruitUntil - now);
|
||||
const span = Math.max(1, group.recruitUntil - (group.openedAt ?? group.recruitUntil - 3_600_000));
|
||||
const departTime = new Date(group.recruitUntil).toLocaleTimeString("fr-FR", { hour: "2-digit", minute: "2-digit" });
|
||||
const bonuses = [...synergyLabels(projected, catalog, content), ...(projected.cohesionPct > 0 ? [fillTemplate(content.cohesion, { value: projected.cohesionPct })] : [])];
|
||||
const bonuses = synergyBadges(projected, catalog, content);
|
||||
return <article ref={articleRef} className="nds-card nebula-expedition-group" data-invited={invited || undefined} aria-labelledby={`nebula-group-${group.id}`}>
|
||||
<div className="nebula-group-side">
|
||||
<DestinationArt catalog={catalog} destination={group.destination} />
|
||||
|
|
@ -142,7 +142,7 @@ export function ExpeditionGroupCard({ catalog, group, cards, content, now, busy,
|
|||
: <TierTile tier={projected.tier} scorePct={projected.scorePct} lootPct={group.tierLootPct?.[projected.tier]} content={content} />}
|
||||
{projected.players > 1 && <div><dt>{content.groupOutcomeGroupLoot}</dt><dd>{fillTemplate(content.lootBonus, { value: formatEclats(projected.lootPct / 100) })}</dd></div>}
|
||||
{(projected.powers || []).length > 0 && <div><dt>{content.groupOutcomePowers}</dt><dd className="nebula-group-powers">{projected.powers.map((power) => <PowerName key={power} power={power} content={content} stats={power === "attunement" ? (projected.attunement || []).map((item) => item.stat) : []} />)}</dd></div>}
|
||||
{bonuses.length > 0 && <div><dt>{content.groupOutcomeBonuses}</dt><dd>{bonuses.map((label) => <span key={label} className="nds-badge" data-variant="success">{label}</span>)}</dd></div>}
|
||||
{bonuses.length > 0 && <div><dt>{content.groupOutcomeBonuses}</dt><dd><BonusBadges badges={bonuses} /></dd></div>}
|
||||
</dl>
|
||||
<GroupRecap catalog={catalog} group={group} content={content} />
|
||||
{group.isMember && <InviteLink groupId={group.id} content={content} />}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue