Document how server.mjs keeps the site up when an API is misconfigured and
reports it on /api/health, the cache and CSP policy, the share API's
synchronous reservation, the trust placed in X-Forwarded-For, the hooks main.jsx
wires once, and how to run each script. The deploy script header now recalls
that CI runs the copy installed on the server.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each core file of services/cards now says where it sits, its entry points,
who calls it and what to watch for: admin checks living in the service, the
methods added to ExpeditionService and TeamService by Object.assign, the
InTx suffix, settings defaults that do not change an existing database, and
rules shared with the browser.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add ARCHITECTURE.md (layers, flows, folder map, glossary), CONTRIBUTING.md
(setup and step-by-step recipes) and a README in each main folder, with an
index of docs/. Convert the 511 JavaScript headers from "// Rôle :" lines to
JSDoc @file blocks, define a three-level header template in website/AGENTS.md
and check the header in tests/file-headers.test.mjs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Players kept finishing third or fourth: opponents were played better than
their owners would (always the best runner, half of them with perfect
boosts and no reaction time), and the Watchers recruited knowing the day's
circuit, which players never see.
- A player who already ran today now comes back as a ghost with their real
race; other teams play like an attentive player (best runner, each
teammate given in a zone of its best stat after a reaction delay). The
Watchers recruit blind; only the strong one plays attentively. The
administration counts the ghosts.
- The rule that a boost keeps the value of the zone where it was given is
now stated before and during the race.
- A boosting teammate is greyed at once with "Élan donné", a 1.5 s bar and
its locked value; the others dim while the player has to wait.
- The result shows the place as a medal, the finish as lanes (with a gold
silhouette at the best boosts), the three times, each boost placed on
the circuit (dashed in the teammate's best stat when it was worth more
elsewhere), a sentence per boost to place better and, when clearly
faster, another runner. The best boosts are searched in the browser.
- A development-only "Recourir (dev)" button erases the race and keeps the
team.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 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>
- On the local dev server, a test player can open a group on one of its destinations, with the 20 s test trip; it departs by itself after 5 minutes, since only the creator may launch it.
- While a player chooses their card to join, the expedition planner is hidden; Cancel brings it back.
- Joining and readying are one button, "Valider et se mettre en prêt", at the bottom right of the loadout frame, also after "Modifier ma préparation", which now sits next to "Quitter l'expédition".
- The redundant "you are ready" block is gone: the member list already shows the Ready badge.
- The card a player sends is called their explorer in the texts about that role.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Each queued alert keeps an embed and a link button: the destination illustration as thumbnail, the tier, score and loot for a return, the difficulty and automatic departure for a new group.
- The button and the message link open #/cards/expeditions/<id>, which scrolls to the player's expedition or group and highlights it; Discord login now returns to that link.
- Without an https CARDS_PUBLIC_ORIGIN the link stays in the text, without button or thumbnail, which Discord would refuse.
- Delivery docs name palico-bot's NOTIFICATIONS_API_KEY and its local-only route on port 3101.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Easy is a square 4 x 4 picture drawn for each player, with green
outlines, where any two pieces swap; it is scored against the free
minimum and pays 5 plus 1 per move left. The three mirrors open one
after another (Easy, Normal, Hard) and the Guild quest is done with all
three. Migration 31 rebuilds mirror_games to accept the new mode. The
mirror page shows three illustrated cards, Easy painted with Codex.
Bravery now places a misplaced piece for free, since swapping anywhere
means nothing in Easy. Each of the five companions can help once per
game instead of two in all. Mirror styles now win over the global
button hover, so placed pieces keep their green outline.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The mirror page opens on two illustrated cards, Normal and Hard, painted
with Codex, with three small rule reminders; a card opens or starts its
game. The five companions of the daily team show as tiles: one click uses
a help, two per game, with no selection step. Helps are renamed after
what they do (swap anywhere, show a piece's place, double the rewards,
undo the last move, see the model again), use the shared tooltip and
keep the same height. Selecting a piece no longer waits for the server,
and showing a place aims at the selected piece. Under 960 px of
dashboard, like the section menu, the board goes on top and the moves
panel keeps only the count. Stardust is always written in full.
The Guild board shows four tiles per row on full screen, aligned with
subgrids, solo quests first. Status lines give way to a wooden "Fait"
sign on finished quests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On screen, a swap is now a move. The five helps no longer all save a
move: Bravery frees the next move from the row or column rule,
Orientation shows where a chosen piece goes, Fortune doubles the reward
of a rebuilt picture, Endurance takes back the last move and Balanced
shows the model for five seconds. The model is visible until the first
move only: the server no longer sends it afterwards, except during that
help and at the end.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A daily puzzle: a card illustration cut into pieces, rebuilt by swapping
two pieces of the same row or column within a limited number of swaps.
The normal picture is a square card in 4 x 4, drawn for each player, with
placed pieces outlined in green; the hard one is a 5 x 7 portrait shared
by everyone each day, with a result to copy. The limit is the computer's
best result (beam search) plus a margin, and every swap left adds
stardust. Two companions of the daily team can each give one help, by
specialty; a double specialty picks one when used.
The server keeps the piece positions, sends the picture already shuffled
and checks every swap. Uniform illustrations are left out, from measures
written by scripts/mirror-illustrations.mjs. The Guild gets its quest and
a Codex tile, the administration a tab (opening, rewards, margins, the
day's summary), and migration 30 its tables. New collections must plan at
least one double-specialty character, counted by
scripts/team-specialties.mjs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The daily team page now opens on a welcome screen with the three steps,
and the recruitment keeps the same look: golden steps, the choice in a
golden panel with the hidden stars, a team summary of colored mini cards
and its strengths, and a reroll badge. One "Your team" block is shared by
the Guild, the recruitment and the ready team. The header shows the extra
golden stars and the balms; the tips button is gone. On the Guild, team
quests carry a "En groupe" sign until the team is ready and the streak
badge stays readable. The race gets its own admin tab: its own opening,
the day's circuit and results, rewards by place and the watchers' skill.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Guild page becomes a guild hall: a counter with the Watchers' dragon and
the day's quest progress, the Expeditions highlighted as the main mission,
the player's team with golden stars and balms, and a quest board whose
illustrations are clickable. The race page now opens on the day's circuit,
explained for newcomers, and the team and race pages drop their links to
each other.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
Collection and rarity hints only helped players who owned the daily card. Each guess now shows the common part of its subject and whether the theme of its name matches. A wrong guess earns one hint of the player's choice, the same list for everyone so that nothing reveals the ownership: album, rarity, collection, damaged page or name shape. Hidden words never leave the server, and the ownership is the one of the draw.
The guess list also finds a card by a related word, and the album no longer searches the description of unknown cards. Principles and data: docs/carte-du-jour.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Nebula, the Long Night, the Dream Arcade and the Crimson Procession now each have two power commons: Adaptation and one of their own (Étude, Givre d'étoiles, Trouvaille, Chance de l'aube). Eight other commons change stats and four gain a tag, so that no common is dominated by another with the same effect and Bravoure can be equipped like the other stats. Commons that became power commons are taken off the cards that carried them.
Card sheets, the equipment window, placed commons and the departure preview show every power's gains and costs with their figures, and the preview says when a power has no effect.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Les Carnets des Veilleurs and Poussières d'étoiles do not come from regular
openings, so their own duplicates are too rare for awakenings. Their cards now
follow the rule of closed collections: duplicates of the same rarity from any
collection, at the same count. The balance guide records the reasons.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The upgrade tip now gives the number of duplicates of the card needed for
every awakening still ahead. Two tiers crossed by the same level count as one
awakening.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add its 31 cards, its destination L'Île aux Cent Lanternes, five expedition
tags and the collection profile. The collection stays closed until an
administrator sets its drop rates and opens it.
Also clean the backdrop layer behind the wolf.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The catalog now marks the prismatic parallax as a layered effect, and the
service refuses to create a variation or change its finish to it when the card
lacks the cutout and backdrop for that format; existing variations stay as they
are. A test keeps the interface and the server in agreement for every card and
finish. Particle cards no longer hold canvas pixels at rest, build their motif
sprites on first use from a cache shared by all cards, and fade remaining
twinkles and fireflies within half a second once the pointer leaves.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Lightning, twinkles and fireflies move from a visual lab prototype to real
settings. The catalog declares the animations, their motifs, sliders and zones;
migration 24 stores each variation's particles; the service validates and
normalizes them behind a dedicated admin route and records the change in the
history. Published editions carry the particle fields, so every card of the
variation shows them in collections, card sheets and openings. The Particles
tab of the variation editor now saves with the same Enregistrer button as the
finish and tunings, including when a variation is created.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
« Glace brisée » joins the holographic effects: a seamless shard mosaic in four
facet groups that each light up near their own tilt, with glinting cracks; in
the standard layout it covers the frame and text and stays under the artwork.
Its masks come from scripts/generate-shattered-ice-textures.mjs.
Each mythic variation now tunes its palette intensity and, when the effect
declares one, its own level (prism speed, parallax amplitude, shard size), from
1 to 5 with 3 as the reference render. Tunings are stored on mythic_variations,
set with range sliders when a variation is created or later in the mythic
editor, logged in the history and previewed in the Visual Lab.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The prismatic-backdrop finish, now labelled « Parallaxe prismatique », lays a
card's cut-out hero over a backdrop without it and shifts both with the tilt,
the palette tinting the backdrop, lighting each layer's highlights and fringing
the hero. Cards declare the backdrop next to the cutout (backdropImage,
fullBackdropImage), validated by name. The Visual Lab is back to its usual
effect cards. The three Long Night legendaries are redrawn in the collection's
style, and La Pioche Mythique gets its parallax layers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A variation keeps its edition id when its holographic finish changes, so
players keep their copies, duplicates, expedition progress and equipment.
A unique index on (card_id, finish_id) replaces the id-derived uniqueness,
and new variations get a suffixed id when the original one is taken.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reserve was fixed at 5 by CHECK constraints on players and
recharge_settings. Migration 21 rebuilds both tables with foreign keys
off and checks them before committing; the reserve now goes from 1 to 50
and is set next to the recharge delay. A raised reserve restarts the
recharge of full players at once, a reduced one keeps their extra
openings, and the player counter shows the configured maximum.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A gifted pack using the pack's own rates was drawn with whatever rates
were in force when the player opened it. Campaigns now copy those rates
at creation (packRates), every pack of the code draws with them, and the
reveal shows them. Older campaigns keep following the live rates.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The settings getter reread and remerged the SQL row on every access, seven
times per getState. getState now builds the state inside a settings
snapshot scoped to that synchronous build and released even on error, so
an administrator's change still shows in the next state. An empty account
now prepares 42 statements instead of 48.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Development logins were capped at a hard-coded 10 per minute per address.
The cards E2E suite logs in 21 times, and with the test added in 067a4a8
the expedition test's login became the eleventh within one minute: it got
"Trop de tentatives", never reached the admin guild tab and timed out in
CI. The limit is now the devAuthRateLimit option, still 10 by default, and
the E2E server raises it as it already did for apiRateLimit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Share uploads now reserve their slot, bytes and per-IP count before the
disk check, so simultaneous uploads can no longer exceed the limits.
Writes to a share's metadata run one after another, and a revocation can
no longer be undone by a pending read count.
The TCG page ignores a state reload that started before or during a
mutation, the last mutation wins, and returning to the page triggers a
single reload. The card cache confirms writes only once the IndexedDB
transaction completes and shows only the current player's copy. The
administration panel loads on demand, which shrinks the TCG chunk from
311.6 to 191.8 kB.
A new /api/health route answers 503 when the cards or shares API failed
to start. The deploy script ships the commit's production dependencies
with the build, waits up to 30 s for a healthy server instead of trusting
systemctl is-active, and restores node_modules on rollback. Both Forgejo
workflows check the route on the public site. The updated script applies
once reinstalled on the server.
Unused helpers, the ignored join role and duplicate button selectors are
removed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The daily draw now proposes at most day.maxCollectionDestinations (default 2)
destinations linked to a collection, unless the player lacks other
destinations to fill the day. The starter destination card is now granted to
any player without a Watchers' Logbooks destination, even if they already own
collection destination cards from packs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Joining a group froze the card's stats at once and locked its
equipment, so a joining player could not equip anything. Joining now
uses the same card frame as the preparation: card, equipment and
"Améliorer la carte". Everything stays editable after joining, and the
group counts the card as it is, until the player clicks "Prêt". That
freezes the card's stats. "Modifier ma préparation" reopens it.
The creator sees each member as "Prêt" or "En préparation", with a
ready count, and can still leave at any time. A player who is not
ready leaves with their card as it is at departure. A migration marks
existing members as ready, since their stats were already frozen.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A closed collection no longer sells packs, so its legendaries could
barely awaken. Its cards now accept substitute duplicates of their
rarity from any collection, at the same 6/2/1 count. The Watchers'
Logbooks never count as closed. The awakening sheet and picker say so,
and a daily tip and the balance guide explain the rule.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
39 short tips cover packs, collection, trades, the daily card and Expeditions (getting cards, succeeding, groups, loot, improving cards, bag items). Each one has a topic that starts with its part of the game, such as "Expéditions · Réussir". Every figure comes from the current settings through tipValues(), so a tip follows an admin change. Expedition tips only show while Expeditions are open. The tip of the day is the same for everyone, "Astuce suivante" shows the next ones, and the card sits under the key figures so the home still fits a 1280 × 720 screen.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The awakening with duplicates of the collection used to take them automatically, without showing them. It now opens a picker like the Atelier: the needed slots at the top, the usable duplicates below as illustrated cards with their free copies, and nothing is used before "Éveiller". The server lists the candidates and checks the chosen copies.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The server builds the card service without a random source. Pack draws fall back to crypto randomness, but replacing a destination card the player already owns called the missing source and threw "this.random is not a function". The service now defaults to crypto randomness itself.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Opening packs stays useful once a collection is complete: the level that reaches an awakening tier can no longer be bought with Éclats, a duplicate or field experience. The card awakens without Éclats, with one of its own duplicates (a mythic also takes its legendary version) or with duplicates of its collection and rarity: 6 rares, 2 epics or 1 legendary, numbers that follow the 24/8/3 drop rates so a tier costs about the same packs at every rarity. Tiers and counts are admin settings, and the balance guide records the simulations and the options set aside.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The collection page asks how far the bulk recycling goes (Common by default) and its preview follows that choice, so duplicates kept for later uses are not lost with the rest. Mythic duplicates are only recycled one by one.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
Affinity, each resonance, cohesion, Expertise and the bonus cap now open a tooltip saying what triggered them and how much they add, with the values in force when the result was computed (results store them as bonusPcts; older ones get the explanation without a figure). The departure preview, group cards and return report share the same badges, and cohesion now shows in the report too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The spyglass trades a quarter more travel for more cards and one more at the cap, rations are neutral per hour, the shooting-star net scales with the chosen hours and costs Fortune per place, the storm lantern adds 10 % of travel instead of a fixed hour, and the fog bell's group bonus sits outside the synergy cap.
- Card and object caps grow with each 6 hours chosen, and field experience with each 2 hours, so long expeditions are no longer held back by the caps of short ones.
- Each resonance needs its own pair of cards, "Étoiles sœurs" becomes "Thème partagé", and the bonuses say when the cap absorbs part of them.
- Every stat is a secondary stat for two vocations, and the simulator's reflected builds can pick Adaptation.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>