Add destination cards, starting with Le Cœur du Nuage Cosmique for the Primordial Nebula

A destination card is a rare that unlocks an expedition destination: it never joins a team (no tags, profile or equipment) and always shows as a full-art card. The catalog checks that it is rare and names an existing destination, and that no two cards unlock the same one.

Le Cœur du Nuage Cosmique is the first one: a new destination at the heart of the cosmic dust cloud, where a new sun may be about to form, with its landscape and its card in the Primordial Nebula packs. Full-art names at large size now keep clear of the rarity symbol.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Shinuwa 2026-11-16 15:44:57 +01:00
parent 250e0633cf
commit 89eee7ce2a
18 changed files with 113 additions and 21 deletions

View file

@ -152,7 +152,7 @@ test("administrators tune settings with bounds and history, and can cancel an ex
assert.ok(service.getAdminHistory(admin.id).entries.some((entry) => entry.type === "expedition_settings_updated"));
const dashboard = service.getAdminDashboard(admin.id);
assert.equal(dashboard.expeditionSettings.settings.enabled, true);
assert.equal(dashboard.expeditionSettings.destinations.length, 14);
assert.equal(dashboard.expeditionSettings.destinations.length, 15);
assert.ok(dashboard.expeditionSettings.schema.some((field) => field.path === "loot.eclatsPerHourCents"));
const view = service.expeditions.getExpeditions(player.id);

View file

@ -36,13 +36,31 @@ test("every collection lists its cards from the rarest to the most common", () =
test("every catalog card carries expedition tags and every collection a profile", () => {
const tagIds = new Set(rawCatalog.expeditionTags.map((tag) => tag.id));
assert.ok(rawCatalog.cards.every((card) => card.expedition.tags.length >= 1 && card.expedition.tags.every((tag) => tagIds.has(tag))));
const teamCards = rawCatalog.cards.filter((card) => card.kind !== "destination");
assert.ok(teamCards.every((card) => card.expedition.tags.length >= 1 && card.expedition.tags.every((tag) => tagIds.has(tag))));
assert.ok(rawCatalog.collections.every((collection) => STAT_IDS.reduce((sum, stat) => sum + collection.expedition.profile[stat], 0) === 100));
// Aucune étiquette inutilisée : le vocabulaire reste celui des cartes.
const used = new Set(rawCatalog.cards.flatMap((card) => card.expedition.tags));
const used = new Set(teamCards.flatMap((card) => card.expedition.tags));
assert.deepEqual(rawCatalog.expeditionTags.filter((tag) => !used.has(tag.id)), []);
});
// Carte de destination : rare, sans données d'expédition, liée à une destination existante ; elle ne part jamais en équipe.
test("a destination card is a rare that unlocks a destination and never joins a team", () => {
const withCard = (card, rarity = "rare") => {
const copy = structuredClone(rawCatalog);
copy.cards.push({ id: "card-light-currents", collectionId: "watchers-logbooks", name: "Les Courants de Lumière", description: "Une destination.", kind: "destination", destinationId: "light-currents", ...card });
copy.editions.push({ id: "card-light-currents-standard", cardId: "card-light-currents", rarity, finishIds: ["standard"], promotional: false });
return copy;
};
const prepared = prepareVersionedCatalog(withCard({}));
assert.equal(editionExpeditionData(prepared, "card-light-currents-standard", 0, settings), null);
assert.ok(validateExpeditionDestinations(JSON.parse(JSON.stringify(destinations.map(({ ...item }) => item))), prepared));
assert.throws(() => prepareVersionedCatalog(withCard({}, "epic")), /must be rare/);
assert.throws(() => prepareVersionedCatalog(withCard({ expedition: { tags: ["theme:voyage"] } })), /never joins a team/);
assert.throws(() => prepareVersionedCatalog(withCard({ destinationId: undefined })), /needs a destinationId/);
assert.throws(() => validateExpeditionDestinations(destinations, prepareVersionedCatalog(withCard({ destinationId: "nowhere" }))), /unknown destination nowhere/);
});
test("catalog validation refuses broken expedition data", () => {
const unknownTag = structuredClone(rawCatalog);
unknownTag.cards[0].expedition.tags = ["theme:inconnu"];
@ -66,9 +84,9 @@ test("catalog validation refuses broken expedition data", () => {
test("destinations order the four stats and stay satisfiable by rare or better cards", () => {
const visible = destinations.filter((destination) => !destination.hidden);
assert.equal(visible.length, 12);
assert.equal(visible.length, 13);
assert.deepEqual(destinations.filter((destination) => destination.hidden).map((destination) => destination.id), ["crimson-passage", "lost-observatory"]);
// Une destination visible par couple (stat principale, seconde stat) : chaque paire de rôles du solo existe.
// Chaque couple (stat principale, seconde stat) a au moins une destination : chaque paire de rôles du solo existe.
assert.equal(new Set(visible.map((destination) => destination.stats.slice(0, 2).join("+"))).size, 12);
const broken = (change) => {
const copy = structuredClone(destinations);
@ -279,11 +297,11 @@ test("a level costs Éclats by current power, so a rare pays the longer road to
});
test("commons carry equipment spread over a fixed budget, and every card has synergy partners", () => {
const commons = rawCatalog.cards.filter((card) => card.expedition.equipment?.stats);
const commons = rawCatalog.cards.filter((card) => card.expedition?.equipment?.stats);
assert.equal(commons.length, 68);
for (const card of commons) assert.equal(Object.values(card.expedition.equipment.stats).reduce((sum, value) => sum + value, 0), 6, card.id);
// Les communes des Carnets des Veilleurs portent chacune un pouvoir, et aucune stat.
assert.deepEqual(rawCatalog.cards.filter((card) => card.expedition.equipment?.power).map((card) => card.expedition.equipment.power).sort(), ["fogBell", "longsight", "madCompass", "rations", "starNet", "stormLantern", "talisman", "treasureMap"]);
assert.deepEqual(rawCatalog.cards.filter((card) => card.expedition?.equipment?.power).map((card) => card.expedition.equipment.power).sort(), ["fogBell", "longsight", "madCompass", "rations", "starNet", "stormLantern", "talisman", "treasureMap"]);
assert.throws(() => prepareVersionedCatalog({ ...structuredClone(rawCatalog), cards: rawCatalog.cards.map((card) => (card.id === "mad-compass" ? { ...card, expedition: { ...card.expedition, equipment: { power: "flying" } } } : card)) }), /known power/);
const broken = (change) => {
const copy = structuredClone(rawCatalog);

View file

@ -210,10 +210,10 @@ test("card catalog keeps mythic editions attached to legendary cards", async ()
const primordialCollection = catalog.collections.find((collection) => collection.id === "primordial-nebula");
assert.equal(primordialCollection.name, "La Nébuleuse Originelle");
assert.equal(primordialCollection.systemName, "Primordial Nebula");
assert.equal(nebulaCards.length, 82);
assert.equal(nebulaCards.length, 83);
assert.deepEqual(
Object.fromEntries(["common", "rare", "epic", "legendary"].map((rarity) => [rarity, catalog.editions.filter((edition) => !edition.promotional && edition.rarity === rarity && nebulaCards.some((card) => card.id === edition.cardId)).length])),
{ common: 36, rare: 20, epic: 20, legendary: 6 }
{ common: 36, rare: 21, epic: 20, legendary: 6 }
);
await Promise.all(nebulaCards.map((card) => access(`website/public${card.image}`)));
const mythics = catalog.editions.filter((edition) => edition.rarity === "mythic" && !edition.promotional);