Warn when the upcoming boss will silence the joker on sale

Five bosses debuff a whole card class for the fight (game.lua P_BLINDS,
applied in Blind:debuff_card blind.lua:708): The Club/Goad/Head/Window
kill a suit, The Plant kills faces. A debuffed card scores nothing and
triggers nothing, so a shop joker wanting that class is a dead ante --
and one GIVING it is worse: Pareidolia under The Plant converts the
whole deck into debuffed faces, so givers warn too. JCA.upcoming_boss
reads G.GAME.round_resets and goes quiet once the boss is defeated.
Warning-only, never a score change, kept in learning mode.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
funman300
2026-07-14 13:46:18 -07:00
parent ea8faac434
commit 445171dc0b
2 changed files with 68 additions and 0 deletions
+29
View File
@@ -415,6 +415,35 @@ per[2].ability = {perishable = true, perish_tally = 0}
eq(JCA.weakest_link(), per[2],
'but a perished joker is the cut at any score - it will never work again')
--------------------------------------------------------------------------------
section('Engine: boss-blind cautions know who the boss silences')
--------------------------------------------------------------------------------
-- The five class-killer bosses, verbatim from game.lua's P_BLINDS debuff
-- configs. Every tag they reference must exist in the database, or the
-- caution can never fire.
for boss, kill in pairs(JCA.boss_kills) do
ok(JCA.tag_label[kill.tag], ('boss %s kills a real catalog tag (%s)'):format(boss, kill.tag))
end
-- The Plant debuffs faces: it must catch both the payoff (Business Card
-- wants faces) and the enabler (Pareidolia turns every card into one).
local plant = JCA.boss_kills.bl_plant
ok(JCA.db.j_business.wants[plant.tag], 'The Plant caution catches face payoffs')
ok(JCA.db.j_pareidolia.gives[plant.tag], 'and face enablers, whose conversion kills the deck')
-- Upcoming-boss reading: warn while the boss is ahead, stay quiet once it
-- is dealt with.
G.GAME.round_resets = {
blind_choices = {Small = 'bl_small', Big = 'bl_big', Boss = 'bl_plant'},
blind_states = {Small = 'Defeated', Big = 'Current', Boss = 'Upcoming'},
}
eq(JCA.upcoming_boss(), 'bl_plant', 'the upcoming boss is read from round_resets')
G.GAME.round_resets.blind_states.Boss = 'Defeated'
eq(JCA.upcoming_boss(), nil, 'a defeated boss warns nobody')
G.GAME.round_resets = nil
eq(JCA.upcoming_boss(), nil, 'no round state (menus, tests) reads as no boss')
--------------------------------------------------------------------------------
section('Engine: Ceremonial Dagger names its victim')
--------------------------------------------------------------------------------