Commit graph

39 commits

Author SHA1 Message Date
71cf739a2e Add the rules, storage and API of the daily team and its race
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 21:14:36 +01:00
880f007cce Rework the daily card page around what the player knows and hints opened in any order
All checks were successful
Validate and deploy Sokko G / validate (push) Successful in 23m0s
Validate and deploy Sokko G / deploy (push) Successful in 15s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:01:43 +01:00
d5c2900eed Replace the rarity hint of the daily card with the theme of its name
Some checks failed
Validate and deploy Sokko G / validate (push) Failing after 20m47s
Validate and deploy Sokko G / deploy (push) Has been skipped
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>
2026-11-24 23:48:50 +01:00
62042c4c36 Compare the subject and theme of each daily guess, let players choose their hints and find cards by related words
All checks were successful
Validate and deploy Sokko G / validate (push) Successful in 22m58s
Validate and deploy Sokko G / deploy (push) Successful in 17s
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>
2026-11-24 23:09:08 +01:00
9739189f0c Give each pack collection its own power common, fix redundant commons and spell out powers in the interface
All checks were successful
Validate and deploy Sokko G / validate (push) Successful in 22m49s
Validate and deploy Sokko G / deploy (push) Successful in 16s
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>
2026-11-24 13:18:38 +01:00
3b2dae0168 Refuse layered finishes without their files and lighten idle particle cards
All checks were successful
Validate and deploy Sokko G / validate (push) Successful in 22m53s
Validate and deploy Sokko G / deploy (push) Successful in 14s
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>
2026-11-22 18:06:20 +01:00
6737a89a1c Let administrators save particles on mythic variations
All checks were successful
Validate and deploy Sokko G / validate (push) Successful in 22m41s
Validate and deploy Sokko G / deploy (push) Successful in 14s
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>
2026-11-22 16:44:32 +01:00
808adadc0c Add the shattered ice effect and five-step tunings for mythic variations
All checks were successful
Validate and deploy Sokko G / validate (push) Successful in 22m39s
Validate and deploy Sokko G / deploy (push) Successful in 14s
« 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>
2026-11-21 22:40:24 +01:00
3f70a5638d Let administrators change the finish of an existing mythic variation
All checks were successful
Validate and deploy Sokko G / validate (push) Successful in 22m37s
Validate and deploy Sokko G / deploy (push) Successful in 16s
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>
2026-11-21 17:50:15 +01:00
d2ef3b098c Let administrators set the opening reserve size
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>
2026-11-21 17:02:01 +01:00
fd47514d81 Freeze pack rates in a campaign when it is created
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>
2026-11-21 16:50:51 +01:00
2f02c761a8 Read the expedition settings once per TCG state
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>
2026-11-21 12:27:52 +01:00
99724cb6ba Add campaign filter and duplication, pack activity, and gift pack rate fallback
All checks were successful
Validate and deploy Sokko G / validate (push) Successful in 22m9s
Validate and deploy Sokko G / deploy (push) Successful in 17s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 12:48:15 +01:00
e8ec657193 Add a daily tip to the Sokko TCG home that explains hidden mechanics
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>
2026-11-19 10:56:01 +01:00
8b76570e7a Fix pack openings failing when they draw a destination card already owned
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>
2026-11-19 09:54:56 +01:00
c7f951920e Recycle duplicates in bulk up to a chosen rarity, never mythics
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>
2026-11-19 09:26:25 +01:00
fc43444995 Give each player their own daily card and send only the visible crop of its illustration
Some checks failed
Validate and deploy Sokko G / validate (push) Successful in 22m10s
Validate and deploy Sokko G / deploy (push) Failing after 25s
- Each player draws their own daily card and zoom point on their first visit, so a shared answer no longer helps; the migration keeps past games with their day's shared card.
- The server crops the illustration with sharp to the part visible at the current zoom; the full image only arrives once the game is over.
- The admin overview shows the day's winners and players instead of a single card.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 16:47:52 +01:00
30413de036 Rework the expedition screens: in-place return, illustrated bag and workshop, card sheet tabs and an engraving workshop
Expeditions
- The journey keeps the destination landscape still while a sky scenery
  (clouds, floating isles, shards, sparkles) drifts behind the cards.
