2 Commits

Author SHA1 Message Date
iamsub
ec4c3614b7 otoca: choose the rival card pack in the WebUI
The pack of the rival cards offered after a play comes from the game's
version: rivalcard_packdata picks the last row at or below it, and
5-6 to 5-11 unlock the same content otherwise (only the title-screen
pack icon differs). Always sending phase 11 fixed the pack to
Le Fenice.

The new setting "Rival card pack" (one of the five packs, or Random)
picks the phase sent by getVersion and getCardInfo. getCardInfo's
version is applied when the card is scanned, so Random draws a pack for
each play; plays without a scan use getVersion's.
2026-09-29 20:41:52 +09:00
iamsub
7518cd2abc otoca: split the plugin into handlers, models and helpers
index.ts now only registers settings and routes. Handlers are grouped
by part of the game (version, card, key, print, play, item, gift), the
stored documents live in models/, and the closet, player creation, db
access, game data and helpers each have their own file. No behavior
change: the test flow gives the same results.
2026-09-29 15:32:48 +09:00