Add chip setter if mult is too imprecise
This commit is contained in:
parent
7a99059b7e
commit
56a37927cc
1 changed files with 14 additions and 1 deletions
|
|
@ -58,6 +58,10 @@ local function offset_operator(by)
|
|||
end)
|
||||
end
|
||||
|
||||
local function to_number(x)
|
||||
return type(x) == "table" and x:tonumber() or x
|
||||
end
|
||||
|
||||
SMODS.Blind {
|
||||
loc_txt = {
|
||||
name = "The Descending",
|
||||
|
|
@ -87,7 +91,11 @@ SMODS.Blind {
|
|||
press_play = function(_)
|
||||
offset_operator(0)
|
||||
end,
|
||||
set_blind = function(_)
|
||||
set_blind = function(self)
|
||||
if to_number(self.mult) == 0 then
|
||||
self.chips = math.floor(8 * math.sqrt(get_blind_amount(G.GAME.round_resets.ante)))
|
||||
end
|
||||
|
||||
offset_operator(-1)
|
||||
end,
|
||||
}
|
||||
|
|
@ -149,4 +157,9 @@ SMODS.Blind {
|
|||
recalc_debuff = function(_, card, _)
|
||||
return card:norank() or card:get_id() ~= 2
|
||||
end,
|
||||
set_blind = function(self)
|
||||
if to_number(self.mult) == 0 then
|
||||
self.chips = 22
|
||||
end
|
||||
end
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue