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)
|
orig_draw(self, layer)
|
||||||
end
|
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 {
|
SMODS.Joker {
|
||||||
key = "saint",
|
key = "saint",
|
||||||
|
|
@ -430,10 +448,10 @@ SMODS.Joker {
|
||||||
text = {
|
text = {
|
||||||
"{C:spectral}#2# {}will {C:attention}not destroy Jokers",
|
"{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: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},
|
pos = {x = 0, y = 0},
|
||||||
soul_pos = {x = 1, y = 0},
|
soul_pos = {x = 1, y = 0},
|
||||||
cost = 20,
|
cost = 20,
|
||||||
|
|
@ -450,7 +468,7 @@ SMODS.Joker {
|
||||||
Cryptid and "Ankh and Gateway" or "Ankh",
|
Cryptid and "Ankh and Gateway" or "Ankh",
|
||||||
attuned and "" or "Attune ",
|
attuned and "" or "Attune ",
|
||||||
attuned and "" or "after using ",
|
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 "" or (Cryptid and " Gateways" or " Ankh or Soul Cards"),
|
||||||
attuned and " Chips " or "",
|
attuned and " Chips " or "",
|
||||||
attuned and "& " or "",
|
attuned and "& " or "",
|
||||||
|
|
@ -458,7 +476,9 @@ SMODS.Joker {
|
||||||
attuned and "" or "[",
|
attuned and "" or "[",
|
||||||
attuned and "" or karma,
|
attuned and "" or karma,
|
||||||
attuned and "" or " / " .. max_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,
|
end,
|
||||||
update = function(_, card, _)
|
update = function(_, card, _)
|
||||||
|
|
@ -483,13 +503,19 @@ SMODS.Joker {
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local attune = attunement()
|
||||||
|
|
||||||
|
if attune == 1 then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
card = card,
|
card = card,
|
||||||
colour = G.C.jane_RGB,
|
colour = G.C.jane_RGB,
|
||||||
sound = "talisman_eeechip",
|
sound = "talisman_eeechip",
|
||||||
message = "^^" .. attunement .. " Chips & Mult",
|
message = "^^" .. attune .. " Chips & Mult",
|
||||||
[Cryptid and "EEchip_mod" or "Echip_mod"] = attunement,
|
[Cryptid and "EEchip_mod" or "Echip_mod"] = attune,
|
||||||
[Cryptid and "EEmult_mod" or "Emult_mod"] = attunement,
|
[Cryptid and "EEmult_mod" or "Emult_mod"] = attune,
|
||||||
}, true
|
}, true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue