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:
Shinuwa 2026-11-17 17:10:56 +01:00
parent d70ae51265
commit 3720fd01f7
41 changed files with 1807 additions and 894 deletions

View file

@ -1,14 +1,30 @@
// Rôle : petites étiquettes des Expéditions partagées par la préparation et le tableau des groupes : icônes en masque et rôles.
import { fillTemplate } from "./dailyShare.js";
// Rôle : petites étiquettes des Expéditions partagées par la préparation, le tableau et la fiche de carte : icônes en masque, et une
// stat en icône et en valeur, son nom au survol.
import { Tooltip } from "../../components/Tooltip.jsx";
// Icône monochrome teintée par la couleur du texte (static/icons, en masque) : rôles, cartes et objets.
// Icône monochrome teintée par la couleur du texte (static/icons, en masque) : stats, cartes et objets.
export function MaskIcon({ name }) {
return <span className="nebula-mask-icon" data-icon={name} aria-hidden="true" />;
}
// Rôle d'une place : icône de sa stat et nom du rôle ; `detail` ajoute la stat doublée (« Bravoure ×2 »).
export function RoleLabel({ stat, content, detail = false }) {
return <span className="nebula-role-label" title={fillTemplate(content.roleBadge, { role: content.roles[stat], stat: content.stats[stat] })}>
<MaskIcon name={stat} />{content.roles[stat]}{detail && <small>{fillTemplate(content.roleDouble, { stat: content.stats[stat] })}</small>}
</span>;
const formatValue = (value, signed) => {
const text = Number(value).toLocaleString("fr-FR", { maximumFractionDigits: 1 });
return signed && value > 0 ? `+${text}` : text.replace("-", "−");
};
// Une stat : son icône et sa valeur (signée pour un équipement), son nom au survol. `children` s'ajoute après la valeur.
export function StatValue({ stat, value, label, signed = false, className = "", children = null }) {
const text = formatValue(value, signed);
return <Tooltip className={`nebula-stat-value ${className}`.trim()} content={label} aria-label={`${label} : ${text}`} tabIndex={-1} data-sign={signed ? (value < 0 ? "minus" : "plus") : undefined}>
<MaskIcon name={stat} /><span aria-hidden="true">{text}</span>{children}
</Tooltip>;
}
// Stat la plus importante d'une destination (elle compte double dans le score, donc dans les récompenses) : une petite étoile or,
// expliquée au survol par l'infobulle du design system. Elle est souvent dans un bouton : pas d'arrêt au clavier en plus, le
// libellé de sa ligne le dit déjà.
export function MainStatMark({ content }) {
return <Tooltip className="nebula-main-stat-anchor" content={content.mainStatHelp} tabIndex={-1}>
<svg className="nebula-main-stat-mark" viewBox="0 0 10 10" aria-hidden="true"><path d="M5 .6 6.3 3.5 9.4 3.8 7 5.9 7.7 9 5 7.4 2.3 9 3 5.9.6 3.8 3.7 3.5Z" /></svg>
</Tooltip>;
}