Add a test suite, and fix the three dead-data bugs it found
There was no test file -- CLAUDE.md described the harness in prose and referred to an "orphan-tag check" that did not exist. test.lua now stubs the game globals and exercises the real engine, database and catalog tab builders. It found three bugs on its first run: * four_kind was the only theme in the catalog that could never be discovered. Theme discovery needs a giver and a wanter on two DIFFERENT fielded jokers, and The Family was its sole member -- so the Hands bar and the overall Progress bar could never reach 100%. DNA is the real enabler (copying a card is how you stack duplicate ranks, the only vanilla route to a reliable Four of a Kind), so it now gives the matching-hand tags as a pure enabler. * hand_level was given by Space Joker and Burnt Joker and wanted by nobody, so it could never contribute to a score and its "want" tooltip text was unreachable. Nothing in vanilla rewards hand levels; the tag is dropped rather than faked. * Invisible Joker had no tags at all, so it scored 0 against the entire game. Selling it duplicates one of your Jokers -- the same "stronger target, better payoff" logic Blueprint and Brainstorm already model -- so it now wants copy_target. The suite guards both directions of the tag contract (no orphan wants, no dead gives), theme reachability, blurb widths, the inert-joker list, and the card materialize fix from the previous commit. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -267,7 +267,7 @@ local TAG_LABEL = {
|
||||
faces = 'face cards', retrig_scoring = 'played-card retriggers',
|
||||
retrig_held = 'held-card retriggers', hand_size = 'hand size',
|
||||
hands_up = 'extra hands', discards_up = 'discards',
|
||||
probability = 'listed odds', money = 'money', hand_level = 'hand levels',
|
||||
probability = 'listed odds', money = 'money',
|
||||
tarot_gen = 'Tarot cards', planet = 'Planet cards',
|
||||
spectral_gen = 'Spectral cards', gold_gen = 'Gold cards',
|
||||
stone_gen = 'Stone cards', enhance_gen = 'card enhancing',
|
||||
|
||||
Reference in New Issue
Block a user