Warn about perishable scalers and rental money jokers at buy time
Per-instance sticker cautions, unlike the per-joker CAUTIONS table: the same joker is a fine buy without the sticker. Perishable debuffs a joker for good after 5 rounds (Card:calculate_perishable, card.lua:2652), so a perishable Ride the Bus or Hologram is investment about to be wiped -- the new SCALERS set in synergies.lua lists the jokers whose stored gains die that way, excluding computed (Bull) and round-scoped (Hit the Road) values and Egg, whose sell value survives a debuff. Rental charges every round (card.lua:2647), which can eat a money joker's whole payout. The scaler-key integrity test caught j_canio for j_caino on the first run -- the misspelled vanilla keys strike again. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -658,6 +658,32 @@ eq(JCA.consumable_partners(consumable('Booster', 'Buffoon')), nil,
|
||||
eq(JCA.consumable_partners({config = {center = {set = 'Voucher'}}}), nil,
|
||||
'a Voucher yields no consumable advice')
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
section('Engine: sticker cautions are per-instance, not per-joker')
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
-- Every scaler is a real joker; a typo here would silently disarm the caution.
|
||||
for k in pairs(JCA.scalers) do
|
||||
ok(JCA.db[k] ~= nil, 'scaler ' .. k .. ' exists in the database')
|
||||
end
|
||||
|
||||
local function stickered(key, ability)
|
||||
return {config = {center = {key = key}}, ability = ability}
|
||||
end
|
||||
|
||||
eq(#JCA.sticker_cautions(stickered('j_ride_the_bus', {perishable = true})), 1,
|
||||
'a perishable scaler earns a caution')
|
||||
eq(#JCA.sticker_cautions(stickered('j_golden', {perishable = true})), 0,
|
||||
'a perishable static joker loses nothing stored - no caution')
|
||||
eq(#JCA.sticker_cautions(stickered('j_golden', {rental = true})), 1,
|
||||
'a rental money joker earns a caution (rent can eat the payout)')
|
||||
eq(#JCA.sticker_cautions(stickered('j_baron', {rental = true})), 0,
|
||||
'a rental non-money joker is just a cheap joker - no caution')
|
||||
eq(#JCA.sticker_cautions(stickered('j_ride_the_bus', {})), 0,
|
||||
'no sticker, no caution')
|
||||
eq(#JCA.sticker_cautions(stickered('j_mod_unknown', {perishable = true, rental = true})), 0,
|
||||
'unknown keys never warn and never error')
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
section('Data: themes are reachable')
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user