Add the shopping list: name the gaps the board wants filled
JCA.build_gaps() splits the board's tags into unmet wants (some joker wants it, no OTHER joker gives it) and untapped hooks (given, nothing pays it off). Rendered at the top of the in-run Combos overlay via TAG_LABEL; engine roles stay excluded because they hint nothing. Board slots are compared by index, not db-entry identity, so two copies of one cluster joker correctly feed each other. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -400,6 +400,35 @@ ok(cut == board[1] or cut == board[2],
|
||||
'the sell advisor flags one of the two clashing jokers',
|
||||
cut and cut.config.center.key or 'nil')
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
section('Engine: build gaps name what the board is shopping for')
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
-- Baron alone: wants held-card retriggers and hand size, and nothing on the
|
||||
-- board provides either; its copy_target give has no copier to pay it off.
|
||||
field('j_baron')
|
||||
local looking, untapped = JCA.build_gaps()
|
||||
eq(table.concat(looking, ','), 'retrig_held,hand_size',
|
||||
'a lone Baron is shopping for its enablers, in TAG_ORDER')
|
||||
eq(table.concat(untapped, ','), 'copy_target',
|
||||
'its copy_target hook is untapped until a copier arrives')
|
||||
|
||||
-- Mime fills the retrig_held gap (and only that gap).
|
||||
field('j_baron', 'j_mime')
|
||||
looking = JCA.build_gaps()
|
||||
eq(table.concat(looking, ','), 'hand_size', 'Mime closes the retrig_held gap')
|
||||
|
||||
-- Two copies of the same cluster joker feed each other: the entries share one
|
||||
-- db table, so the check must compare board slots, not table identity.
|
||||
field('j_jolly', 'j_jolly')
|
||||
looking = JCA.build_gaps()
|
||||
eq(table.concat(looking, ','), '', 'two Jolly Jokers are not shopping for Pairs')
|
||||
|
||||
-- One alone is: a cluster member cannot feed itself.
|
||||
field('j_jolly')
|
||||
looking = JCA.build_gaps()
|
||||
eq(table.concat(looking, ','), 'pair', 'a lone cluster member still wants its cluster')
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
section('Data: themes are reachable')
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user