Add the Rose des vents to draw new daily destinations once a day
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
ff206aadd4
commit
17a87a889a
21 changed files with 224 additions and 77 deletions
|
|
@ -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, craftPowerCommon, recallExpedition, departExpedition, joinExpedition, leaveExpedition, loadExpeditions, startExpedition } from "./cardsApi.js";
|
||||
import { addBonusDestination, claimExpedition, craftPowerCommon, recallExpedition, departExpedition, joinExpedition, leaveExpedition, loadExpeditions, rerollDestinations, startExpedition } from "./cardsApi.js";
|
||||
import { CurrencyAmount } from "./Currency.jsx";
|
||||
import { fillTemplate, formatCountdown } from "./dailyShare.js";
|
||||
import { ExpeditionGroupCard } from "./ExpeditionGroupCard.jsx";
|
||||
|
|
@ -38,7 +38,7 @@ function Atelier({ catalog, state, content, busy, onCraft }) {
|
|||
</div>;
|
||||
}
|
||||
|
||||
function ItemBag({ catalog, state, view, content, busy, onBonus, onCraft }) {
|
||||
function ItemBag({ catalog, state, view, content, busy, onBonus, onReroll, onCraft }) {
|
||||
const [crafting, setCrafting] = useState(false);
|
||||
const { items } = view;
|
||||
const used = new Set(view.destinations.map((destination) => destination.bonusSlot).filter(Boolean));
|
||||
|
|
@ -51,6 +51,7 @@ function ItemBag({ catalog, state, view, content, busy, onBonus, onCraft }) {
|
|||
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 === "windRose" && view.enabled && <button className="nds-button" data-size="sm" data-variant="secondary" type="button" disabled={busy || view.rerolledToday} onClick={onReroll}>{view.rerolledToday ? content.windRoseUsed : content.useWindRose}</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>;
|
||||
|
|
@ -99,6 +100,7 @@ export function ExpeditionsPanel({ catalog, state, runMutation, busy, content })
|
|||
const join = async (id, choice) => handle(await runMutation(expeditionCall(() => joinExpedition(id, choice))), content.joined);
|
||||
const leave = async (id) => handle(await runMutation(expeditionCall(() => leaveExpedition(id))), content.left);
|
||||
const bonus = async (item) => handle(await runMutation(expeditionCall(() => addBonusDestination(item))), content.bonusAdded);
|
||||
const reroll = async () => handle(await runMutation(expeditionCall(() => rerollDestinations())), content.rerolled);
|
||||
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 || "" }) });
|
||||
|
|
@ -122,7 +124,7 @@ export function ExpeditionsPanel({ catalog, state, runMutation, busy, content })
|
|||
</div>
|
||||
</div>
|
||||
<p className="nebula-form-help">{content.eclatsHelp}</p>
|
||||
<ItemBag catalog={catalog} state={state} view={view} content={content} busy={busy} onBonus={bonus} onCraft={craft} />
|
||||
<ItemBag catalog={catalog} state={state} view={view} content={content} busy={busy} onBonus={bonus} onReroll={reroll} onCraft={craft} />
|
||||
{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>}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,9 +25,10 @@ const EVENT_LABELS = {
|
|||
item_used: "Objet utilisé",
|
||||
destination_starter: "Carte de destination offerte",
|
||||
card_plan_changed: "Plan de progression choisi",
|
||||
oblivion_bought: "Parchemins d’oubli achetés"
|
||||
item_bought: "Objets achetés en boutique"
|
||||
};
|
||||
|
||||
const SHOP_ITEM_NAMES = { oblivion: "Parchemin d’oubli", windRose: "Rose des vents" };
|
||||
const PLAN_NAMES = { collection: "selon sa collection", leader: "Meneur", guardian: "Gardien", seeker: "Chercheur", navigator: "Navigateur", free: "points libres" };
|
||||
|
||||
// Le journal garde la quantité réellement offerte : les comptes plus anciens n'ont reçu qu'une ouverture.
|
||||
|
|
@ -72,14 +73,15 @@ 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", plan: "Plan d’atelier" }[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", windRose: "Rose des vents" }[details.item] || details.item;
|
||||
if (details.item === "windRose") return <span>{name} · nouvelles destinations du jour</span>;
|
||||
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>;
|
||||
}
|
||||
if (entry.type === "destination_starter") return <span>{cardReference(details.editionId, catalog)} · par la Guilde des Veilleurs</span>;
|
||||
if (entry.type === "card_plan_changed") return <span>{[cardReference(entry.entityId, catalog), PLAN_NAMES[details.plan] || details.plan, details.oblivion && "un Parchemin d’oubli utilisé"].filter(Boolean).join(" · ")}</span>;
|
||||
if (entry.type === "oblivion_bought") return <span>{details.count} Parchemin{details.count > 1 ? "s" : ""} · −{formatStardust(details.stardust)} d’étoiles</span>;
|
||||
if (entry.type === "item_bought") return <span>{details.count} × {SHOP_ITEM_NAMES[details.item] || details.item} · −{formatStardust(details.stardust)} d’étoiles</span>;
|
||||
if (entry.type === "eclats_converted") return <span>+{details.eclats} Éclats · −{formatStardust(details.stardust)} d’étoiles</span>;
|
||||
if (entry.type === "opening_purchased") return <span>{details.count > 1 && `${details.count} ouvertures · `}−{formatStardust(details.stardust ?? details.price)} d’étoiles</span>;
|
||||
if (!details.collectionId) return null;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
// Rôle : boutique du joueur ; affiche le solde de poussière d'étoiles, achète des ouvertures de paquet et, quand les Expéditions
|
||||
// sont ouvertes, change la poussière en Éclats d'étoile (Pont des Veilleurs) et vend les Parchemins d'oubli.
|
||||
// sont ouvertes, change la poussière en Éclats d'étoile (Pont des Veilleurs) et vend les objets de la boutique (Parchemin d'oubli,
|
||||
// Rose des vents).
|
||||
import { useState } from "react";
|
||||
import { buyOblivion, buyOpening, buyShopPack, convertStardust } from "./cardsApi.js";
|
||||
import { buyOpening, buyShopItem, buyShopPack, convertStardust } from "./cardsApi.js";
|
||||
import { DashboardAside } from "./CardsDashboard.jsx";
|
||||
import { CollectionCardBack } from "./CollectionCardBack.jsx";
|
||||
import { EclatsBalance, StardustBalance } from "./Currency.jsx";
|
||||
|
|
@ -13,7 +14,7 @@ import { formatStardust } from "./stardustFormat.js";
|
|||
// Bornes du serveur par achat (service.js et expedition-progress.js) : la quantité ne dépasse ni elles, ni ce que la poussière paie.
|
||||
const MAX_OPENINGS_PER_PURCHASE = 100;
|
||||
const MAX_ECLATS_PER_CONVERSION = 10_000;
|
||||
const MAX_OBLIVION_PER_PURCHASE = 100;
|
||||
const MAX_ITEMS_PER_PURCHASE = 100;
|
||||
const affordable = (stardust, price, limit) => (price > 0 ? Math.min(Math.floor(stardust / price), limit) : limit);
|
||||
|
||||
// Quantité saisie (texte du champ) : jamais au-dessus du maximum payable. Si le solde baisse (un autre achat), la valeur
|
||||
|
|
@ -59,6 +60,10 @@ export function ShopOblivionCover() {
|
|||
return <div className="nds-card-cover nebula-shop-item-cover"><img src="/static/img/cards/shop/oblivion.webp" alt="" loading="lazy" /></div>;
|
||||
}
|
||||
|
||||
export function ShopWindRoseCover() {
|
||||
return <div className="nds-card-cover nebula-shop-item-cover"><img src="/static/img/cards/shop/wind-rose.webp" alt="" loading="lazy" /></div>;
|
||||
}
|
||||
|
||||
// Bouton d'achat pleine largeur : l'action et le coût total en poussière.
|
||||
function BuyButton({ label, total, disabled, type = "submit", onClick }) {
|
||||
return <button className="nds-button nebula-shop-buy" data-variant="primary" type={type} disabled={disabled} aria-label={`${label} · ${formatStardust(total)}`} onClick={onClick}>
|
||||
|
|
@ -121,12 +126,13 @@ export function ShopPanel({ catalog, state, runMutation, busy, content, onOpenPa
|
|||
return Boolean(result);
|
||||
}
|
||||
|
||||
async function buyScrolls(count) {
|
||||
// Objet de la boutique : il rejoint le Sac du Veilleur.
|
||||
const buyItem = (item, done) => async (count) => {
|
||||
setNotice("");
|
||||
const result = await runMutation(() => buyOblivion(count));
|
||||
if (result) setNotice(fillTemplate(content.oblivionDone, { count, s: count > 1 ? "s" : "" }));
|
||||
const result = await runMutation(() => buyShopItem(item, count));
|
||||
if (result) setNotice(fillTemplate(done, { count, s: count > 1 ? "s" : "" }));
|
||||
return Boolean(result);
|
||||
}
|
||||
};
|
||||
|
||||
return <div className="nebula-shop">
|
||||
<div className="nds-section-heading nebula-section-heading">
|
||||
|
|
@ -158,8 +164,12 @@ export function ShopPanel({ catalog, state, runMutation, busy, content, onOpenPa
|
|||
stardust={wallet.stardust} busy={busy} onSubmit={convert} />}
|
||||
{/* Parchemin d'oubli : change le plan de progression d'une carte (fiche de la carte), au prix réglé dans la boutique. */}
|
||||
{showEclats && <QuantityItem id="oblivion" cover={<ShopOblivionCover />} title={content.oblivionTitle} description={fillTemplate(content.oblivionDescription, { count: state.items?.oblivion ?? 0 })}
|
||||
quantityLabel={content.oblivionLabel} rateLabel={content.unitRate} price={shop.oblivionPrice} limit={MAX_OBLIVION_PER_PURCHASE} actionLabel="Acheter"
|
||||
stardust={wallet.stardust} busy={busy} onSubmit={buyScrolls} />}
|
||||
quantityLabel={content.oblivionLabel} rateLabel={content.unitRate} price={shop.oblivionPrice} limit={MAX_ITEMS_PER_PURCHASE} actionLabel="Acheter"
|
||||
stardust={wallet.stardust} busy={busy} onSubmit={buyItem("oblivion", content.oblivionDone)} />}
|
||||
{/* Rose des vents : de nouvelles destinations pour la journée, depuis le Sac du Veilleur. */}
|
||||
{showEclats && <QuantityItem id="windRose" cover={<ShopWindRoseCover />} title={content.windRoseTitle} description={fillTemplate(content.windRoseDescription, { count: state.items?.windRose ?? 0 })}
|
||||
quantityLabel={content.windRoseLabel} rateLabel={content.unitRate} price={shop.windRosePrice} limit={MAX_ITEMS_PER_PURCHASE} actionLabel="Acheter"
|
||||
stardust={wallet.stardust} busy={busy} onSubmit={buyItem("windRose", content.windRoseDone)} />}
|
||||
</div>
|
||||
</section>
|
||||
</div>;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
// Rôle : règle la boutique ; poussière d'étoiles gagnée par doublon recyclé et prix des articles achetables, dont l'Éclat
|
||||
// d'étoile (Pont des Veilleurs) et le Parchemin d'oubli, enregistrés avec les réglages des Expéditions.
|
||||
// d'étoile (Pont des Veilleurs), le Parchemin d'oubli et la Rose des vents, enregistrés avec les réglages des Expéditions.
|
||||
import { useState } from "react";
|
||||
import { updateExpeditionSettings } from "../cardsApi.js";
|
||||
import { ShopEclatsCover, ShopOblivionCover, ShopOpeningCover, ShopPackCover } from "../ShopPanel.jsx";
|
||||
import { ShopEclatsCover, ShopOblivionCover, ShopOpeningCover, ShopPackCover, ShopWindRoseCover } from "../ShopPanel.jsx";
|
||||
import { formatStardust } from "../stardustFormat.js";
|
||||
import { ApplyActions } from "./adminSettingForm.jsx";
|
||||
import { ECLAT_PRICE_PATH, OBLIVION_PRICE_PATH } from "./expeditionSettingFields.js";
|
||||
import { ECLAT_PRICE_PATH, OBLIVION_PRICE_PATH, WIND_ROSE_PRICE_PATH } from "./expeditionSettingFields.js";
|
||||
import { inRange, MAX_VALUE, parse, shopSettingSaver } from "./adminSettings.js";
|
||||
|
||||
function RecyclingForm({ catalog, setting, busy, save }) {
|
||||
|
|
@ -35,7 +35,7 @@ function RecyclingForm({ catalog, setting, busy, save }) {
|
|||
</section>;
|
||||
}
|
||||
|
||||
// Articles des Expéditions : prix de l'Éclat d'étoile et du Parchemin d'oubli avec les bornes du schéma, ouverture des Expéditions
|
||||
// Articles des Expéditions : prix de l'Éclat d'étoile et des objets (Parchemin d'oubli, Rose des vents) avec les bornes du schéma, ouverture des Expéditions
|
||||
// et coût du premier niveau d'une légendaire.
|
||||
function expeditionArticles(expedition) {
|
||||
if (!expedition) return null;
|
||||
|
|
@ -45,24 +45,28 @@ function expeditionArticles(expedition) {
|
|||
return {
|
||||
open: settings.enabled,
|
||||
eclat: { price: settings.progression.stardustPerEclat, ...bounds(ECLAT_PRICE_PATH), legendaryLevel },
|
||||
oblivion: { price: settings.progression.oblivionPrice, ...bounds(OBLIVION_PRICE_PATH) }
|
||||
oblivion: { price: settings.progression.oblivionPrice, ...bounds(OBLIVION_PRICE_PATH) },
|
||||
windRose: { price: settings.progression.windRosePrice, ...bounds(WIND_ROSE_PRICE_PATH) }
|
||||
};
|
||||
}
|
||||
|
||||
function ArticlesForm({ catalog, setting, articles, busy, save, saveExpeditionPrices }) {
|
||||
const eclat = articles?.eclat;
|
||||
const oblivion = articles?.oblivion;
|
||||
const toDraft = () => ({ openingPrice: String(setting.openingPrice), packPrice: String(setting.shopPackPrice), eclatPrice: eclat ? String(eclat.price) : "", oblivionPrice: oblivion ? String(oblivion.price) : "" });
|
||||
const windRose = articles?.windRose;
|
||||
const toDraft = () => ({ openingPrice: String(setting.openingPrice), packPrice: String(setting.shopPackPrice), eclatPrice: eclat ? String(eclat.price) : "", oblivionPrice: oblivion ? String(oblivion.price) : "", windRosePrice: windRose ? String(windRose.price) : "" });
|
||||
const [draft, setDraft] = useState(toDraft);
|
||||
const openingPrice = parse(draft.openingPrice);
|
||||
const shopPackPrice = parse(draft.packPrice);
|
||||
const eclatPrice = parse(draft.eclatPrice);
|
||||
const oblivionPrice = parse(draft.oblivionPrice);
|
||||
const windRosePrice = parse(draft.windRosePrice);
|
||||
const eclatValid = !eclat || inRange(eclatPrice, eclat.min, eclat.max);
|
||||
const oblivionValid = !oblivion || inRange(oblivionPrice, oblivion.min, oblivion.max);
|
||||
const valid = inRange(openingPrice, 1, MAX_VALUE) && inRange(shopPackPrice, 1, MAX_VALUE) && eclatValid && oblivionValid;
|
||||
const windRoseValid = !windRose || inRange(windRosePrice, windRose.min, windRose.max);
|
||||
const valid = inRange(openingPrice, 1, MAX_VALUE) && inRange(shopPackPrice, 1, MAX_VALUE) && eclatValid && oblivionValid && windRoseValid;
|
||||
const shopChanged = openingPrice !== setting.openingPrice || shopPackPrice !== setting.shopPackPrice;
|
||||
const expeditionChanged = Boolean(articles) && (eclatPrice !== eclat.price || oblivionPrice !== oblivion.price);
|
||||
const expeditionChanged = Boolean(articles) && (eclatPrice !== eclat.price || oblivionPrice !== oblivion.price || windRosePrice !== windRose.price);
|
||||
const changed = valid && (shopChanged || expeditionChanged);
|
||||
const shopPack = catalog.collections.find((collection) => collection.packCategory === "shop");
|
||||
// Repère : combien de doublons communs il faut recycler pour une ouverture, selon le barème en vigueur.
|
||||
|
|
@ -114,6 +118,17 @@ function ArticlesForm({ catalog, setting, articles, busy, save, saveExpeditionPr
|
|||
: <p className="nebula-form-help" role="alert">Prix d’un Parchemin : entier de {oblivion.min} à {oblivion.max.toLocaleString("fr-FR")}.</p>}
|
||||
</div>
|
||||
</article>}
|
||||
{windRose && <article className="nds-card nebula-shop-item" data-item="windRose">
|
||||
<ShopWindRoseCover />
|
||||
<div className="nds-card-body nebula-shop-item-body nebula-admin-shop-item-fields">
|
||||
<h4>Rose des vents</h4>
|
||||
{!articles.open && <span className="nds-badge" data-variant="neutral">Fermé aux joueurs</span>}
|
||||
<label><span>Prix</span><input className="nds-input" aria-label="Prix d’une Rose des vents" type="number" inputMode="numeric" min={windRose.min} max={windRose.max} step="1" {...field("windRosePrice")} /></label>
|
||||
{windRoseValid
|
||||
? <p className="nebula-form-help">Tire de nouvelles destinations pour la journée, une fois par jour. Elle sort aussi rarement du butin (poids réglé dans Guilde › Expéditions).</p>
|
||||
: <p className="nebula-form-help" role="alert">Prix d’une Rose des vents : entier de {windRose.min} à {windRose.max.toLocaleString("fr-FR")}.</p>}
|
||||
</div>
|
||||
</article>}
|
||||
</div>
|
||||
{!(inRange(openingPrice, 1, MAX_VALUE) && inRange(shopPackPrice, 1, MAX_VALUE)) && <p className="nebula-form-help" role="alert">Prix entiers de 1 à {MAX_VALUE.toLocaleString("fr-FR")}.</p>}
|
||||
<ApplyActions
|
||||
|
|
@ -122,7 +137,7 @@ function ArticlesForm({ catalog, setting, articles, busy, save, saveExpeditionPr
|
|||
onCancel={() => setDraft(toDraft())}
|
||||
onApply={async () => {
|
||||
if (shopChanged) await save({ openingPrice, shopPackPrice });
|
||||
if (expeditionChanged) await saveExpeditionPrices({ eclatPrice, oblivionPrice });
|
||||
if (expeditionChanged) await saveExpeditionPrices({ eclatPrice, oblivionPrice, windRosePrice });
|
||||
}}
|
||||
confirmTitle="Appliquer les nouveaux prix ?"
|
||||
confirmMessage="Les prix s’appliquent immédiatement à tous les joueurs. Les ouvertures déjà achetées ne changent pas."
|
||||
|
|
@ -139,10 +154,11 @@ export function AdminShop({ catalog, dashboard, busy, runMutation, refreshDashbo
|
|||
const expedition = dashboard?.expeditionSettings;
|
||||
const articles = expeditionArticles(expedition);
|
||||
// Ces prix vivent dans les réglages des Expéditions : on renvoie ces réglages avec ces seuls prix changés.
|
||||
const saveExpeditionPrices = async ({ eclatPrice, oblivionPrice }) => {
|
||||
const saveExpeditionPrices = async ({ eclatPrice, oblivionPrice, windRosePrice }) => {
|
||||
const next = structuredClone(expedition.settings);
|
||||
next.progression.stardustPerEclat = eclatPrice;
|
||||
next.progression.oblivionPrice = oblivionPrice;
|
||||
next.progression.windRosePrice = windRosePrice;
|
||||
if (await runMutation(() => updateExpeditionSettings(next))) await refreshDashboard();
|
||||
};
|
||||
return <div className="nebula-admin-shop-page">
|
||||
|
|
@ -153,7 +169,7 @@ export function AdminShop({ catalog, dashboard, busy, runMutation, refreshDashbo
|
|||
{setting
|
||||
? <>
|
||||
<RecyclingForm key={JSON.stringify(setting.stardustValues)} catalog={catalog} setting={setting} busy={busy} save={save} />
|
||||
<ArticlesForm key={`${setting.openingPrice}-${setting.shopPackPrice}-${articles?.eclat.price}-${articles?.oblivion.price}`} catalog={catalog} setting={setting} articles={articles} busy={busy} save={save} saveExpeditionPrices={saveExpeditionPrices} />
|
||||
<ArticlesForm key={`${setting.openingPrice}-${setting.shopPackPrice}-${articles?.eclat.price}-${articles?.oblivion.price}-${articles?.windRose.price}`} catalog={catalog} setting={setting} articles={articles} busy={busy} save={save} saveExpeditionPrices={saveExpeditionPrices} />
|
||||
</>
|
||||
: <div className="nds-empty-state" aria-busy="true"><p>Chargement de la boutique…</p></div>}
|
||||
</div>;
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ export const EXPEDITION_OPEN_PATH = "enabled";
|
|||
export const ECLAT_PRICE_PATH = "progression.stardustPerEclat";
|
||||
// Le prix d'un Parchemin d'oubli (changer le plan de progression d'une carte) aussi.
|
||||
export const OBLIVION_PRICE_PATH = "progression.oblivionPrice";
|
||||
// Et celui d'une Rose des vents (retirer les destinations du jour).
|
||||
export const WIND_ROSE_PRICE_PATH = "progression.windRosePrice";
|
||||
|
||||
// Onglets de l'administration : chacun réunit des panneaux (groupes de réglages, ou « destinations », la liste des destinations).
|
||||
export const EXPEDITION_SETTING_THEMES = [
|
||||
|
|
@ -31,7 +33,8 @@ export const EXPEDITION_SETTING_GROUPS = [
|
|||
title: "Boutique",
|
||||
fields: [
|
||||
{ path: ECLAT_PRICE_PATH, label: "Prix d’un Éclat d’étoile en boutique", unit: "poussières" },
|
||||
{ path: OBLIVION_PRICE_PATH, label: "Prix d’un Parchemin d’oubli en boutique", unit: "poussières" }
|
||||
{ path: OBLIVION_PRICE_PATH, label: "Prix d’un Parchemin d’oubli en boutique", unit: "poussières" },
|
||||
{ path: WIND_ROSE_PRICE_PATH, label: "Prix d’une Rose des vents en boutique", unit: "poussières" }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -142,7 +145,8 @@ export const EXPEDITION_SETTING_GROUPS = [
|
|||
{ path: "items.weights.plan", label: "Poids : plan d’atelier" },
|
||||
{ path: "items.weights.anchor", label: "Poids : ancre des Veilleurs" },
|
||||
{ path: "items.weights.guideStar", label: "Poids : étoile guide (5e destination)" },
|
||||
{ path: "items.weights.skyChart", label: "Poids : carte céleste (6e destination)" }
|
||||
{ path: "items.weights.skyChart", label: "Poids : carte céleste (6e destination)" },
|
||||
{ path: "items.weights.windRose", label: "Poids : rose des vents (nouvelles destinations du jour)" }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -219,9 +219,14 @@ export function setCardPlan(editionId, plan, allocation = null) {
|
|||
return request("/progress/plan", { method: "PUT", body: JSON.stringify({ editionId, plan, allocation }) });
|
||||
}
|
||||
|
||||
// Achète des Parchemins d'oubli avec de la poussière d'étoiles.
|
||||
export function buyOblivion(count) {
|
||||
return request("/shop/oblivion", { method: "POST", body: JSON.stringify({ count }) });
|
||||
// Achète des objets de la boutique (« oblivion » : Parchemin d'oubli, « windRose » : Rose des vents) avec de la poussière d'étoiles.
|
||||
export function buyShopItem(item, count) {
|
||||
return request("/shop/items", { method: "POST", body: JSON.stringify({ item, count }) });
|
||||
}
|
||||
|
||||
// Rose des vents : de nouvelles destinations pour la journée (une fois par jour).
|
||||
export function rerollDestinations() {
|
||||
return request("/expeditions/reroll", { method: "POST" });
|
||||
}
|
||||
|
||||
// Pont à sens unique : de la poussière vers les Éclats d'étoile.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue