From c6eb638b9e4e7f4238f0cb973606b13bb8c68e59 Mon Sep 17 00:00:00 2001 From: Shinuwa Date: Wed, 18 Nov 2026 23:31:36 +0100 Subject: [PATCH 1/2] Show a destination's affinity themes next to its condition and dangers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The destination panel now lists the themes that grant Affinité, with the score it adds and whether the chosen card carries one. A theme that is also the condition shows once, in the condition line, since a single card then meets both. Co-Authored-By: Claude Opus 5.5 --- services/cards/expedition-service.js | 2 ++ website/public/data/site.json | 8 +++++++- .../src/features/cards/ExpeditionPlanner.jsx | 19 ++++++++++++++++--- 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/services/cards/expedition-service.js b/services/cards/expedition-service.js index 5028dba..269470f 100644 --- a/services/cards/expedition-service.js +++ b/services/cards/expedition-service.js @@ -173,6 +173,8 @@ export class ExpeditionService { return { id: destination.id, name: destination.name, description: destination.description, coverCardId: destination.coverCardId ?? null, image: destination.image ?? null, stats: destination.stats, bonusSlot, specialty: destination.specialty ?? null, rewardCollectionId: destination.rewardCollectionId ?? null, themeTags: destination.themeTags ?? [], + // Bonus de score de l'Affinité, affiché avec les thèmes de la destination. + affinityPct: settings.synergy.affinityPct, level, star, condition: hasCondition(star) ? entry.condition : null, dangers: entry.dangers.slice(0, dangerCount(star)), diff --git a/website/public/data/site.json b/website/public/data/site.json index d35e390..11fa48e 100644 --- a/website/public/data/site.json +++ b/website/public/data/site.json @@ -367,11 +367,17 @@ "starsLabel": "Difficulté : {stars}", "durationLabel": "Durée", "hours": "{hours} h", - "hazardsTitle": "Condition et dangers", + "hazardsTitle": "Condition, affinité et dangers", "conditionShort": "Condition · «\u00a0{name}\u00a0»", "conditionDetail": "Une carte qui la remplit, sinon le score baisse.", "conditionOk": "remplie", "conditionKo": "non remplie", + "conditionAffinity": "Elle donne aussi l’Affinité : score +{value} %.", + "affinityShort": "Affinité · « {tags} »", + "affinityDetail": "Une carte qui le porte : score +{value} %.", + "affinityText": "Affinité : une carte de l’équipe qui porte « {tags} » augmente le score de {value} %.", + "affinityOk": "obtenue", + "affinityKo": "non obtenue", "dangerShort": "Danger · {label}", "dangerDetail": "{stat} en baisse, sauf avec «\u00a0{tags}\u00a0».", "dangerOk": "paré", diff --git a/website/src/features/cards/ExpeditionPlanner.jsx b/website/src/features/cards/ExpeditionPlanner.jsx index e2051ce..1388123 100644 --- a/website/src/features/cards/ExpeditionPlanner.jsx +++ b/website/src/features/cards/ExpeditionPlanner.jsx @@ -80,16 +80,29 @@ function DestinationHazards({ catalog, destination, card, content }) { ? catalog.collections.find((item) => item.id === condition.collectionId)?.name || condition.collectionId : tagLabel(catalog, condition.tag)); const conditionMet = card && condition && (condition.type === "collection" ? card.collectionId === condition.collectionId : card.tags?.includes(condition.tag)); - // Nom et état sur la première ligne, ce qui la remplit ou le pare dessous, sur toute la largeur. + // Condition, Affinité (les thèmes de la destination) et dangers : nom et état sur la première ligne, ce qui la remplit, l'obtient + // ou le pare dessous, sur toute la largeur. const row = ({ key, text, detail, title, ok, okText, koText }) => {card && } ; + // Un thème qui est aussi la condition ne s'affiche qu'une fois : la condition dit qu'elle donne l'Affinité, la ligne Affinité ne + // garde que les autres thèmes (tous en 1 et 2 ★, sans condition). + const themes = destination.themeTags || []; + const conditionTheme = condition?.type === "tag" && themes.includes(condition.tag); + const otherThemes = themes.filter((tag) => !(conditionTheme && tag === condition.tag)); + const conditionDetail = conditionTheme ? `${content.conditionDetail} ${fillTemplate(content.conditionAffinity, { value: destination.affinityPct ?? "" })}` : content.conditionDetail; return - {condition && row({ key: "condition", text: fillTemplate(content.conditionShort, { name: conditionLabel }), detail: content.conditionDetail, + {condition && row({ key: "condition", text: fillTemplate(content.conditionShort, { name: conditionLabel }), detail: conditionDetail, title: conditionText(condition, catalog, content), ok: conditionMet, okText: content.conditionOk, koText: content.conditionKo })} + {otherThemes.length > 0 && (() => { + const tags = otherThemes.map((tag) => tagLabel(catalog, tag)).join(content.or); + const values = { tags, value: destination.affinityPct ?? "" }; + return row({ key: "affinity", text: fillTemplate(content.affinityShort, values), detail: fillTemplate(content.affinityDetail, values), + title: fillTemplate(content.affinityText, values), ok: card?.tags?.some((tag) => otherThemes.includes(tag)), okText: content.affinityOk, koText: content.affinityKo }); + })()} {destination.dangers.map((danger) => row({ key: danger.id, text: fillTemplate(content.dangerShort, { label: danger.label }), detail: fillTemplate(content.dangerDetail, { stat: content.stats[danger.stat], tags: danger.unlessTags.map((tag) => tagLabel(catalog, tag)).join(content.or) }), title: dangerText(danger, catalog, content), ok: card?.tags?.some((tag) => danger.unlessTags.includes(tag)), okText: content.dangerOk, koText: content.dangerKo }))} @@ -165,7 +178,7 @@ function DestinationOption({ catalog, item, selected, card, view, content, onSel {content.requirementsFactTitle} - {(item.condition || item.dangers.length > 0) && } + {(item.condition || item.dangers.length > 0 || (item.themeTags || []).length > 0) && } ; } From 734fc79b75dde9eeb2f3cd9a7b1bbb4b740143cc Mon Sep 17 00:00:00 2001 From: Shinuwa Date: Wed, 18 Nov 2026 23:33:21 +0100 Subject: [PATCH 2/2] Give six destinations a second affinity theme distinct from their condition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Light currents, level isles, dawn shore, great void, pale moon slope and the grand astral hall only granted Affinité for their condition's tag, so one card met both. They now also reward currents, dreams, auroras, passages, the pale moon and treasure, taken from their descriptions, which asks a team for a second well-chosen card. Co-Authored-By: Claude Opus 5.5 --- services/cards/content/expedition-destinations.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/services/cards/content/expedition-destinations.json b/services/cards/content/expedition-destinations.json index d4d9714..016933e 100644 --- a/services/cards/content/expedition-destinations.json +++ b/services/cards/content/expedition-destinations.json @@ -5,7 +5,7 @@ "description": "Les courants qui relient les îles changent de route chaque nuit. Il faut lire les étoiles pour ne pas s'y perdre.", "coverCardId": "stellar-current-otter", "image": "/static/img/expeditions/destinations/light-currents.webp", - "themeTags": ["theme:voyage"], + "themeTags": ["theme:voyage", "lieu:courants"], "logbookCards": ["skyboat-pilot-otter", "isle-messenger-ferret"], "stats": ["orientation", "bravoure", "endurance", "fortune"], "conditions": [{ "type": "tag", "tag": "theme:voyage" }], @@ -56,7 +56,7 @@ "coverCardId": "island-arcade-cabinet", "image": "/static/img/expeditions/destinations/level-isles.webp", "rewardCollectionId": "dream-arcade", - "themeTags": ["lieu:iles-jeux"], + "themeTags": ["lieu:iles-jeux", "theme:reves"], "logbookCards": ["cartographer-gecko"], "stats": ["fortune", "bravoure", "endurance", "orientation"], "conditions": [{ "type": "tag", "tag": "lieu:iles-jeux" }], @@ -90,7 +90,7 @@ "coverCardId": "solar-dawn-capybara", "image": "/static/img/expeditions/destinations/dawn-shore.webp", "specialty": ["eclats", "stardust"], - "themeTags": ["lieu:soleil"], + "themeTags": ["lieu:soleil", "theme:aurores"], "logbookCards": ["cartographer-gecko"], "stats": ["endurance", "fortune", "bravoure", "orientation"], "conditions": [{ "type": "tag", "tag": "lieu:soleil" }], @@ -124,7 +124,7 @@ "coverCardId": "deep-sky-ray", "image": "/static/img/expeditions/destinations/great-void.webp", "specialty": ["cards"], - "themeTags": ["lieu:vide"], + "themeTags": ["lieu:vide", "theme:passages"], "logbookCards": ["drifting-isle-turtle", "starless-night-bat"], "stats": ["orientation", "endurance", "bravoure", "fortune"], "conditions": [{ "type": "tag", "tag": "lieu:vide" }], @@ -192,7 +192,7 @@ "coverCardId": "pale-moon-owl", "image": "/static/img/expeditions/destinations/pale-moon-slope.webp", "specialty": ["stardust"], - "themeTags": ["theme:nuit"], + "themeTags": ["theme:nuit", "lieu:lune-pale"], "logbookCards": ["map-keeper-owl"], "stats": ["endurance", "orientation", "fortune", "bravoure"], "conditions": [{ "type": "tag", "tag": "theme:nuit" }], @@ -226,7 +226,7 @@ "coverCardId": "collectors-treasure", "image": "/static/img/expeditions/destinations/grand-astral-hall.webp", "rewardCollectionId": "astral-genesis", - "themeTags": ["theme:collection"], + "themeTags": ["theme:collection", "theme:tresor"], "logbookCards": ["isle-messenger-ferret"], "stats": ["fortune", "orientation", "endurance", "bravoure"], "conditions": [{ "type": "tag", "tag": "theme:collection" }],