- A returned expedition shows only what the player receives, in place and
  without a window; claiming it removes the card and confirms with a notice,
  and the page reloads by itself when an expedition comes back.
- The Guild Keeper slots are gone: group requirements scale with the players.
- Local development adds a 20-second test duration, a test player for groups
  and keeps the dev account stocked with every item.
- The Wind Rose has no daily limit and is used from the destinations step.
- The Guide Star opens a destination one level below the player's highest daily
  level, the Sky Chart one at that level; bonus destinations are badged with
  the item that opened them.

Bag and workshop
- The Watcher's bag is a grid of illustrated item cards, ordered from the
  destination items, with a short "Utiliser" button; the six missing item
  illustrations are added.
- The workshop opens in a window with illustrated commons, spare counts on the
  cards, cancel without spending anything, and shows the crafted card with its
  description and power.
- The engraving workshop picks a common first, then a tag from a chosen
  character card (in its tag colours) or from every tag, filtered by name and
  family; card lists filter by name, collection and stat.

Card sheet
- Two tabs: the card and its lore (default from the collection), and its
  improvement (default from the expeditions) with a summary of power, level,
  experience and stats.
- "Répartition des statistiques" offers Par défaut, Personnalisé and profiles,
  previews the change in the summary, and a Parchemin d'oubli resets it to
  Personnalisé so the next choice is free again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 13:36:01 +01:00
477ce5a141 Remove the Grimoire, which only listed discoveries and had no effect on the game
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 21:08:21 +01:00
17a87a889a Add the Rose des vents to draw new daily destinations once a day
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 23:52:48 +01:00
7d331d1a3f Let players choose how their cards spend level points with vocations or free points, and sell the Parchemin d'oubli
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 23:00:40 +01:00
994776392f Keep destination cards unique so they can never be traded or given
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 22:26:52 +01:00
39dbeb9e2b Give destination cards on the first visit, in expedition loot and to group members
A player with no destination card receives one from the Carnets on their first visit to open expeditions. Expedition loot can hold a Carnets destination card the player does not own yet, and a group member without the card of the group's destination has a strong chance to get it. Both chances are expedition settings, and destination cards never drop as ordinary Carnets cards.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 16:03:52 +01:00
4d05d812c5 Split the Guild administration into tabs and sell Éclats and openings by quantity in the shop
The Guild administration now has a tab per quest. The expedition settings sit behind a status band (open or close, today's activity) and four themed tabs, with units inside the fields, the default value shown, and one sticky apply bar that lists every change before confirming.

The Pont des Veilleurs leaves the expedition page and becomes the « Éclats d’étoile » shop item, priced from Administration › Boutique. Openings and Éclats are bought by quantity: a number field capped by the stardust the player actually has, and a full-width button that shows the total cost. Stardust and Éclats get their own SVG icons, aligned with the text around them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 15:39:45 +01:00
21827a252b Add the Carnets des Veilleurs, the expedition-only Sokko TCG collection with power commons
- A new watchers-logbooks collection of category expedition never comes from packs, the shop or codes, and administrators cannot open it as a pack.
- Its six commons carry powers instead of stats (Longue-vue, Provisions, Carte au trésor, Talisman, Boussole folle, Filet à étoiles filantes); a card holds one power and each counts once per team.
- Powers change travel time, loot, score or tier, hide requirements, or catch a logbook card; each destination lists the logbook cards it can bring back.
- A workshop turns a plan and three duplicate commons into a power common.
- The fifteen cards ship without images with ready ChatGPT prompts; a card only drops or gets crafted once illustrated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 17:40:51 +01:00
ae23adfdd9 Bring back objects from Sokko TCG Expeditions and open bonus and hidden destinations
- Expeditions bring back objects by weight, proportional to the loot; treasure-map fragments, burins and workshop plans need enough average Orientation.
- A guide star adds a fifth destination to the player's day, a sky chart a sixth with richer loot, and enough fragments open one of two hidden destinations: Le Passage Écarlate and L'Observatoire perdu.
- An anchor recalls a running solo expedition and keeps the Éclats and stardust already earned; a burin engraves a tag on a common to create the synergy a player wants.
- The Veilleur's bag lists objects with their use, reports show brought-back objects, and Administration › Guilde tunes object chances, weights, the Orientation threshold and hidden-destination loot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 17:28:05 +01:00
320498d878 Send opt-in Discord alerts for Sokko TCG Expeditions through palico-bot
- Players turn on alerts one by one in their account: someone opens an expedition group, or one of their expeditions returns; both stay off until chosen.
- Opening a group queues a direct message for each other subscribed player; every 30 seconds the server queues returned expeditions once and sends pending messages to palico-bot's direct message route.
- Permanent refusals (unknown account, closed direct messages) or five failures stop retries; only real Discord accounts receive alerts, and sent rows are purged after 30 days.
- CARDS_DISCORD_ALERTS_URL and CARDS_DISCORD_ALERTS_KEY enable the feature; Administration › Guilde can turn every alert off, and the privacy notice explains what is sent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 17:09:29 +01:00
6828683f1d Let Sokko TCG commons equip cards and add expedition synergies with a Grimoire
- Every common carries equipment spreading six points (+6, +3/+3, +2/+2/+2 or +8/−2), validated at load; every rare or better card shares a tag with at least three commons.
- Power opens up to three equipment slots; a common sharing a tag with its card adds synergy points, and a common equips one card at a time without ever leaving the collection.
- Teams earn score bonuses from destination affinity and resonances (Écho, Lignée, Étoiles sœurs), capped together with group cohesion.
- The Grimoire records lore pairs when equipping and resonances at departure for every player of the team.
- The card sheet lists equipment slots with synergy hints; previews, groups and reports show affinity and resonance badges; Administration › Guilde tunes slots, synergy points and score bonuses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 16:40:06 +01:00
e0ffccd1c8 Let Sokko TCG players level up cards for Expeditions with Éclats or duplicates
- Each owned rare or better edition keeps a level and field experience; a level costs Éclats by current power, so every rarity reaches the same cap and a rare pays the longer road.
- A duplicate of the same edition gives a whole level; every claimed expedition grants field experience to the cards it sent.
- A one-way bridge turns stardust into Éclats at an admin-tuned rate.
- The card sheet shows level, power, stats and experience with upgrade buttons; expeditions use the upgraded power.
- Administration › Guilde tunes the cost formula, duplicate levels, field experience and the bridge rate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 14:52:44 +01:00
6b7605d04e Add group Expeditions with a Guild board to Sokko TCG
- A player opens a group with one card and a chosen role; others join from the board with a free role, and the creator launches it once enough players are in.
- At departure the Veilleur de la Guilde holds empty places without a role, each member rolls their own loot multiplied by the number of players, and distinct collections add a cohesion bonus.
- An unlaunched group departs on its own at the end of recruitment with enough players, or dissolves and tells its members; leaving, dissolving and deleted accounts free cards or forfeit shares.
- The Guild tile flags joinable groups; Administration › Guilde tunes group places, players, stars, recruitment, loot multipliers, keeper stats, cohesion and the score bonus cap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 14:46:10 +01:00
8bb1d53d70 Add solo Expeditions, the second Guilde des Veilleurs quest of Sokko TCG
- Every catalog card carries expedition tags and every collection a stat profile, validated at load; twelve destinations live server-side so hidden ones stay secret.
- Pure rules compute card power, per-slot requirements, roles, dangers, the long-trip malus, the score (one more star never raises it) and loot proportional to the chosen duration.
- A simulator script and a balance test guard the design thresholds; agent docs and a new-card skill explain how to tag new cards.
- Migration 8 adds Éclats d'étoile, expedition settings stored as one validated JSON, daily destinations, expeditions, members and slots, and rebuilds gift_packs so a pack can come from an expedition.
- Players launch a solo expedition from the Guild, see an exact preview, and claim their loot when it returns; the card sheet shows cards away on an expedition.
- Administration › Guilde tunes every value with server-side bounds, toggles destinations and cancels running expeditions; expeditions stay closed until an administrator opens them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 14:29:05 +01:00
0ef213cf4f Add the Guilde des Veilleurs and its daily guess-the-card quest to Sokko TCG
All checks were successful
Validate and deploy Sokko G / validate (push) Successful in 20m57s
Validate and deploy Sokko G / deploy (push) Successful in 12s
- La Carte du jour: one zoomed card shared by all players each Paris day, six guesses with collection and rarity hints, a fixed stardust reward and an emoji result to share.
- The Guilde des Veilleurs lists the quests, with a menu entry, a home banner and an admin section for quest settings.
- The section menu folds into a dropdown below 960 px; the home pairs the guild with the best pull and moves the opening reserve under the menu.
- The shop pack share moves to the shop collection admin page, which recalls where the pack draws its cards.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 18:43:28 +01:00
498e171bc3 Show a full reserve count on the Sokko TCG menu icon and remaining openings while opening a pack
A gold count now sits on the Sokko TCG menu icon while the opening reserve is
full, so players notice it from any page. A light reserve route keeps it up to
date outside the game, and the game page updates it with every state it gets.
The opening stage also lists the remaining openings, apart for the automatic
recharge and for openings bought one at a time, since the sidebar reserve is
hidden there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 23:16:47 +01:00
9ce0c3e33a Tighten the remaining Cards and dev server security defaults
All checks were successful
Validate and deploy Sokko G / validate (push) Successful in 19m52s
Validate and deploy Sokko G / deploy (push) Successful in 10s
Session and OAuth cookies now carry the __Host- prefix over HTTPS, so another
application of the domain cannot set them. The public configuration route has
a request limit, the trader list reads every player in one query, and new
campaign codes need eight characters while existing ones keep working.

The Vite server now listens on 127.0.0.1 unless HOST says otherwise, because
it gives administrator rights to any visitor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 14:27:22 +01:00
f7eb225eb8 Name the Cards data controller and retire long inactive accounts
Publish CARDS_PRIVACY_CONTROLLER in the privacy notice, required in production
like the contact. A daily maintenance anonymises non-admin accounts after 24
months without login and purges expired sessions and old idempotency keys.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 19:07:52 +01:00
e60fbd4e9b Let Cards players delete their account and read a privacy notice
Add a Compte section with a privacy notice and a confirmed deletion that
anonymises the player row, erases their possessions and cancels open trades.
The public contact comes from CARDS_PRIVACY_CONTACT, which production now
requires before enabling the game. The admin E2E no longer relies on a pull
from the previous test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 18:05:41 +01:00
155187d01f Hide unrevealed Cards pulls and show the odds players really get
Keep a pending opening's cards out of the home highlight and collection until
they are revealed, and refuse transfers meanwhile. Odds now ignore rarities a
pack cannot give. Stable files gain an ETag so card images revalidate instead
of downloading again, and logging out clears the local collection copy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 18:00:32 +01:00
b2e46b1d2a Harden Cards administrator access and the database path
Ignore the development login in production unless a test server asks for it in
code, apply the administrator list to existing accounts at startup, and move
the example database to a folder the deployment script does not reset to root.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 17:55:52 +01:00
5ce35cd7ba Add the Sokko TCG collectible card mini-game
Add the server-backed card game: Discord login, recharging pack openings,
album, trades, gifts, stardust shop, campaign codes and its administration,
stored in SQLite and disabled in production until configured.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 17:47:35 +01:00