Respect the other two stickers: rentals bleed, perished jokers are dead
JCA.is_rental and JCA.is_perished read ability.rental and ability.perishable/perish_tally, the same flags vanilla uses (card.lua:684/676). The sell advisor now docks a rental 2 points (it drains $3 every round, game.lua:1957) and treats a perished joker -- tally 0, debuffed permanently per card.lua:716 -- as dead weight that outweighs any synergy score. Tooltips gain the mechanical facts: countdown on ticking perishables, drain rate on rentals (shop phrasing notes the $1 price), and 'Perished - it will never work again' instead of the misleading 'does nothing this blind' on permanently dead cards. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -258,6 +258,13 @@ end
|
||||
-- so it always breaks a tie against a clashing joker.
|
||||
local CLASH_PENALTY = 3
|
||||
|
||||
-- Sticker weights, same philosophy: mechanical facts only. A rental bleeds
|
||||
-- $3 every round, so between two equally-scoring jokers, cut the rental. A
|
||||
-- PERISHED joker (perishable, tally at 0) is debuffed forever -- dead weight
|
||||
-- at any synergy score, so its penalty dwarfs every possible total.
|
||||
local RENTAL_PENALTY = 2
|
||||
local PERISHED_PENALTY = 1000
|
||||
|
||||
local function keep_score(card, cards)
|
||||
local _, total = JCA.partners_for(card)
|
||||
local key = card.config.center.key
|
||||
@@ -267,6 +274,8 @@ local function keep_score(card, cards)
|
||||
total = total - CLASH_PENALTY
|
||||
end
|
||||
end
|
||||
if JCA.is_rental(card) then total = total - RENTAL_PENALTY end
|
||||
if JCA.is_perished(card) then total = total - PERISHED_PENALTY end
|
||||
return total
|
||||
end
|
||||
|
||||
@@ -284,6 +293,22 @@ function JCA.is_eternal(card)
|
||||
return not not (card.ability and card.ability.eternal)
|
||||
end
|
||||
|
||||
-- Rental and Perishable are the other two stickers the advisor must respect,
|
||||
-- and both are plain ability flags like eternal (card.lua:684, 676). A rental
|
||||
-- drains G.GAME.rental_rate every round (card.lua:2646; $3, game.lua:1957).
|
||||
-- A perishable joker counts perish_tally down each round (card.lua:2652) and
|
||||
-- once it hits 0 the card is debuffed PERMANENTLY (card.lua:716) -- not "this
|
||||
-- blind", forever. Eternal and perishable are mutually exclusive (set_perishable
|
||||
-- bails on eternals), so a perished joker is always legal to sell.
|
||||
function JCA.is_rental(card)
|
||||
return not not (card.ability and card.ability.rental)
|
||||
end
|
||||
|
||||
function JCA.is_perished(card)
|
||||
local a = card.ability
|
||||
return not not (a and a.perishable and (a.perish_tally or 0) <= 0)
|
||||
end
|
||||
|
||||
function JCA.weakest_link()
|
||||
if not (G.jokers and G.jokers.cards) then return nil end
|
||||
local cards = G.jokers.cards
|
||||
@@ -567,13 +592,32 @@ local function tooltip_rows(card)
|
||||
local caution = in_buy_area(card) and JCA.cautions[key]
|
||||
if caution then text_row('Caution: ' .. caution, G.C.RED) end
|
||||
|
||||
-- Sticker facts (any area -- higher stakes put stickers on shop jokers
|
||||
-- too). Mechanical numbers from the game source, not judgements, so
|
||||
-- learning mode keeps them.
|
||||
if card.ability and card.ability.perishable and not JCA.is_perished(card) then
|
||||
local n = card.ability.perish_tally or 0
|
||||
text_row(('Perishable - %d round%s before it dies')
|
||||
:format(n, n == 1 and '' or 's'), G.C.RED)
|
||||
end
|
||||
if JCA.is_rental(card) then
|
||||
local rate = (G.GAME and G.GAME.rental_rate) or 3
|
||||
text_row(in_buy_area(card)
|
||||
and ('Rental - $1 now, but $' .. rate .. ' every round after')
|
||||
or ('Rental - drains $' .. rate .. ' every round'), G.C.RED)
|
||||
end
|
||||
|
||||
-- Positional jokers: say what this one is doing to its neighbour RIGHT NOW.
|
||||
-- The board order decides it, so only an owned joker has an answer. These are
|
||||
-- explanations, not verdicts, so learning mode keeps them.
|
||||
if card.area == G.jokers then
|
||||
-- A debuffed joker does nothing at all this blind, whatever its combos say.
|
||||
-- A debuffed joker does nothing at all this blind, whatever its combos
|
||||
-- say -- and a PERISHED one is debuffed for good (card.lua:716), which
|
||||
-- deserves the honest tense.
|
||||
if card.debuff then
|
||||
text_row('Debuffed - does nothing this blind', G.C.RED)
|
||||
text_row(JCA.is_perished(card)
|
||||
and 'Perished - it will never work again'
|
||||
or 'Debuffed - does nothing this blind', G.C.RED)
|
||||
end
|
||||
|
||||
-- Copy jokers. A Blueprint in the wrong slot is a dead card that looks fine.
|
||||
|
||||
Reference in New Issue
Block a user