Rebuild the Expeditions page around one guided journey: one card, no roles, leave alone or open to a group, follow the trip, keep a Journal
An expedition now opens with a single card. Its creator leaves alone right away, or opens it to the Guild board with an invite link and launches it whenever they want; at the end of recruitment it leaves by itself, alone or as a group, and is never dissolved for lack of players. Stars no longer depend on the number of players, a player has one expedition at a time, and roles are gone: each card brings its stats and a team adds them up, so every requirement is its per-slot share times the number of slots. The page follows the player's path: the offered destination card is revealed once in a modal, then Préparer shows the destinations (stat requirements, condition and dangers coloured for the chosen card, loot effects), a frame with the sent card in large size, its equipment slots and stats, and the duration and departure. Cards and commons are chosen in modals with sorts and highlighted current picks; tags get matching colours on the card and on equipment synergies. Once gone, the trip is shown with a progress bar and moving cards, the loot opens in a modal, and finished expeditions move to a Journal tab with the Grimoire. Power commons get short power names of their own and show their exact effects on hover, a card holds one power at a time, and Coup de folie now draws the real requirements between 80 % and 130 % of the shown ones, revealed on return. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
d70ae51265
commit
3720fd01f7
41 changed files with 1807 additions and 894 deletions
41
website/src/features/cards/ExpeditionCardTile.jsx
Normal file
41
website/src/features/cards/ExpeditionCardTile.jsx
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
// Rôle : une carte jouable dans la préparation d'une expédition ou l'inscription à une expédition ouverte : la carte, sa Puissance en
|
||||
// haut à droite, ses stats en icônes (nom au survol) et ses étiquettes : celles utiles à la destination en pastilles (condition,
|
||||
// dangers parés, Affinité), toutes au survol de l'icône d'étiquette.
|
||||
import { Tooltip } from "../../components/Tooltip.jsx";
|
||||
import { fillTemplate } from "./dailyShare.js";
|
||||
import { cardHelps, editionEntry, formatDecimal, STAT_BY_PLAN, STAT_IDS, tagLabel } from "./expeditionFormat.js";
|
||||
import { MaskIcon } from "./ExpeditionLabels.jsx";
|
||||
import { NebulaCard } from "./NebulaCard.jsx";
|
||||
|
||||
export function ExpeditionCardTile({ catalog, card, destination, content, selected, sortKey = null, onSelect }) {
|
||||
const entry = editionEntry(catalog, card.editionId);
|
||||
if (!entry) return null;
|
||||
const vocation = STAT_BY_PLAN[card.plan];
|
||||
const helps = cardHelps(card, destination);
|
||||
const tags = (card.tags || []).map((tag) => tagLabel(catalog, tag));
|
||||
const powerLabel = vocation ? fillTemplate(content.powerVocation, { power: card.power, stat: content.stats[vocation] }) : fillTemplate(content.power, { power: card.power });
|
||||
return <li data-busy={card.busy || undefined} data-selected={selected || undefined}>
|
||||
<div className="nebula-expedition-card-frame">
|
||||
<NebulaCard catalog={catalog} entry={entry} size="sm" selected={selected} disabled={card.busy} onSelect={card.busy ? undefined : onSelect}
|
||||
selectLabel={fillTemplate(content.chooseCard, { card: entry.card.name })} />
|
||||
<Tooltip className="nebula-expedition-card-power" content={powerLabel} aria-label={powerLabel} tabIndex={-1}>
|
||||
{vocation && <MaskIcon name={vocation} />}<span aria-hidden="true">{card.power}</span>
|
||||
</Tooltip>
|
||||
{card.busy && <span className="nebula-expedition-card-busy">{content.busy}</span>}
|
||||
</div>
|
||||
<span className="nebula-expedition-stats" role="list" aria-label={content.chosenStats}>{STAT_IDS.map((stat) => {
|
||||
const label = `${content.stats[stat]} : ${formatDecimal(card.stats[stat])}`;
|
||||
return <Tooltip key={stat} className="nebula-expedition-stat" content={content.stats[stat]} role="listitem" aria-label={label} tabIndex={-1} data-sorted={stat === sortKey || undefined}>
|
||||
<MaskIcon name={stat} /><span aria-hidden="true">{formatDecimal(card.stats[stat])}</span>
|
||||
</Tooltip>;
|
||||
})}</span>
|
||||
<span className="nebula-expedition-card-tags">
|
||||
{helps.condition && <span className="nds-badge" data-variant="success">{content.tagCondition}</span>}
|
||||
{helps.dangers.map((danger) => <span key={danger.id} className="nds-badge" data-variant="success">{fillTemplate(content.tagParry, { label: danger.label })}</span>)}
|
||||
{helps.affinity && <span className="nds-badge" data-variant="gold">{content.tagAffinity}</span>}
|
||||
<Tooltip className="nebula-expedition-card-taglist" content={tags.length ? tags.join(" · ") : content.tagsNone} aria-label={fillTemplate(content.tagsLabel, { tags: tags.join(", ") || content.tagsNone })} tabIndex={0}>
|
||||
<MaskIcon name="tag" /><span aria-hidden="true">{tags.length}</span>
|
||||
</Tooltip>
|
||||
</span>
|
||||
</li>;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue