Offer the destination items under Sokko TCG's destinations of the day
- Each owned item that would add a destination today (guide star, sky chart, or enough treasure map fragments) gets a dashed frame under the destinations: what it does, the difficulty and the loot bonus of the added destination. A click uses the item, as in the bag. - Frames appear only while the item is owned in sufficient number and its slot is still free, and share the destinations' grid. - "1 destinations débloquées" becomes singular. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
bffbe36cbe
commit
9d2c561fc6
10 changed files with 94 additions and 6 deletions
|
|
@ -499,3 +499,4 @@
|
||||||
{"id":"int-9c1c7118c72379d11d8df977783ca7ee","kind":"field_change","created_at":"2026-11-30T09:44:37.893504439Z","actor":"Shinuwa","issue_id":"sokko-g-s0op","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"openTestGroup (devPerks) + lancement par le joueur inscrit. npm run check 463/463, e2e cards 15/15."}}
|
{"id":"int-9c1c7118c72379d11d8df977783ca7ee","kind":"field_change","created_at":"2026-11-30T09:44:37.893504439Z","actor":"Shinuwa","issue_id":"sokko-g-s0op","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"openTestGroup (devPerks) + lancement par le joueur inscrit. npm run check 463/463, e2e cards 15/15."}}
|
||||||
{"id":"int-46c6b71c4d8b6eb50f64f8193e91d576","kind":"field_change","created_at":"2026-11-30T10:22:30.241142524Z","actor":"Shinuwa","issue_id":"sokko-g-bsx0","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"npm run check 463/463, e2e cards 15/15."}}
|
{"id":"int-46c6b71c4d8b6eb50f64f8193e91d576","kind":"field_change","created_at":"2026-11-30T10:22:30.241142524Z","actor":"Shinuwa","issue_id":"sokko-g-bsx0","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"npm run check 463/463, e2e cards 15/15."}}
|
||||||
{"id":"int-c432affacccf11095a7349e6a9cf1107","kind":"field_change","created_at":"2026-11-30T10:29:14.693613904Z","actor":"Shinuwa","issue_id":"sokko-g-akg7","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"Pastille ajoutée (CardsPage navigationCounts.packs), test e2e mis à jour"}}
|
{"id":"int-c432affacccf11095a7349e6a9cf1107","kind":"field_change","created_at":"2026-11-30T10:29:14.693613904Z","actor":"Shinuwa","issue_id":"sokko-g-akg7","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"Pastille ajoutée (CardsPage navigationCounts.packs), test e2e mis à jour"}}
|
||||||
|
{"id":"int-622c82c7a1fac1f9758f971874d8a80f","kind":"field_change","created_at":"2026-11-30T11:15:28.399226475Z","actor":"Shinuwa","issue_id":"sokko-g-wqfj","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"bonusOffers côté serveur + BonusOffers dans le planificateur. npm run check 463/463, e2e cards 15/15."}}
|
||||||
|
|
|
||||||
|
|
@ -2381,10 +2381,22 @@ test("an administrator opens expeditions and a player leaves alone, follows the
|
||||||
const groupDatabase = new DatabaseSync(groupDatabasePath);
|
const groupDatabase = new DatabaseSync(groupDatabasePath);
|
||||||
groupDatabase.prepare(`INSERT INTO collection_cards(player_id, edition_id, quantity, acquired_at) SELECT id, 'crimson-moon-kitsune-standard', 1, 0 FROM players WHERE discord_id = 'dev-admin'
|
groupDatabase.prepare(`INSERT INTO collection_cards(player_id, edition_id, quantity, acquired_at) SELECT id, 'crimson-moon-kitsune-standard', 1, 0 FROM players WHERE discord_id = 'dev-admin'
|
||||||
ON CONFLICT(player_id, edition_id) DO NOTHING`).run();
|
ON CONFLICT(player_id, edition_id) DO NOTHING`).run();
|
||||||
|
groupDatabase.prepare("INSERT INTO player_items(player_id, item_id, quantity) SELECT id, 'guideStar', 1 FROM players WHERE discord_id = 'dev-admin'").run();
|
||||||
groupDatabase.close();
|
groupDatabase.close();
|
||||||
await page.goto("/#/cards/expeditions");
|
await page.goto("/#/cards/expeditions");
|
||||||
// Première visite de ce joueur : la Guilde lui offre d'abord sa carte de destination de départ.
|
// Première visite de ce joueur : la Guilde lui offre d'abord sa carte de destination de départ.
|
||||||
await page.getByRole("dialog").getByRole("button", { name: "Préparer mon expédition", exact: true }).click();
|
await page.getByRole("dialog").getByRole("button", { name: "Préparer mon expédition", exact: true }).click();
|
||||||
|
// Une Étoile guide dans le Sac : un cadre pointillé sous les destinations propose de l'utiliser ; un clic ajoute la destination.
|
||||||
|
const offers = page.getByRole("list", { name: "Destinations à ajouter avec vos objets", exact: true });
|
||||||
|
const guideStarOffer = offers.getByRole("button", { name: /^Utiliser une Étoile guide pour ajouter une destination/ });
|
||||||
|
await expect(guideStarOffer).toBeVisible();
|
||||||
|
await expect(offers.getByRole("button")).toHaveCount(1);
|
||||||
|
await page.locator(".nebula-expedition-step").first().screenshot({ path: join(tmpdir(), "sokkog-cards-bonus-offers.png") });
|
||||||
|
const dailyDestinations = await page.locator(".nebula-expedition-destination").count();
|
||||||
|
await guideStarOffer.click();
|
||||||
|
await expect(page.getByRole("status").filter({ hasText: "Une nouvelle destination s’ajoute à votre journée." })).toBeVisible();
|
||||||
|
await expect(page.locator(".nebula-expedition-destination")).toHaveCount(dailyDestinations + 1);
|
||||||
|
await expect(offers).toHaveCount(0);
|
||||||
const openGroups = page.getByRole("region", { name: "Rejoindre une expédition", exact: true });
|
const openGroups = page.getByRole("region", { name: "Rejoindre une expédition", exact: true });
|
||||||
// Avant de rejoindre, les exigences sont déjà celles du groupe avec ce joueur ; elles restent sous les yeux dans le choix de la carte,
|
// Avant de rejoindre, les exigences sont déjà celles du groupe avec ce joueur ; elles restent sous les yeux dans le choix de la carte,
|
||||||
// puis comptent la carte choisie.
|
// puis comptent la carte choisie.
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
// Rôle : objets des Expéditions Sokko TCG : inventaire, ancre (rappel), destinations bonus (étoile guide, carte céleste, carte au trésor),
|
// Rôle : objets des Expéditions Sokko TCG : inventaire, ancre (rappel), destinations bonus (étoile guide, carte céleste, carte au trésor),
|
||||||
// Rose des vents (nouvelles destinations du jour) et gravure d'une étiquette sur un équipement. Ces méthodes s'ajoutent à ExpeditionService (Object.assign sur son prototype).
|
// Rose des vents (nouvelles destinations du jour) et gravure d'une étiquette sur un équipement. Ces méthodes s'ajoutent à ExpeditionService (Object.assign sur son prototype).
|
||||||
import { dailyDayKey } from "./daily.js";
|
import { dailyDayKey } from "./daily.js";
|
||||||
import { bonusSlotLevel, drawExpeditionDay, ITEM_IDS } from "./expedition-rules.js";
|
import { bonusLootPct, bonusSlotLevel, drawExpeditionDay, ITEM_IDS, starsForLevel } from "./expedition-rules.js";
|
||||||
|
|
||||||
function fail(status, code, message) {
|
function fail(status, code, message) {
|
||||||
throw Object.assign(new Error(message), { status, code });
|
throw Object.assign(new Error(message), { status, code });
|
||||||
|
|
@ -11,6 +11,17 @@ function fail(status, code, message) {
|
||||||
const BONUS_ITEMS = Object.freeze({ guideStar: "5", skyChart: "6", fragment: "hidden" });
|
const BONUS_ITEMS = Object.freeze({ guideStar: "5", skyChart: "6", fragment: "hidden" });
|
||||||
|
|
||||||
export const itemMethods = {
|
export const itemMethods = {
|
||||||
|
// Destinations que chaque objet ajouterait aujourd'hui, pour les proposer sous les destinations du jour : l'objet, le nombre
|
||||||
|
// d'exemplaires qu'il faut, si sa place est déjà prise, et les étoiles et le butin (en %) de la destination ajoutée.
|
||||||
|
bonusOffers(entries, settings) {
|
||||||
|
const dailyHighest = Math.max(0, ...entries.filter((entry) => !entry.bonusSlot).map((entry) => entry.level ?? 0));
|
||||||
|
const used = new Set(entries.map((entry) => entry.bonusSlot).filter(Boolean).map(String));
|
||||||
|
return Object.entries(BONUS_ITEMS).map(([item, slot]) => ({
|
||||||
|
item, slot, used: used.has(slot), required: item === "fragment" ? settings.items.fragmentsForMap : 1,
|
||||||
|
stars: starsForLevel(bonusSlotLevel(slot, settings, dailyHighest), settings), lootPct: bonusLootPct(slot, settings)
|
||||||
|
}));
|
||||||
|
},
|
||||||
|
|
||||||
itemsOf(playerId) {
|
itemsOf(playerId) {
|
||||||
const items = Object.fromEntries(ITEM_IDS.map((id) => [id, 0]));
|
const items = Object.fromEntries(ITEM_IDS.map((id) => [id, 0]));
|
||||||
for (const row of this.db.prepare("SELECT item_id, quantity FROM player_items WHERE player_id = ?").all(playerId)) items[row.item_id] = row.quantity;
|
for (const row of this.db.prepare("SELECT item_id, quantity FROM player_items WHERE player_id = ?").all(playerId)) items[row.item_id] = row.quantity;
|
||||||
|
|
|
||||||
|
|
@ -477,7 +477,10 @@ export class ExpeditionService {
|
||||||
const { day, entries } = this.today(settings, playerId);
|
const { day, entries } = this.today(settings, playerId);
|
||||||
// Progression : destinations débloquées par les cartes de destination, sur toutes les destinations visibles.
|
// Progression : destinations débloquées par les cartes de destination, sur toutes les destinations visibles.
|
||||||
const unlocked = { count: this.unlockedDestinationIds(playerId).size, total: this.destinations.filter((destination) => !destination.hidden).length };
|
const unlocked = { count: this.unlockedDestinationIds(playerId).size, total: this.destinations.filter((destination) => !destination.hidden).length };
|
||||||
return { ...base, day, unlocked, starterCard: this.starterCard(playerId), destinations: entries.map((entry) => this.destinationView(entry, settings)), cards: this.eligibleCards(playerId, settings) };
|
return {
|
||||||
|
...base, day, unlocked, starterCard: this.starterCard(playerId), destinations: entries.map((entry) => this.destinationView(entry, settings)),
|
||||||
|
bonusOffers: this.bonusOffers(entries, settings), cards: this.eligibleCards(playerId, settings)
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
claim(playerId, expeditionId) {
|
claim(playerId, expeditionId) {
|
||||||
|
|
|
||||||
|
|
@ -547,6 +547,15 @@ export function validateSiteContent(site) {
|
||||||
"cards.expeditions.testDuration",
|
"cards.expeditions.testDuration",
|
||||||
"cards.expeditions.testPlayerAdded",
|
"cards.expeditions.testPlayerAdded",
|
||||||
"cards.expeditions.testGroup",
|
"cards.expeditions.testGroup",
|
||||||
|
"cards.expeditions.bonusOffersTitle",
|
||||||
|
"cards.expeditions.bonusOffer.guideStar.title",
|
||||||
|
"cards.expeditions.bonusOffer.guideStar.effect",
|
||||||
|
"cards.expeditions.bonusOffer.skyChart.title",
|
||||||
|
"cards.expeditions.bonusOffer.skyChart.effect",
|
||||||
|
"cards.expeditions.bonusOffer.fragment.title",
|
||||||
|
"cards.expeditions.bonusOffer.fragment.effect",
|
||||||
|
"cards.expeditions.bonusOfferStars",
|
||||||
|
"cards.expeditions.bonusOfferLoot",
|
||||||
"cards.expeditions.testGroupOpened",
|
"cards.expeditions.testGroupOpened",
|
||||||
"cards.expeditions.reportPlayers",
|
"cards.expeditions.reportPlayers",
|
||||||
"cards.expeditions.you",
|
"cards.expeditions.you",
|
||||||
|
|
|
||||||
|
|
@ -1278,11 +1278,17 @@ test("objects add bonus destinations, recall an expedition with an anchor and en
|
||||||
give(["guideStar", "guideStar", "skyChart", "anchor", "engraving", "fragment", "fragment", "fragment", "fragment"]);
|
give(["guideStar", "guideStar", "skyChart", "anchor", "engraving", "fragment", "fragment", "fragment", "fragment"]);
|
||||||
const before = service.expeditions.getExpeditions(player.id);
|
const before = service.expeditions.getExpeditions(player.id);
|
||||||
assert.equal(before.items.guideStar, 2);
|
assert.equal(before.items.guideStar, 2);
|
||||||
|
// Propositions sous les destinations du jour : ce que chaque objet ajouterait (étoiles, butin), avant de l'utiliser.
|
||||||
|
const offer = (view, item) => view.bonusOffers.find((entry) => entry.item === item);
|
||||||
|
assert.deepEqual(before.bonusOffers.map(({ item, used, required, stars, lootPct }) => [item, used, required, stars, lootPct]),
|
||||||
|
[["guideStar", false, 1, 3, 100], ["skyChart", false, 1, 4, 125], ["fragment", false, 4, 5, 150]]);
|
||||||
const added = service.expeditions.addBonusDestination(player.id, { item: "guideStar" }).expeditions;
|
const added = service.expeditions.addBonusDestination(player.id, { item: "guideStar" }).expeditions;
|
||||||
assert.equal(added.destinations.length, 5);
|
assert.equal(added.destinations.length, 5);
|
||||||
const bonus = added.destinations.find((destination) => destination.bonusSlot === "5");
|
const bonus = added.destinations.find((destination) => destination.bonusSlot === "5");
|
||||||
assert.ok(!before.destinations.some((destination) => destination.id === bonus.id));
|
assert.ok(!before.destinations.some((destination) => destination.id === bonus.id));
|
||||||
assert.deepEqual([bonus.level, bonus.star], [2, 3]);
|
assert.deepEqual([bonus.level, bonus.star], [2, 3]);
|
||||||
|
assert.equal(offer(added, "guideStar").used, true);
|
||||||
|
assert.equal(offer(added, "skyChart").used, false);
|
||||||
assert.throws(() => service.expeditions.addBonusDestination(player.id, { item: "guideStar" }), (error) => error.code === "BONUS_ALREADY_USED");
|
assert.throws(() => service.expeditions.addBonusDestination(player.id, { item: "guideStar" }), (error) => error.code === "BONUS_ALREADY_USED");
|
||||||
const sky = service.expeditions.addBonusDestination(player.id, { item: "skyChart" }).expeditions.destinations.find((destination) => destination.bonusSlot === "6");
|
const sky = service.expeditions.addBonusDestination(player.id, { item: "skyChart" }).expeditions.destinations.find((destination) => destination.bonusSlot === "6");
|
||||||
assert.deepEqual([sky.level, sky.star], [3, 4]);
|
assert.deepEqual([sky.level, sky.star], [3, 4]);
|
||||||
|
|
|
||||||
|
|
@ -481,7 +481,7 @@
|
||||||
"rewardCollection": "Cartes de la collection {collection}",
|
"rewardCollection": "Cartes de la collection {collection}",
|
||||||
"lootEffect": "{loot} : {value}",
|
"lootEffect": "{loot} : {value}",
|
||||||
"loot": { "eclats": "Éclats", "stardust": "Poussière d’étoiles", "cards": "Cartes", "items": "Objets" },
|
"loot": { "eclats": "Éclats", "stardust": "Poussière d’étoiles", "cards": "Cartes", "items": "Objets" },
|
||||||
"unlockedDestinations": "{count} destinations débloquées sur {total}. Les autres s’ouvrent avec leur carte de destination : rapportez-la d’expédition, ou rejoignez un groupe qui y part.",
|
"unlockedDestinations": "{count} destination{s} débloquée{s} sur {total}. Les autres s’ouvrent avec leur carte de destination : rapportez-la d’expédition, ou rejoignez un groupe qui y part.",
|
||||||
"difficultyTitle": "3. Durée et départ",
|
"difficultyTitle": "3. Durée et départ",
|
||||||
"starsLabel": "Difficulté : {stars}",
|
"starsLabel": "Difficulté : {stars}",
|
||||||
"durationLabel": "Durée",
|
"durationLabel": "Durée",
|
||||||
|
|
@ -676,6 +676,14 @@
|
||||||
"useWindRose": "Changer les destinations (Rose des vents ×{count})",
|
"useWindRose": "Changer les destinations (Rose des vents ×{count})",
|
||||||
"rerolled": "Les vents ont tourné : voici vos nouvelles destinations du jour.",
|
"rerolled": "Les vents ont tourné : voici vos nouvelles destinations du jour.",
|
||||||
"bonusAdded": "Une nouvelle destination s’ajoute à votre journée.",
|
"bonusAdded": "Une nouvelle destination s’ajoute à votre journée.",
|
||||||
|
"bonusOffersTitle": "Destinations à ajouter avec vos objets",
|
||||||
|
"bonusOffer": {
|
||||||
|
"guideStar": { "title": "Utiliser une Étoile guide pour ajouter une destination", "effect": "Une destination de plus pour aujourd’hui, juste sous votre niveau le plus difficile du jour." },
|
||||||
|
"skyChart": { "title": "Utiliser une Carte céleste pour ajouter une destination", "effect": "Une destination de plus pour aujourd’hui, à votre niveau le plus difficile du jour, avec un meilleur butin." },
|
||||||
|
"fragment": { "title": "Réunir {count} Fragments de carte au trésor pour ajouter une destination cachée", "effect": "Une destination secrète, introuvable autrement, au niveau le plus difficile du jeu, avec le meilleur butin." }
|
||||||
|
},
|
||||||
|
"bonusOfferStars": "Difficulté {stars}",
|
||||||
|
"bonusOfferLoot": "Butin ×{value}",
|
||||||
"bonusSlots": { "5": "Étoile guide", "6": "Carte céleste", "hidden": "Destination cachée" },
|
"bonusSlots": { "5": "Étoile guide", "6": "Carte céleste", "hidden": "Destination cachée" },
|
||||||
"recall": "Rappeler avec l’ancre ({count})",
|
"recall": "Rappeler avec l’ancre ({count})",
|
||||||
"recalled": "L’expédition est rappelée : récupérez la part de butin déjà gagnée.",
|
"recalled": "L’expédition est rappelée : récupérez la part de butin déjà gagnée.",
|
||||||
|
|
|
||||||
|
|
@ -158,6 +158,29 @@ function DestinationRequirements({ requirements, card, content }) {
|
||||||
|
|
||||||
// Une destination du jour, en deux rangées alignées avec celles de la carte voisine : en-tête (paysage réduit à gauche ; nom, étoiles,
|
// Une destination du jour, en deux rangées alignées avec celles de la carte voisine : en-tête (paysage réduit à gauche ; nom, étoiles,
|
||||||
// description et butin à droite), puis ses exigences (stats, condition et dangers).
|
// description et butin à droite), puis ses exigences (stats, condition et dangers).
|
||||||
|
// Objets du Sac qui ajouteraient une destination aujourd'hui : un cadre pointillé par objet possédé en nombre suffisant et dont la
|
||||||
|
// place est libre, avec ce que vaudrait la destination ajoutée (étoiles, butin). Un clic utilise l'objet.
|
||||||
|
function BonusOffers({ view, content, busy, onBonus }) {
|
||||||
|
const offers = (view.bonusOffers || []).filter((offer) => view.enabled && !offer.used && (view.items?.[offer.item] ?? 0) >= offer.required);
|
||||||
|
if (!offers.length) return null;
|
||||||
|
return <ul className="nebula-bonus-offers" aria-label={content.bonusOffersTitle}>{offers.map((offer) => {
|
||||||
|
const title = fillTemplate(content.bonusOffer[offer.item].title, { count: offer.required });
|
||||||
|
return <li key={offer.item}>
|
||||||
|
<button className="nebula-bonus-offer" type="button" disabled={busy} onClick={() => onBonus(offer.item)}>
|
||||||
|
<img src={ITEM_ART[offer.item]} alt="" />
|
||||||
|
<span className="nebula-bonus-offer-copy">
|
||||||
|
<strong>{title}</strong>
|
||||||
|
<span className="nebula-form-help">{content.bonusOffer[offer.item].effect}</span>
|
||||||
|
<span className="nebula-bonus-offer-badges">
|
||||||
|
<span className="nds-badge" data-variant="gold">{fillTemplate(content.bonusOfferStars, { stars: "★".repeat(offer.stars) })}</span>
|
||||||
|
{offer.lootPct !== 100 && <span className="nds-badge" data-variant="success">{fillTemplate(content.bonusOfferLoot, { value: formatEclats(offer.lootPct / 100) })}</span>}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
</li>;
|
||||||
|
})}</ul>;
|
||||||
|
}
|
||||||
|
|
||||||
function DestinationOption({ catalog, item, selected, card, view, content, onSelect }) {
|
function DestinationOption({ catalog, item, selected, card, view, content, onSelect }) {
|
||||||
const collection = item.rewardCollectionId && (catalog.collections.find((entry) => entry.id === item.rewardCollectionId)?.name || item.rewardCollectionId);
|
const collection = item.rewardCollectionId && (catalog.collections.find((entry) => entry.id === item.rewardCollectionId)?.name || item.rewardCollectionId);
|
||||||
return <button type="button" className="nebula-expedition-destination" aria-pressed={selected} onClick={onSelect}>
|
return <button type="button" className="nebula-expedition-destination" aria-pressed={selected} onClick={onSelect}>
|
||||||
|
|
@ -184,7 +207,7 @@ function DestinationOption({ catalog, item, selected, card, view, content, onSel
|
||||||
</button>;
|
</button>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function ExpeditionPlanner({ catalog, state, view, content, busy, onStart, onReroll, runMutation }) {
|
export function ExpeditionPlanner({ catalog, state, view, content, busy, onStart, onReroll, onBonus, runMutation }) {
|
||||||
// Destinations de la plus facile à la plus difficile.
|
// Destinations de la plus facile à la plus difficile.
|
||||||
const destinations = useMemo(() => [...view.destinations].sort((a, b) => (a.level ?? 0) - (b.level ?? 0)), [view.destinations]);
|
const destinations = useMemo(() => [...view.destinations].sort((a, b) => (a.level ?? 0) - (b.level ?? 0)), [view.destinations]);
|
||||||
const [destinationId, setDestinationId] = useState(destinations[0]?.id || "");
|
const [destinationId, setDestinationId] = useState(destinations[0]?.id || "");
|
||||||
|
|
@ -227,11 +250,12 @@ export function ExpeditionPlanner({ catalog, state, view, content, busy, onStart
|
||||||
<img src={ITEM_ART.windRose} alt="" />{fillTemplate(content.useWindRose, { count: view.items.windRose })}
|
<img src={ITEM_ART.windRose} alt="" />{fillTemplate(content.useWindRose, { count: view.items.windRose })}
|
||||||
</button>}
|
</button>}
|
||||||
</div>
|
</div>
|
||||||
{view.unlocked && view.unlocked.count < view.unlocked.total && <p className="nebula-form-help">{fillTemplate(content.unlockedDestinations, view.unlocked)}</p>}
|
{view.unlocked && view.unlocked.count < view.unlocked.total && <p className="nebula-form-help">{fillTemplate(content.unlockedDestinations, { ...view.unlocked, s: view.unlocked.count > 1 ? "s" : "" })}</p>}
|
||||||
<LootLegend content={content} />
|
<LootLegend content={content} />
|
||||||
<p className="nebula-form-help">{card ? fillTemplate(content.requirementsHelpCard, { card: editionEntry(catalog, card.editionId)?.card.name || "" }) : content.requirementsHelp}</p>
|
<p className="nebula-form-help">{card ? fillTemplate(content.requirementsHelpCard, { card: editionEntry(catalog, card.editionId)?.card.name || "" }) : content.requirementsHelp}</p>
|
||||||
<div className="nebula-expedition-destinations">{destinations.map((item) => <DestinationOption key={item.id} catalog={catalog} item={item} selected={item.id === destination.id} card={card}
|
<div className="nebula-expedition-destinations">{destinations.map((item) => <DestinationOption key={item.id} catalog={catalog} item={item} selected={item.id === destination.id} card={card}
|
||||||
view={view} content={content} onSelect={() => setDestinationId(item.id)} />)}</div>
|
view={view} content={content} onSelect={() => setDestinationId(item.id)} />)}</div>
|
||||||
|
<BonusOffers view={view} content={content} busy={busy} onBonus={onBonus} />
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section className="nds-panel nebula-expedition-step" aria-labelledby="nebula-expedition-team-title">
|
<section className="nds-panel nebula-expedition-step" aria-labelledby="nebula-expedition-team-title">
|
||||||
|
|
|
||||||
|
|
@ -273,7 +273,7 @@ export function ExpeditionsPanel({ catalog, state, runMutation, busy, content, j
|
||||||
<span className="nebula-form-help">{fillTemplate(content.nextDay, { time: formatCountdown(view.nextDayAt - now) })}</span>
|
<span className="nebula-form-help">{fillTemplate(content.nextDay, { time: formatCountdown(view.nextDayAt - now) })}</span>
|
||||||
</div>
|
</div>
|
||||||
<ItemBag catalog={catalog} state={state} view={view} content={content} busy={busy} onBonus={bonus} onCraft={craft} onAtelierClosed={reload} runMutation={equipAndRefresh} />
|
<ItemBag catalog={catalog} state={state} view={view} content={content} busy={busy} onBonus={bonus} onCraft={craft} onAtelierClosed={reload} runMutation={equipAndRefresh} />
|
||||||
<ExpeditionPlanner key={view.day} catalog={catalog} state={state} view={view} content={content} busy={busy} onStart={start} onReroll={reroll} runMutation={equipAndRefresh} />
|
<ExpeditionPlanner key={view.day} catalog={catalog} state={state} view={view} content={content} busy={busy} onStart={start} onReroll={reroll} onBonus={bonus} runMutation={equipAndRefresh} />
|
||||||
</>}
|
</>}
|
||||||
</>}
|
</>}
|
||||||
{view.enabled && limitReached && invited && !invited.isMember && <p className="nds-inline-notice" data-variant="info">{content.groupLimit}</p>}
|
{view.enabled && limitReached && invited && !invited.isMember && <p className="nds-inline-notice" data-variant="info">{content.groupLimit}</p>}
|
||||||
|
|
|
||||||
|
|
@ -103,3 +103,17 @@
|
||||||
.nebula-loot-legend [data-trend="up"] .nebula-loot-arrow { fill: var(--color-success); }
|
.nebula-loot-legend [data-trend="up"] .nebula-loot-arrow { fill: var(--color-success); }
|
||||||
.nebula-loot-legend [data-trend="down"] .nebula-loot-arrow { fill: var(--color-danger); }
|
.nebula-loot-legend [data-trend="down"] .nebula-loot-arrow { fill: var(--color-danger); }
|
||||||
|
|
||||||
|
|
||||||
|
// Destinations à ajouter avec un objet du Sac, sous celles du jour : un cadre pointillé par objet, l'illustration de l'objet à
|
||||||
|
// gauche, l'invitation, l'effet et ce que vaudrait la destination. Un clic utilise l'objet.
|
||||||
|
// Même grille que les destinations du jour : chaque cadre a la largeur d'une destination, quel que soit leur nombre.
|
||||||
|
.nebula-bonus-offers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4) var(--space-3); margin: 0; padding: 0; list-style: none; }
|
||||||
|
@media (max-width: 760px) {
|
||||||
|
.nebula-bonus-offers { grid-template-columns: minmax(0, 1fr); }
|
||||||
|
}
|
||||||
|
.nebula-bonus-offer { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: var(--space-3); align-items: center; width: 100%; height: 100%; padding: var(--space-3); border: 2px dashed rgba(246, 196, 83, 0.45); border-radius: var(--radius-md); background: rgba(246, 196, 83, 0.04); color: inherit; font: inherit; text-align: left; cursor: pointer; transition: border-color 160ms var(--ease-standard), background 160ms var(--ease-standard); }
|
||||||
|
.nebula-bonus-offer:hover:not(:disabled) { border-color: rgba(246, 196, 83, 0.85); background: rgba(246, 196, 83, 0.1); }
|
||||||
|
.nebula-bonus-offer:disabled { cursor: default; opacity: 0.6; }
|
||||||
|
.nebula-bonus-offer img { width: 72px; height: 60px; object-fit: contain; }
|
||||||
|
.nebula-bonus-offer-copy { display: grid; gap: var(--space-1); min-width: 0; }
|
||||||
|
.nebula-bonus-offer-badges { display: flex; flex-wrap: wrap; gap: var(--space-1); }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue