Add anti-synergy warnings: CLASHES pairs and per-joker CAUTIONS
Warning-only data in synergies.lua — never touches the synergy score. Tooltips gain a red 'Clashes - <owned joker>: <why>' line when a hovered joker fights one you own (Ride the Bus + Pareidolia, Vampire vs Steel Joker/Lucky Cat, Smeared vs Flower Pot), and a 'Caution:' line in the buy area for jokers that harm a board you keep (Ceremonial Dagger, Madness, Stencil). Learning mode keeps warnings — they teach. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -36,6 +36,13 @@ for _, p in ipairs(data.pairs) do
|
||||
JCA.pair_blurb[pair_key(p[1], p[2])] = p[3]
|
||||
end
|
||||
|
||||
-- Known traps: warning-only, never part of the synergy score.
|
||||
JCA.clash_blurb = {}
|
||||
for _, p in ipairs(data.clashes or {}) do
|
||||
JCA.clash_blurb[pair_key(p[1], p[2])] = p[3]
|
||||
end
|
||||
JCA.cautions = data.cautions or {}
|
||||
|
||||
-- Scoring -------------------------------------------------------------------
|
||||
|
||||
-- Synergy score between two joker center keys. 0 = no known synergy.
|
||||
@@ -205,6 +212,7 @@ end
|
||||
local function tooltip_rows(card)
|
||||
-- Touch mode enlarges every advice row for phone screens (see config.lua).
|
||||
local S = JCA.config.touch_mode and 1.4 or 1
|
||||
local key = card.config.center.key
|
||||
local partners, total = JCA.partners_for(card)
|
||||
|
||||
local rows = {}
|
||||
@@ -239,7 +247,6 @@ local function tooltip_rows(card)
|
||||
else
|
||||
text_row('Active combos with:')
|
||||
end
|
||||
local key = card.config.center.key
|
||||
local shown = math.min(3, #partners)
|
||||
for i = 1, shown do
|
||||
local p = partners[i]
|
||||
@@ -263,6 +270,26 @@ local function tooltip_rows(card)
|
||||
text_row('Strong pick for this build!', G.C.GREEN)
|
||||
end
|
||||
end
|
||||
-- Anti-synergy warnings: known traps against the board you keep. These
|
||||
-- never touch the score (learning mode keeps them too — they teach).
|
||||
if G.jokers and G.jokers.cards then
|
||||
for _, owned in ipairs(G.jokers.cards) do
|
||||
if owned ~= card and owned.config.center.set == 'Joker' then
|
||||
local warn = JCA.clash_blurb[pair_key(key, owned.config.center.key)]
|
||||
if warn then
|
||||
rows[#rows + 1] = {
|
||||
{n = G.UIT.T, config = {
|
||||
text = 'Clashes - ' .. name_of(owned.config.center.key) .. ': ',
|
||||
colour = G.C.RED, scale = 0.3 * S}},
|
||||
{n = G.UIT.T, config = {text = warn,
|
||||
colour = G.C.UI.TEXT_DARK, scale = 0.3 * S}},
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
local caution = in_buy_area(card) and JCA.cautions[key]
|
||||
if caution then text_row('Caution: ' .. caution, G.C.RED) end
|
||||
rows.name = 'Combo Advisor'
|
||||
return rows
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user