Offer the destination items under Sokko TCG's destinations of the day
All checks were successful
Validate and deploy Sokko G / validate (push) Successful in 23m38s
Validate and deploy Sokko G / deploy (push) Successful in 16s

- 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:
Shinuwa 2026-11-30 12:37:52 +01:00
parent bffbe36cbe
commit 9d2c561fc6
10 changed files with 94 additions and 6 deletions

View file

@ -547,6 +547,15 @@ export function validateSiteContent(site) {
"cards.expeditions.testDuration",
"cards.expeditions.testPlayerAdded",
"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.reportPlayers",
"cards.expeditions.you",

View file

@ -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"]);
const before = service.expeditions.getExpeditions(player.id);
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;
assert.equal(added.destinations.length, 5);
const bonus = added.destinations.find((destination) => destination.bonusSlot === "5");
assert.ok(!before.destinations.some((destination) => destination.id === bonus.id));
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");
const sky = service.expeditions.addBonusDestination(player.id, { item: "skyChart" }).expeditions.destinations.find((destination) => destination.bonusSlot === "6");
assert.deepEqual([sky.level, sky.star], [3, 4]);