Make The Saint value dynamic
This commit is contained in:
parent
f0551cfb4a
commit
34da94cddf
1 changed files with 34 additions and 8 deletions
|
|
@ -420,7 +420,25 @@ function Card:draw(layer)
|
|||
orig_draw(self, layer)
|
||||
end
|
||||
|
||||
local attunement = Cryptid and 1.001 or 1.5
|
||||
local function attunement()
|
||||
local function polygloss(tbl)
|
||||
local sum = 0
|
||||
|
||||
for _, v in pairs(tbl) do
|
||||
if (v.edition or {}).key == "e_jane_polygloss" then
|
||||
sum = sum + 1
|
||||
end
|
||||
end
|
||||
|
||||
return sum
|
||||
end
|
||||
|
||||
local cards = polygloss(G.playing_cards) + polygloss(G.jokers.cards) + polygloss(G.consumeables.cards)
|
||||
local base = Cryptid and 1.00001 or 1.001
|
||||
local round = Cryptid and 10000 or 100
|
||||
local expo = cards * 10
|
||||
return math.floor(base ^ expo * round) / round
|
||||
end
|
||||
|
||||
SMODS.Joker {
|
||||
key = "saint",
|
||||
|
|
@ -430,10 +448,10 @@ SMODS.Joker {
|
|||
text = {
|
||||
"{C:spectral}#2# {}will {C:attention}not destroy Jokers",
|
||||
"{C:jane_RGB}#3#{}#4#{X:black,C:jane_RGB,s:1.5}#5#{C:spectral}#6#{C:chips}#7#{}#8#{C:mult}#9#",
|
||||
"{C:inactive,s:1.25}#10#{C:attention,s:1.25}#11#{C:inactive,s:1.25}#12#{C:inactive}#13#",
|
||||
"{C:inactive,s:1.25}#10#{C:attention,s:1.25}#11#{C:inactive,s:1.25}#12#{C:inactive}#13#{C:jane_RGB}#14#{C:inactive}#15#",
|
||||
}
|
||||
},
|
||||
config = {extra = {karma = 0, max_karma = Cryptid and 10 or 5}},
|
||||
config = {extra = {karma = 0, max_karma = Cryptid and 10 or 3}},
|
||||
pos = {x = 0, y = 0},
|
||||
soul_pos = {x = 1, y = 0},
|
||||
cost = 20,
|
||||
|
|
@ -450,7 +468,7 @@ SMODS.Joker {
|
|||
Cryptid and "Ankh and Gateway" or "Ankh",
|
||||
attuned and "" or "Attune ",
|
||||
attuned and "" or "after using ",
|
||||
attuned and (Cryptid and "^^" or "^") .. attunement or max_karma,
|
||||
attuned and (Cryptid and "^^" or "^") .. attunement() or max_karma,
|
||||
attuned and "" or (Cryptid and " Gateways" or " Ankh or Soul Cards"),
|
||||
attuned and " Chips " or "",
|
||||
attuned and "& " or "",
|
||||
|
|
@ -458,7 +476,9 @@ SMODS.Joker {
|
|||
attuned and "" or "[",
|
||||
attuned and "" or karma,
|
||||
attuned and "" or " / " .. max_karma .. "]",
|
||||
attuned and "(Cannot be debuffed)" or "",
|
||||
attuned and "(Cannot be debuffed, scales with " or "",
|
||||
attuned and "polygloss" or "",
|
||||
attuned and ")" or "",
|
||||
}}
|
||||
end,
|
||||
update = function(_, card, _)
|
||||
|
|
@ -483,13 +503,19 @@ SMODS.Joker {
|
|||
return
|
||||
end
|
||||
|
||||
local attune = attunement()
|
||||
|
||||
if attune == 1 then
|
||||
return
|
||||
end
|
||||
|
||||
return {
|
||||
card = card,
|
||||
colour = G.C.jane_RGB,
|
||||
sound = "talisman_eeechip",
|
||||
message = "^^" .. attunement .. " Chips & Mult",
|
||||
[Cryptid and "EEchip_mod" or "Echip_mod"] = attunement,
|
||||
[Cryptid and "EEmult_mod" or "Emult_mod"] = attunement,
|
||||
message = "^^" .. attune .. " Chips & Mult",
|
||||
[Cryptid and "EEchip_mod" or "Echip_mod"] = attune,
|
||||
[Cryptid and "EEmult_mod" or "Emult_mod"] = attune,
|
||||
}, true
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue