Add corrupted form

This commit is contained in:
Emik 2025-03-26 19:56:48 +01:00
parent 4f411eadd2
commit e848c96354
Signed by untrusted user who does not match committer: emik
GPG key ID: 09CDFF9E5703688D
3 changed files with 128 additions and 16 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View file

@ -104,46 +104,158 @@ local function voucher_count()
return count
end
local oxy_quotes = {
normal = {
"YOU WILL LOSE",
"DON'T EVEN TRY",
"WE WILL STOP YOU",
"He glares at the blinds with conviction.",
},
scared = {
"...H-how are you doing t-that...?",
"This is... unsettling...",
"S-... So much power...",
}
}
SMODS.Joker {
key = "oxy",
atlas = "janeoxy",
loc_txt = {
name = "Oxy",
name = "Oxy{C:dark_edition}#1#",
text = {
"{C:attention}Scored steel{} cards give",
"{X:mult,C:white}x#1#{} {C:mult}Mult {}& {X:chips,C:white}x#1#{} {C:chips}Chips",
" ",
"{C:inactive,s:0.75,E:1}#2#{C:red,s:1.5,E:1}#3#",
"{C:attention}Scored steel {}cards give",
"{X:mult,C:white}x#2#{} {C:mult}Mult {}and {X:chips,C:white}x#2#{} {C:chips}Chips",
"{C:dark_edition,E:1}#3#{}#4#{C:red}#5#{C:attention}#6#",
"{C:dark_edition,E:1}#7#{}#8#",
"#9#{C:dark_edition,E:1}#10#",
"{C:inactive,s:0.75,E:1}#11#{C:red,s:1.5,E:1}#12#",
}
},
pos = {x = 0, y = 0},
config = {steel = 1.5},
config = {extra = {corrupted_steel = 2.25, is_corrupted = false, milestone = 5, progress = 0, steel = 1.5}},
sinis = {x = 2, y = 0},
soul_pos = {x = 1, y = 0},
cost = 10,
blueprint_compat = true,
rarity = Cryptid and 3 or 4,
loc_vars = function(_, _, center)
loc_vars = function(_, _, card)
local ability = card.ability.extra or {}
local milestone = ability.milestone
local progress = ability.progress
local is_corrupted = ability.is_corrupted
local amount = is_corrupted and ability.corrupted_steel or ability.steel
local effective = is_corrupted and progress or milestone - progress
local plural = effective == 1 and "" or "s"
return {vars = {
center.ability.steel,
Jane.sinister and "" or "We all cut close...",
Jane.sinister and "WHAT ARE YOU DOING DOWN THERE?!?" or "",
is_corrupted and " (Corrupted)" or "",
amount,
is_corrupted and "Uncorrupts " or "",
is_corrupted and "in " or "",
is_corrupted and "" or "Destroying ",
effective .. (is_corrupted and " round" or " steel card") .. plural,
is_corrupted and "" or "corrupts ",
is_corrupted and "Destroying steel cards" or "this joker",
is_corrupted and "prolongs the " or "",
is_corrupted and "corruption" or "",
Jane.sinister and "" or (is_corrupted and pseudorandom_element(oxy_quotes.normal, pseudoseed("OxyQuotes")) or "We all cut close..."),
Jane.sinister and (is_corrupted and pseudorandom_element(oxy_quotes.scared, pseudoseed("OxyQuotes")) or "WHAT ARE YOU DOING DOWN THERE?!?") or "",
}}
end,
update = function(_, card, _)
if card.added_to_deck and card.children.center and card.children.floating_sprite then
local extra = card.ability.extra or {}
card.children.center:set_sprite_pos({x = 0, y = extra.is_corrupted and 1 or 0})
card.children.floating_sprite:set_sprite_pos({x = Jane.sinister and 2 or 1, y = extra.is_corrupted and 1 or 0})
end
end,
calculate = function(_, card, context)
local extra = card.ability.extra or {}
local destroyed_steel = 0
for _, v in pairs(context.removed or {}) do
if (v.ability or {}).name == "Steel Card" then
destroyed_steel = destroyed_steel + 1
end
end
if destroyed_steel > 0 then
extra.progress = extra.progress + destroyed_steel
card_eval_status_text(
card,
"extra",
nil,
nil,
nil,
{
message = (extra.is_corrupted and "+" or "-") .. destroyed_steel,
colour = extra.is_corrupted and G.C.PURPLE or G.C.GREY
}
)
end
if context.end_of_round and
extra.progress > 0 and not
context.individual and not
context.repetition and not
context.retrigger_joker then
extra.progress = extra.progress - 1
card_eval_status_text(
card,
"extra",
nil,
nil,
nil,
{
message = extra.is_corrupted and "-1" or "+1",
colour = extra.is_corrupted and G.C.PURPLE or G.C.GREY
}
)
end
if not extra.is_corrupting and
((extra.progress >= extra.milestone and not extra.is_corrupted) or
(extra.progress <= 0 and extra.is_corrupted)) then
extra.is_corrupting = true
G.E_MANAGER:add_event(Event({
delay = 0.1,
func = function()
card:flip()
play_sound("card1")
return true
end
}))
G.E_MANAGER:add_event(Event({
delay = 1,
func = function()
card:flip()
card:juice_up(1, 1)
play_sound("card1")
extra.is_corrupted = not extra.is_corrupted
extra.is_corrupting = nil
return true
end
}))
end
if context.individual and
context.cardarea == G.play and
context.other_card.ability.name == "Steel Card" then
return {
x_chips = card.ability.steel,
x_mult = card.ability.steel,
colour = G.C.PURPLE,
card = card
}, true
local amount = extra.is_corrupted and extra.corrupted_steel or extra.steel
return {x_chips = amount, x_mult = amount, colour = G.C.PURPLE, card = card}, true
end
end
}
if Cryptid then
Cryptid.aliases["oxy"] = "j_jane_oxy"
end
SMODS.Joker {
key = "7granddad",
loc_txt = {