A full pass over the mission code showed the previous analysis read the
achievement check one slot off: mission k (2-9) is checked against the
flag recorded for k-1 (FUN_100219c0's jump table), so mission 1 is the
first play and Nyandora's 8 letters are missions 2-9. SELECTCARD plays
the "wallpaper complete" animation when mission 9 is done.
The plugin stopped at 9 and gave the wallpaper when reaching it, one
letter early, then ignored the report of 9, so the 8th letter came back
every play. Now reporting 9 adds wallpaper 29 and moves to 10, which the
game treats as no mission. Wallpaper 29 is confirmed by afp_letter.ifs,
which completes card_bg 0018.
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.
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.