The confirmation said "rareté Commun ou plus commune": it now names the recycled rarities ("Vos doublons communs, rares et épiques deviennent …") and its value list keeps only those rarities. The box no longer reads "0 doublon … +0 poussière", and the awakening texts say "6 doublons rares" instead of "doublons de rareté Rare". The history no longer shows "−undefined Éclats" for an awakening with duplicates of the collection.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
11 lines
699 B
JavaScript
11 lines
699 B
JavaScript
// Rôle : mots des raretés dans les phrases (« 6 doublons rares », « doublons communs, rares et épiques »), plutôt que leur nom
|
|
// d'étiquette (« rareté Rare »).
|
|
|
|
// Adjectif d'une rareté accordé avec « doublon » : « rare », « légendaires », « communs ».
|
|
export function rarityAdjective(catalog, rarityId, count = 1) {
|
|
const word = (catalog.rarities.find((item) => item.id === rarityId)?.label ?? rarityId).toLocaleLowerCase("fr");
|
|
return count > 1 ? `${word}s` : word;
|
|
}
|
|
|
|
// Liste en français : « a, b et c » (`conjunction`) ou « a ou b » (`disjunction`).
|
|
export const frenchList = (items, type = "conjunction") => new Intl.ListFormat("fr", { type }).format(items);
|