Replace the rarity hint of the daily card with the theme of its name
The rarity alone left 71 cards out of 246 and only helped to filter the album; the theme leaves 15 and helps every player. It opens after three wrong guesses and is no longer offered once a guess has found it. Games that had flipped the rarity get their hint back. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
ac6ae7df62
commit
d5c2900eed
10 changed files with 89 additions and 31 deletions
|
|
@ -1,7 +1,7 @@
|
|||
// Rôle : indices facultatifs de la Carte du jour : cinq tuiles face cachée, une à retourner par essai raté, au choix du joueur.
|
||||
import { fillTemplate } from "./dailyShare.js";
|
||||
|
||||
const HINT_LABELS = { album: "hintAlbum", rarity: "hintRarity", collection: "hintCollection", page: "hintPage", shape: "hintShape" };
|
||||
const HINT_LABELS = { album: "hintAlbum", collection: "hintCollection", page: "hintPage", theme: "hintTheme", shape: "hintShape" };
|
||||
|
||||
// Texte dont certains mots manquent : le serveur ne les envoie pas.
|
||||
function MaskedText({ parts, content, className }) {
|
||||
|
|
@ -12,13 +12,14 @@ function MaskedText({ parts, content, className }) {
|
|||
|
||||
function HintValue({ catalog, hint, content }) {
|
||||
if (hint.id === "album") return <span className="nebula-daily-hint-value">{hint.value ? content.hintAlbumYes : content.hintAlbumNo}</span>;
|
||||
if (hint.id === "rarity") return <span className="nebula-daily-hint-value">{catalog.rarities.find((item) => item.id === hint.value)?.label}</span>;
|
||||
if (hint.id === "theme") return <span className="nebula-daily-hint-value">{hint.value}</span>;
|
||||
if (hint.id === "collection") return <span className="nebula-daily-hint-value">{catalog.collections.find((item) => item.id === hint.value)?.name}</span>;
|
||||
return <MaskedText parts={hint.value} content={content} className={hint.id === "page" ? "nebula-daily-hint-page" : "nebula-daily-hint-value"} />;
|
||||
}
|
||||
|
||||
function hintStatus(choice, daily, wrongCount, content) {
|
||||
if (daily.status !== "playing") return content.hintUnused;
|
||||
if (choice.known) return content.hintKnown;
|
||||
if (choice.available) return content.hintFlip;
|
||||
if (wrongCount >= choice.after) return content.hintNext;
|
||||
return choice.after === 1 ? content.hintAfterOne : fillTemplate(content.hintAfterMany, { count: choice.after });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue