Add the Carnets des Veilleurs, the expedition-only Sokko TCG collection with power commons

- A new watchers-logbooks collection of category expedition never comes from packs, the shop or codes, and administrators cannot open it as a pack.
- Its six commons carry powers instead of stats (Longue-vue, Provisions, Carte au trésor, Talisman, Boussole folle, Filet à étoiles filantes); a card holds one power and each counts once per team.
- Powers change travel time, loot, score or tier, hide requirements, or catch a logbook card; each destination lists the logbook cards it can bring back.
- A workshop turns a plan and three duplicate commons into a power common.
- The fifteen cards ship without images with ready ChatGPT prompts; a card only drops or gets crafted once illustrated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Shinuwa 2026-11-15 17:40:51 +01:00
parent ae23adfdd9
commit 21827a252b
38 changed files with 939 additions and 76 deletions

View file

@ -4,6 +4,16 @@ import { engraveEquipment, equipCard } from "./cardsApi.js";
import { tagLabel } from "./expeditionFormat.js";
const STAT_SHORT = { bravoure: "Bravoure", endurance: "Endurance", fortune: "Fortune", orientation: "Orientation" };
// Pouvoirs des communes des Carnets : un avantage, une contrepartie (les valeurs se règlent dans l'administration).
const POWER_TEXT = {
longsight: "Pouvoir : plus de chance de rapporter un paquet, mais un trajet plus long",
rations: "Pouvoir : un trajet plus court, mais moins de butin",
treasureMap: "Pouvoir : un objet caché en plus, mais un score plus bas",
talisman: "Pouvoir : jamais de Retour difficile, mais jamais de Triomphe",
madCompass: "Pouvoir : bien plus de butin, mais des exigences inconnues jusqu’au retour",
starNet: "Pouvoir : une chance d’attraper une carte des Carnets, mais un peu moins de Fortune"
};
const itemText = (item) => (item.power ? POWER_TEXT[item.power] : statsText(item.stats));
const statsText = (stats) => Object.entries(stats).map(([stat, value]) => `${value > 0 ? "+" : "−"}${Math.abs(value)} ${STAT_SHORT[stat]}`).join(" · ");
export function CardEquipment({ catalog, state, progress, busy, runMutation }) {
@ -13,7 +23,8 @@ export function CardEquipment({ catalog, state, progress, busy, runMutation }) {
const nameOf = (cardId) => catalog.cards.find((card) => card.id === cardId)?.name || cardId;
const sharedTag = (item) => item.tags.find((tag) => progress.tags.includes(tag)) ?? null;
// Communes en synergie d'abord, puis les plus fortes sur leur meilleure stat.
const choices = [...(state.equipment || [])].sort((a, b) => Number(Boolean(sharedTag(b))) - Number(Boolean(sharedTag(a))) || Math.max(...Object.values(b.stats)) - Math.max(...Object.values(a.stats)));
const best = (item) => Math.max(0, ...Object.values(item.stats || {}));
const choices = [...(state.equipment || [])].sort((a, b) => Number(Boolean(sharedTag(b))) - Number(Boolean(sharedTag(a))) || best(b) - best(a));
const equip = async (slot, equipmentEditionId) => {
if (await runMutation(() => equipCard(progress.editionId, slot, equipmentEditionId))) setChoosing(null);
};
@ -24,7 +35,7 @@ export function CardEquipment({ catalog, state, progress, busy, runMutation }) {
const open = slot < progress.slots;
return <li key={slot} className="nds-list-row" data-locked={!open || undefined}>
{!open ? <span>Emplacement ouvert à Puissance {power}</span> : item ? <>
<span><strong>{item.name}</strong> {statsText(item.stats)}{item.synergyTag && <span className="nds-badge" data-variant="success">Synergie · {tagLabel(catalog, item.synergyTag)}</span>}{item.engraved && <span className="nds-badge" data-variant="gold">Gravée · {tagLabel(catalog, item.engraved)}</span>}</span>
<span><strong>{item.name}</strong> {itemText(item)}{item.synergyTag && <span className="nds-badge" data-variant="success">Synergie · {tagLabel(catalog, item.synergyTag)}</span>}{item.engraved && <span className="nds-badge" data-variant="gold">Gravée · {tagLabel(catalog, item.engraved)}</span>}</span>
{!item.engraved && !item.synergyTag && burins > 0 && <button className="nds-button" data-size="sm" data-variant="secondary" type="button" disabled={busy} aria-pressed={engraving === item.editionId} onClick={() => setEngraving(engraving === item.editionId ? null : item.editionId)}>Graver</button>}
<button className="nds-button" data-size="sm" data-variant="secondary" type="button" disabled={busy} onClick={() => equip(slot, null)}>Retirer</button>
{engraving === item.editionId && <div className="nebula-card-equipment-engrave" role="group" aria-label={`Étiquette à graver sur ${item.name}`}>
@ -42,7 +53,7 @@ export function CardEquipment({ catalog, state, progress, busy, runMutation }) {
const tag = sharedTag(item);
const elsewhere = item.equippedOn && item.equippedOn !== progress.editionId;
return <li key={item.editionId} className="nds-list-row">
<span><strong>{nameOf(item.cardId)}</strong> {statsText(item.stats)}{tag && <span className="nds-badge" data-variant="success">Synergie · {tagLabel(catalog, tag)}</span>}{elsewhere && <span className="nebula-form-help"> équipe déjà {nameOf(catalog.editions.find((edition) => edition.id === item.equippedOn)?.cardId)}</span>}</span>
<span><strong>{nameOf(item.cardId)}</strong> {itemText(item)}{tag && <span className="nds-badge" data-variant="success">Synergie · {tagLabel(catalog, tag)}</span>}{elsewhere && <span className="nebula-form-help"> équipe déjà {nameOf(catalog.editions.find((edition) => edition.id === item.equippedOn)?.cardId)}</span>}</span>
<button className="nds-button" data-size="sm" data-variant="primary" type="button" disabled={busy} aria-label={`Poser ${nameOf(item.cardId)}`} onClick={() => equip(choosing, item.editionId)}>Poser</button>
</li>;
})}</ul>}

View file

@ -48,8 +48,11 @@ export function ExpeditionGroupCard({ catalog, group, cards, content, now, busy,
</ul>
{group.freeRoles.length > 0 && <p className="nebula-form-help">{content.groupKeeper}</p>}
<div className="nebula-expedition-rewards" aria-label={content.groupProjected}>
<span className="nds-badge" data-variant={TIER_VARIANTS[projected.tier]}>{content.tiers[projected.tier]}</span>
<span className="nds-badge" data-variant="neutral">{fillTemplate(content.score, { score: formatEclats(projected.scorePct) })}</span>
{projected.hiddenRequirements ? <span className="nds-badge" data-variant="warning">{content.hiddenResult}</span> : <>
<span className="nds-badge" data-variant={TIER_VARIANTS[projected.tier]}>{content.tiers[projected.tier]}</span>
<span className="nds-badge" data-variant="neutral">{fillTemplate(content.score, { score: formatEclats(projected.scorePct) })}</span>
</>}
{(projected.powers || []).map((power) => <span key={power} className="nds-badge" data-variant="gold">{content.powers[power]}</span>)}
{synergyLabels(projected, catalog, content).map((label) => <span key={label} className="nds-badge" data-variant="success">{label}</span>)}
{projected.cohesionPct > 0 && <span className="nds-badge" data-variant="success">{fillTemplate(content.cohesion, { value: projected.cohesionPct })}</span>}
<span className="nds-badge" data-variant="gold">{fillTemplate(content.lootBonus, { value: formatEclats(projected.lootPct / 100) })}</span>

View file

@ -24,12 +24,23 @@ function Requirements({ catalog, option, content }) {
</div>;
}
function Preview({ catalog, preview, content }) {
function Preview({ catalog, preview, content, hours }) {
const powers = (preview.powers || []).map((power) => <span key={power} className="nds-badge" data-variant="gold">{content.powers[power]}</span>);
const travel = preview.travelHours != null && preview.travelHours !== hours && <p className="nebula-form-help">{fillTemplate(content.travelTime, { hours: formatDecimal(preview.travelHours) })}</p>;
const expected = <p className="nebula-expedition-expected">{fillTemplate(content.expected, { eclats: formatEclats(preview.expected.eclats), stardust: formatEclats(preview.expected.stardust), pack: formatEclats(preview.expected.packChancePct) })}</p>;
// Boussole folle : ni exigences ni résultat avant le retour.
if (preview.hiddenRequirements) return <div className="nebula-expedition-preview" aria-live="polite">
<div className="nebula-expedition-rewards">{powers}</div>
<p className="nds-inline-notice" data-variant="warning">{content.hiddenRequirements}</p>
{travel}
{expected}
</div>;
return <div className="nebula-expedition-preview" aria-live="polite">
<div className="nebula-expedition-rewards">
<span className="nds-badge" data-variant={TIER_VARIANTS[preview.tier]}>{content.tiers[preview.tier]}</span>
<span className="nds-badge" data-variant="neutral">{fillTemplate(content.score, { score: formatEclats(preview.scorePct) })}</span>
{synergyLabels(preview, catalog, content).map((label) => <span key={label} className="nds-badge" data-variant="success">{label}</span>)}
{powers}
{preview.limitedByStars && <span className="nds-badge" data-variant="warning">{fillTemplate(content.limitedByStars, { stars: preview.limitedByStars })}</span>}
</div>
<ul className="nebula-expedition-checks">{preview.requirements.map((requirement) => <li key={requirement.stat} data-met={requirement.ratioPct >= 100 || undefined}>
@ -38,7 +49,8 @@ function Preview({ catalog, preview, content }) {
{preview.conditionMet != null && <p className="nds-inline-notice" data-variant={preview.conditionMet ? "success" : "warning"}>{preview.conditionMet ? content.conditionMet : content.conditionUnmet}</p>}
{preview.dangers.map((danger) => <p key={danger.id} className="nds-inline-notice" data-variant={danger.countered ? "success" : "warning"}>{fillTemplate(danger.countered ? content.dangerCountered : content.dangerActive, { label: danger.label })}</p>)}
{preview.durationFactor < 1 && <p className="nds-inline-notice" data-variant="warning">{content.durationMalus}</p>}
<p className="nebula-expedition-expected">{fillTemplate(content.expected, { eclats: formatEclats(preview.expected.eclats), stardust: formatEclats(preview.expected.stardust), pack: formatEclats(preview.expected.packChancePct) })}</p>
{travel}
{expected}
</div>;
}
@ -148,7 +160,7 @@ export function ExpeditionPlanner({ catalog, view, mode = "solo", content, busy,
{!complete && <p className="nebula-form-help">{fillTemplate(content.previewEmpty, { count: slotCount })}</p>}
{group && <p className="nebula-form-help">{content.groupPreviewNote}</p>}
{shownPreview?.error && <p className="nds-inline-notice" data-variant="warning" role="status">{shownPreview.error}</p>}
{shownPreview?.value && <Preview catalog={catalog} preview={shownPreview.value} content={content} />}
{shownPreview?.value && <Preview catalog={catalog} preview={shownPreview.value} content={content} hours={hours} />}
<div className="nds-toolbar">
<button className="nds-button" data-variant="primary" type="button" disabled={busy || !complete} onClick={async () => { if (await onStart(body)) setSlots(slots.map(() => null)); }}>{group ? content.groupStart : content.start}</button>
</div>

View file

@ -6,11 +6,12 @@ import { formatStardust } from "./stardustFormat.js";
const TIER_VARIANTS = { struggle: "neutral", success: "success", triumph: "gold" };
function RewardBadges({ reward, content }) {
function RewardBadges({ catalog, reward, content }) {
return <div className="nebula-expedition-rewards">
<span className="nds-badge" data-variant="gold">{fillTemplate(content.rewardEclats, { value: formatEclats(reward.eclats) })}</span>
{reward.stardust > 0 && <span className="nds-badge" data-variant="neutral">{fillTemplate(content.rewardStardust, { value: formatStardust(reward.stardust) })}</span>}
{reward.packs.length > 0 && <span className="nds-badge" data-variant="success">{fillTemplate(content.rewardPacks, { count: reward.packs.length, s: reward.packs.length > 1 ? "s" : "" })}</span>}
{(reward.cards || []).map((editionId, index) => <span key={`${editionId}-${index}`} className="nds-badge" data-variant="gold">{fillTemplate(content.rewardCard, { card: editionEntry(catalog, editionId)?.card.name || editionId })}</span>)}
{(reward.items || []).map((item, index) => <span key={`${item}-${index}`} className="nds-badge" data-variant="success">{content.items[item]}</span>)}
{reward.recalledPct != null && <span className="nds-badge" data-variant="warning">{fillTemplate(content.recalledShare, { pct: reward.recalledPct })}</span>}
</div>;
@ -36,7 +37,7 @@ export function ExpeditionReport({ catalog, expedition, content, now, busy, onCl
<span className="nds-badge" data-variant="neutral">{fillTemplate(content.score, { score: formatEclats(expedition.result.scorePct) })}</span>
{synergyLabels(expedition.result, catalog, content).map((label) => <span key={label} className="nds-badge" data-variant="success">{label}</span>)}
</div>}
{expedition.reward && <RewardBadges reward={expedition.reward} content={content} />}
{expedition.reward && <RewardBadges catalog={catalog} reward={expedition.reward} content={content} />}
{expedition.result?.players > 1 && <p className="nebula-form-help">{fillTemplate(content.reportPlayers, { count: expedition.result.players, loot: formatEclats(expedition.result.lootPct / 100) })}</p>}
<ul className="nebula-expedition-report-team" aria-label={content.teamTitle}>{expedition.slots.map((slot) => {
const entry = slot.editionId && editionEntry(catalog, slot.editionId);

View file

@ -1,6 +1,6 @@
// Rôle : présente les Expéditions, quête de la Guilde : expéditions du joueur (retour, butin) et préparation d'une expédition solo.
import { useEffect, useState } from "react";
import { addBonusDestination, claimExpedition, convertStardust, recallExpedition, departExpedition, joinExpedition, leaveExpedition, loadExpeditions, startExpedition } from "./cardsApi.js";
import { addBonusDestination, claimExpedition, convertStardust, craftPowerCommon, recallExpedition, departExpedition, joinExpedition, leaveExpedition, loadExpeditions, startExpedition } from "./cardsApi.js";
import { fillTemplate, formatCountdown } from "./dailyShare.js";
import { ExpeditionGroupCard } from "./ExpeditionGroupCard.jsx";
import { ExpeditionPlanner } from "./ExpeditionPlanner.jsx";
@ -21,7 +21,25 @@ const expeditionCall = (call) => async () => {
};
// Sac du Veilleur : objets rapportés ; les destinations bonus s'ouvrent ici, l'ancre et le burin depuis l'expédition et la fiche de carte.
function ItemBag({ view, content, busy, onBonus }) {
// Atelier : 3 doublons de communes (une même commune peut compter autant de fois qu'elle a de doublons libres).
function Atelier({ catalog, state, content, busy, onCraft }) {
const [chosen, setChosen] = useState([]);
const commons = state.collection.filter((entry) => entry.spare > 0 && entry.edition?.rarity === "common");
const count = (editionId) => chosen.filter((id) => id === editionId).length;
return <div className="nebula-expedition-atelier">
<p className="nebula-form-help">{fillTemplate(content.atelierHelp, { count: chosen.length })}</p>
{commons.length ? <ul>{commons.map((entry) => <li key={entry.editionId}>
<button className="nds-button" data-size="sm" data-variant={count(entry.editionId) ? "primary" : "secondary"} type="button" disabled={busy || (chosen.length >= 3 && !count(entry.editionId))}
onClick={() => setChosen(count(entry.editionId) < entry.spare && chosen.length < 3 ? [...chosen, entry.editionId] : chosen.filter((id) => id !== entry.editionId))}>
{entry.card?.name || catalog.cards.find((card) => card.id === entry.edition?.cardId)?.name}{count(entry.editionId) ? ` ×${count(entry.editionId)}` : ""}
</button>
</li>)}</ul> : <p className="nebula-form-help">{content.atelierNoCommons}</p>}
<button className="nds-button" data-size="sm" data-variant="primary" type="button" disabled={busy || chosen.length !== 3} onClick={async () => { if (await onCraft(chosen)) setChosen([]); }}>{content.atelierAction}</button>
</div>;
}
function ItemBag({ catalog, state, view, content, busy, onBonus, onCraft }) {
const [crafting, setCrafting] = useState(false);
const { items } = view;
const used = new Set(view.destinations.map((destination) => destination.bonusSlot).filter(Boolean));
const actions = { guideStar: ["5", content.useGuideStar, 1], skyChart: ["6", content.useSkyChart, 1], fragment: ["hidden", content.useFragments, view.fragmentsForMap] };
@ -33,6 +51,8 @@ function ItemBag({ view, content, busy, onBonus }) {
return <li key={id} className="nds-list-row">
<span><strong>{content.items[id]}</strong> ×{count}<span className="nebula-form-help">{content.itemHelp[id]}</span></span>
{action && view.enabled && <button className="nds-button" data-size="sm" data-variant="secondary" type="button" disabled={busy || count < action[2] || used.has(action[0])} onClick={() => onBonus(id)}>{action[1]}</button>}
{id === "plan" && view.atelierAvailable && <button className="nds-button" data-size="sm" data-variant="secondary" type="button" aria-pressed={crafting} disabled={busy} onClick={() => setCrafting(!crafting)}>{content.atelierOpen}</button>}
{id === "plan" && crafting && <Atelier catalog={catalog} state={state} content={content} busy={busy} onCraft={async (ids) => { const done = await onCraft(ids); if (done) setCrafting(false); return done; }} />}
</li>;
})}</ul> : <p className="nebula-form-help">{content.bagEmpty}</p>}
</section>;
@ -100,6 +120,12 @@ export function ExpeditionsPanel({ catalog, state, runMutation, busy, content })
return Boolean(result);
};
const bonus = async (item) => handle(await runMutation(expeditionCall(() => addBonusDestination(item))), content.bonusAdded);
const craft = async (editionIds) => {
const result = await runMutation(expeditionCall(() => craftPowerCommon(editionIds)));
if (result?.crafted) setNotice({ variant: "success", text: fillTemplate(content.crafted, { card: catalog.cards.find((card) => card.id === catalog.editions.find((edition) => edition.id === result.crafted)?.cardId)?.name || "" }) });
else if (result?.expeditionError) setNotice({ variant: "warning", text: result.expeditionError.message });
return Boolean(result?.crafted);
};
const recall = async (id) => handle(await runMutation(expeditionCall(() => recallExpedition(id))), content.recalled);
const depart = async (id) => handle(await runMutation(expeditionCall(() => departExpedition(id))), content.departed);
@ -117,7 +143,7 @@ export function ExpeditionsPanel({ catalog, state, runMutation, busy, content })
</div>
</div>
<p className="nebula-form-help">{content.eclatsHelp}</p>
<ItemBag view={view} content={content} busy={busy} onBonus={bonus} />
<ItemBag catalog={catalog} state={state} view={view} content={content} busy={busy} onBonus={bonus} onCraft={craft} />
<BridgeForm rate={view.progression.stardustPerEclat} stardust={state.wallet.stardust} busy={busy} content={content} onConvert={convert} />
{notice && <p className="nds-inline-notice" data-variant={notice.variant} role="status">{notice.text}</p>}
{expired && <div className="nds-inline-notice nebula-daily-expired" data-variant="warning" role="status"><span>{content.expired}</span><button className="nds-button" data-size="sm" data-variant="primary" type="button" onClick={reload}>{content.reload}</button></div>}

View file

@ -67,7 +67,8 @@ function HistoryDetail({ entry, catalog }) {
if (entry.type === "expedition_dissolved") return <span>{details.destinationName} · {details.reason === "creator_left" ? "dissous par son créateur" : "pas assez de joueurs"} · cartes libérées</span>;
if (entry.type === "card_upgraded") return <span>{[cardReference(entry.entityId, catalog), `niveau ${details.level}`, `Puissance ${details.power}`, details.method === "duplicate" ? "un doublon utilisé" : `−${details.eclats} Éclats`].join(" · ")}</span>;
if (entry.type === "item_used") {
const name = { anchor: "Ancre des Veilleurs", guideStar: "Étoile guide", skyChart: "Carte céleste", fragment: "Carte au trésor", engraving: "Burin de graveur" }[details.item] || details.item;
const name = { anchor: "Ancre des Veilleurs", guideStar: "Étoile guide", skyChart: "Carte céleste", fragment: "Carte au trésor", engraving: "Burin de graveur", plan: "Plan d’atelier" }[details.item] || details.item;
if (details.item === "plan") return <span>{name} · {cardReference(details.editionId, catalog)} fabriquée</span>;
const detail = details.destinationName ? `${details.destinationName}${details.recalledPct != null ? ` · rappel à ${details.recalledPct} %` : ""}` : details.tag ? `${cardReference(details.editionId, catalog)} · étiquette gravée` : "";
return <span>{[name, detail].filter(Boolean).join(" · ")}</span>;
}

View file

@ -27,7 +27,7 @@ function collectionStats(catalog, lookup, collection) {
}
function CollectionBadges({ collection }) {
return <div className="nebula-admin-collection-badges"><span className="nds-badge" data-variant={collection.packCategory === "permanent" ? "neutral" : "gold"}>{{ event: "Événement", shop: "Boutique" }[collection.packCategory] || "Permanente"}</span><span className="nds-badge" data-variant={collection.active ? "success" : "neutral"}>{collection.active ? "Ouverte" : "Fermée"}</span></div>;
return <div className="nebula-admin-collection-badges"><span className="nds-badge" data-variant={collection.packCategory === "permanent" ? "neutral" : "gold"}>{{ event: "Événement", shop: "Boutique", expedition: "Expéditions" }[collection.packCategory] || "Permanente"}</span><span className="nds-badge" data-variant={collection.active ? "success" : "neutral"}>{collection.active ? "Ouverte" : "Fermée"}</span></div>;
}
function CollectionsIndex({ catalog, lookup, dashboard, busy, runMutation, refreshDashboard }) {
@ -181,7 +181,7 @@ function CollectionPage({ catalog, lookup, collection, dashboard, mutateCatalog,
<article className="nds-card nebula-admin-collection-card">
<div className="nebula-admin-collection-back"><CollectionCardBack collection={collection} /></div>
<div className="nebula-admin-collection-copy">
<div className="nebula-admin-collection-head"><CollectionBadges collection={collection} /><PackAvailability collection={collection} busy={busy} mutateCatalog={mutateCatalog} /></div>
<div className="nebula-admin-collection-head"><CollectionBadges collection={collection} />{collection.packCategory !== "expedition" && <PackAvailability collection={collection} busy={busy} mutateCatalog={mutateCatalog} />}</div>
<h3 className="nebula-admin-collection-title">{collection.name}</h3>
<span className="nebula-admin-system-name">Nom système · <strong>{collection.systemName}</strong> · <code>{collection.id}</code></span>
<p>{collection.description}</p>
@ -190,15 +190,17 @@ function CollectionPage({ catalog, lookup, collection, dashboard, mutateCatalog,
</article>
{/* Le paquet de la boutique puise dans les autres collections : rappel de ses sources et part de ses propres cartes. */}
{collection.packCategory === "shop" && <ShopPackContent catalog={catalog} collection={collection} dashboard={dashboard} busy={busy} runMutation={runMutation} refreshDashboard={refreshDashboard} />}
{/* Collection des Expéditions : pas de paquet ; ses cartes arrivent par le butin, le Filet et l'atelier, une fois illustrées. */}
{collection.packCategory === "expedition" && <p className="nds-inline-notice" data-variant="info">Cette collection ne s’obtient qu’en expédition : butin des destinations, Filet à étoiles filantes et atelier. Une carte n’y entre qu’une fois son illustration ajoutée au catalogue ({cards.filter((card) => card.image).length} sur {cards.length} illustrées).</p>}
{/* Taux de tirage et ouverture mythique côte à côte quand la place le permet, empilés sinon. */}
<div className="nebula-admin-collection-settings">
{collection.packCategory !== "expedition" && <div className="nebula-admin-collection-settings">
<section className="nds-panel nebula-admin-drop-rates" aria-labelledby="nebula-admin-drop-rates-title">
<h3 id="nebula-admin-drop-rates-title">Taux de tirage</h3>
<p className="nebula-form-help">Chaque carte d’un paquet est tirée indépendamment : d’abord la rareté selon ces poids, puis une variation au hasard parmi celles tirables de cette rareté. Les nouveaux taux s’appliquent immédiatement.</p>
<DropRatesEditor key={JSON.stringify(collection.dropWeights || null)} catalog={catalog} collection={collection} busy={busy} mutateCatalog={mutateCatalog} />
</section>
<CollectionOpeningPanel catalog={catalog} lookup={lookup} collection={collection} mutateCatalog={mutateCatalog} busy={busy} />
</div>
</div>}
<MythicVersions catalog={catalog} lookup={lookup} collection={collection} dashboard={dashboard} mutateCatalog={mutateCatalog} busy={busy} expandedCardId={expandedCardId} onToggle={(cardId) => (cardId ? configure(cardId) : setExpandedCardId(null))} />
<CollectionCards catalog={catalog} lookup={lookup} collection={collection} dashboard={dashboard} onConfigure={configure} />
</>;

View file

@ -146,7 +146,7 @@ function PackEditor({ catalog, lookup, pack, index, onChange, onRemove }) {
<Tooltip as="button" className="nds-icon-button" content="Retirer" data-size="sm" data-variant="danger" type="button" aria-label={`Retirer ${label}`} onClick={onRemove}><span className="ui-icon ui-icon-trash" aria-hidden="true" /></Tooltip>
</header>
<div className="nebula-form">
<SelectDropdown className="nebula-admin-reward-collection" label="Collection" value={pack.collectionId} options={catalog.collections.filter((entry) => entry.packCategory !== "shop").map((entry) => ({ value: entry.id, label: `${entry.name}${entry.active ? "" : " (fermée)"}` }))} onChange={(collectionId) => update({ collectionId, guaranteeEditionId: "" })} />
<SelectDropdown className="nebula-admin-reward-collection" label="Collection" value={pack.collectionId} options={catalog.collections.filter((entry) => entry.packCategory !== "shop" && entry.packCategory !== "expedition").map((entry) => ({ value: entry.id, label: `${entry.name}${entry.active ? "" : " (fermée)"}` }))} onChange={(collectionId) => update({ collectionId, guaranteeEditionId: "" })} />
<div className="nebula-admin-option">
<span className="nebula-admin-option-label">Taux de tirage</span>
<ChoiceGroup label={`Taux de tirage — ${label}`} value={pack.customRates ? "custom" : "pack"} options={[["pack", "Ceux du paquet"], ["custom", "Personnalisés"]]} onChange={(value) => update({ customRates: value === "custom" })} />

View file

@ -78,6 +78,23 @@ export const EXPEDITION_SETTING_GROUPS = [
{ path: "synergy.sistersCount", label: "Cartes d’un même thème pour les Étoiles sœurs" }
]
},
{
id: "powers",
title: "Pouvoirs et Carnets des Veilleurs",
help: "Avantage et contrepartie de chaque pouvoir des communes des Carnets (chaque pouvoir compte une fois par équipe), et chance de rapporter une carte des Carnets.",
fields: [
{ path: "powers.longsightPackPct", label: "Longue-vue : chance de paquet en plus (%)" },
{ path: "powers.longsightExtraHours", label: "Longue-vue : heures de trajet en plus" },
{ path: "powers.rationsTimePct", label: "Provisions : temps de trajet en moins (%)" },
{ path: "powers.rationsLootPct", label: "Provisions : butin en moins (%)" },
{ path: "powers.treasureMapScorePct", label: "Carte au trésor : score en moins (%)" },
{ path: "powers.madCompassLootPct", label: "Boussole folle : butin en plus (%)" },
{ path: "powers.starNetCardPct", label: "Filet à étoiles filantes : chance d’une carte des Carnets (%)" },
{ path: "powers.starNetFortune", label: "Filet à étoiles filantes : Fortune en moins (équipe)" },
{ path: "carnets.cardPerHourPermille", label: "Carte des Carnets par heure (‰)" },
{ path: "carnets.maxCards", label: "Cartes des Carnets au plus par expédition" }
]
},
{
id: "items",
title: "Objets",

View file

@ -236,3 +236,8 @@ export function recallExpedition(expeditionId) {
export function engraveEquipment(editionId, tag) {
return request("/equipment/engrave", { method: "POST", body: JSON.stringify({ editionId, tag }) });
}
// Atelier : un plan et 3 doublons de communes donnent une commune de pouvoir des Carnets des Veilleurs.
export function craftPowerCommon(editionIds) {
return request("/expeditions/atelier", { method: "POST", body: JSON.stringify({ editionIds }) });
}