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)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function to_number(x)
|
||||||
|
return type(x) == "table" and x:tonumber() or x
|
||||||
|
end
|
||||||
|
|
||||||
SMODS.Blind {
|
SMODS.Blind {
|
||||||
loc_txt = {
|
loc_txt = {
|
||||||
name = "The Descending",
|
name = "The Descending",
|
||||||
|
|
@ -87,7 +91,11 @@ SMODS.Blind {
|
||||||
press_play = function(_)
|
press_play = function(_)
|
||||||
offset_operator(0)
|
offset_operator(0)
|
||||||
end,
|
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)
|
offset_operator(-1)
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
@ -149,4 +157,9 @@ SMODS.Blind {
|
||||||
recalc_debuff = function(_, card, _)
|
recalc_debuff = function(_, card, _)
|
||||||
return card:norank() or card:get_id() ~= 2
|
return card:norank() or card:get_id() ~= 2
|
||||||
end,
|
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