Commit graph

19 commits

Author SHA1 Message Date
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
c73a118ffb Let players who join a group set up their card and say when they are ready
All checks were successful
Validate and deploy Sokko G / validate (push) Successful in 22m30s
Validate and deploy Sokko G / deploy (push) Successful in 13s
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>
2026-11-19 19:24:23 +01:00
91ca8e39ef Reward specialists with Expertise and make the highest difficulties need equipment
A card is an expert of a required stat when it covers on its own twice the requirement of one place; each stat held by a different expert adds 8 % to the score, outside the synergy cap. Requirements rise for 3 to 5 stars and by 10 % per extra player, so a capped card without equipment rarely clears 5 stars while a reflected build does. A mythic now spreads as many level points as its legendary. Migration 21 drops stored requirements so the new defaults apply; the simulator builds teams with vocations and commons, and the balance test checks these targets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 22:16:06 +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
06a4ab6d6a Draw each player's daily destinations among the ones their destination cards unlock
The daily draw is now personal: up to four destinations among the visible ones the player has unlocked, with one difficulty level each, from the easiest up to the number of destinations drawn. A destination card gained during the day completes the draw, and a card given away removes its destination. A destination with no card in the catalog yet stays open to everyone, so only Le Cœur du Nuage Cosmique is locked for now. Joining a group never needs the destination card, and the planner shows how many destinations are unlocked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 15:58:00 +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
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
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
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