Use consistent whitespace

This commit is contained in:
Emik 2025-03-24 13:08:59 +01:00
parent ce5703bd23
commit 5d88cd8137
Signed by untrusted user who does not match committer: emik
GPG key ID: 09CDFF9E5703688D
12 changed files with 1915 additions and 1915 deletions

View file

@ -1,53 +1,53 @@
SMODS.Atlas { SMODS.Atlas {
px = 71, px = 71,
py = 95, py = 95,
key = "janedecks", key = "janedecks",
path = Jane.config.texture_pack .. "/b_jane_decks.png" path = Jane.config.texture_pack .. "/b_jane_decks.png"
} }
local eternal_text = Cryptid and "Absolute" or "Eternal" local eternal_text = Cryptid and "Absolute" or "Eternal"
SMODS.Back { SMODS.Back {
key = "nitro", key = "nitro",
atlas = "janedecks", atlas = "janedecks",
pos = {x = 1, y = 1}, pos = {x = 1, y = 1},
loc_txt = { loc_txt = {
name = "Acceleration Deck", name = "Acceleration Deck",
text = { text = {
Cryptid and "" or "{C:attention}Ante increases twice{} as strong", Cryptid and "" or "{C:attention}Ante increases twice{} as strong",
"After defeating the {C:attention}Boss Blind{},", "After defeating the {C:attention}Boss Blind{},",
Cryptid and "set {C:attention}ante {}to the {C:attention}next" or "", Cryptid and "set {C:attention}ante {}to the {C:attention}next" or "",
Cryptid and "{C:attention}triangle number {}and create" or "", Cryptid and "{C:attention}triangle number {}and create" or "",
Cryptid and "an {C:spectral,E:1}Empowered Tag" or "create a {C:dark_edition}Negative {C:spectral,E:1}Soul", Cryptid and "an {C:spectral,E:1}Empowered Tag" or "create a {C:dark_edition}Negative {C:spectral,E:1}Soul",
} }
}, },
apply = function(_) apply = function(_)
G.GAME.win_ante = Cryptid and G.GAME.win_ante * (G.GAME.win_ante + 1) / 2 or G.GAME.win_ante * 2 - 1 G.GAME.win_ante = Cryptid and G.GAME.win_ante * (G.GAME.win_ante + 1) / 2 or G.GAME.win_ante * 2 - 1
G.GAME.nitro = true G.GAME.nitro = true
end, end,
trigger_effect = function(_, args) trigger_effect = function(_, args)
if args.context == "eval" and G.GAME.last_blind and G.GAME.last_blind.boss then if args.context == "eval" and G.GAME.last_blind and G.GAME.last_blind.boss then
Jane.q(function() Jane.q(function()
Jane.empowered() Jane.empowered()
return true return true
end) end)
end end
end end
} }
SMODS.Back { SMODS.Back {
key = 'obsidian', key = 'obsidian',
atlas = 'janedecks', atlas = 'janedecks',
pos = {x = 2, y = 1}, pos = {x = 2, y = 1},
loc_txt = { loc_txt = {
name = 'Obsidian Deck', name = 'Obsidian Deck',
text = { text = {
'{C:attention}Hidden{} cards {C:inactive}(ex. {C:spectral}The Soul{C:inactive})', '{C:attention}Hidden{} cards {C:inactive}(ex. {C:spectral}The Soul{C:inactive})',
'can {C:attention}appear normally{}', 'can {C:attention}appear normally{}',
} }
}, },
apply = function(_) apply = function(_)
G.GAME.obsidian = true G.GAME.obsidian = true
end end
} }
@ -62,19 +62,19 @@ SMODS.Back {
"{X:chips,C:white}150{C:mult} X {X:red,C:white}1{} and", "{X:chips,C:white}150{C:mult} X {X:red,C:white}1{} and",
"{C:cry_ascendant}equalised {}whenever", "{C:cry_ascendant}equalised {}whenever",
"their {C:chips}Chips{}, {C:mult}Mult{},", "their {C:chips}Chips{}, {C:mult}Mult{},",
"or {C:planet}level {C:attention}change", "or {C:planet}level {C:attention}change",
} }
}, },
apply = function(_) apply = function(_)
Jane.q(function() Jane.q(function()
G.GAME.orrery = {chips = 150, level = 1, mult = 1} G.GAME.orrery = {chips = 150, level = 1, mult = 1}
for _, v in pairs(G.GAME.hands) do for _, v in pairs(G.GAME.hands) do
v.mult = G.GAME.orrery.mult v.mult = G.GAME.orrery.mult
v.chips = G.GAME.orrery.chips v.chips = G.GAME.orrery.chips
end end
save_run() save_run()
return true return true
end end
) )
@ -82,66 +82,66 @@ SMODS.Back {
} }
SMODS.Back { SMODS.Back {
key = "tortoise", key = "tortoise",
atlas = "janedecks", atlas = "janedecks",
pos = {x = 3, y = 1}, pos = {x = 3, y = 1},
loc_txt = { loc_txt = {
name = "Tortoise Deck", name = "Tortoise Deck",
text = { text = {
"{C:attention}Ante increases", "{C:attention}Ante increases",
"{C:attention}half{} as strong", "{C:attention}half{} as strong",
} }
}, },
apply = function(_) apply = function(_)
G.GAME.tortoise = true G.GAME.tortoise = true
end end
} }
SMODS.Back { SMODS.Back {
key = "weeck", key = "weeck",
atlas = "janedecks", atlas = "janedecks",
pos = {x = 4, y = 1}, pos = {x = 4, y = 1},
loc_txt = { loc_txt = {
name = "Weeck", name = "Weeck",
text = { text = {
"Start with an {C:purple,E:1}" .. eternal_text, "Start with an {C:purple,E:1}" .. eternal_text,
"{C:attention}Wee Joker {}and a deck", "{C:attention}Wee Joker {}and a deck",
"containing {C:attention}2 {C:purple,E:1}" .. eternal_text, "containing {C:attention}2 {C:purple,E:1}" .. eternal_text,
"{C:attention}2's {}of {C:attention}each suit", "{C:attention}2's {}of {C:attention}each suit",
} }
}, },
apply = function(_) apply = function(_)
G.GAME.weeck = true G.GAME.weeck = true
Jane.q(function() Jane.q(function()
local new_card = create_card("Joker", G.jokers, nil, nil, nil, nil, "j_wee", "weeck") local new_card = create_card("Joker", G.jokers, nil, nil, nil, nil, "j_wee", "weeck")
new_card.ability.cry_absolute = true new_card.ability.cry_absolute = true
new_card.ability.eternal = true new_card.ability.eternal = true
G.jokers:emplace(new_card) G.jokers:emplace(new_card)
local add = {} local add = {}
for _, v in pairs(G.playing_cards) do for _, v in pairs(G.playing_cards) do
if v.base.id == 2 then if v.base.id == 2 then
v.ability.cry_absolute = true v.ability.cry_absolute = true
v.ability.eternal = true v.ability.eternal = true
add[#add + 1] = v add[#add + 1] = v
else else
v:start_dissolve(nil, true) v:start_dissolve(nil, true)
end end
end end
for _, v in pairs(add) do for _, v in pairs(add) do
local dupe = copy_card(v) local dupe = copy_card(v)
dupe:start_materialize() dupe:start_materialize()
dupe:add_to_deck() dupe:add_to_deck()
G.hand:emplace(dupe) G.hand:emplace(dupe)
G.playing_card = (G.playing_card and G.playing_card + 1) or 1 G.playing_card = (G.playing_card and G.playing_card + 1) or 1
table.insert(G.playing_cards, dupe) table.insert(G.playing_cards, dupe)
end end
save_run() save_run()
return true return true
end) end)
end end
} }
@ -149,22 +149,22 @@ local orig_ante = ease_ante
---@diagnostic disable-next-line: lowercase-global ---@diagnostic disable-next-line: lowercase-global
function ease_ante(mod) function ease_ante(mod)
local function next_triangle_number(x) local function next_triangle_number(x)
local n = (math.sqrt(8 * x + 1) - 1) / 2 local n = (math.sqrt(8 * x + 1) - 1) / 2
return (n + 1) * (n + 2) / 2 return (n + 1) * (n + 2) / 2
end end
if G.GAME.nitro then if G.GAME.nitro then
mod = Cryptid and mod = Cryptid and
(G.GAME.round_resets.ante < 0 and -G.GAME.round_resets.ante (G.GAME.round_resets.ante < 0 and -G.GAME.round_resets.ante
or math.ceil(next_triangle_number(G.GAME.round_resets.ante) - G.GAME.round_resets.ante)) or or math.ceil(next_triangle_number(G.GAME.round_resets.ante) - G.GAME.round_resets.ante)) or
(mod > 0 and mod * 2 or mod) (mod > 0 and mod * 2 or mod)
end end
if G.GAME.tortoise and mod > 0 then if G.GAME.tortoise and mod > 0 then
local disp = tonumber(G.GAME.round_resets.ante_disp) + mod / 2 local disp = tonumber(G.GAME.round_resets.ante_disp) + mod / 2
mod = mod / 2 + (disp == math.floor(disp) and 0.5 or 0) mod = mod / 2 + (disp == math.floor(disp) and 0.5 or 0)
end end
orig_ante(mod) orig_ante(mod)
end end

View file

@ -1,16 +1,16 @@
SMODS.Atlas { SMODS.Atlas {
px = 34, px = 34,
py = 34, py = 34,
frames = 21, frames = 21,
key = "janeblinds", key = "janeblinds",
atlas_table = "ANIMATION_ATLAS", atlas_table = "ANIMATION_ATLAS",
path = Jane.config.texture_pack .. "/bl_jane_blinds.png" path = Jane.config.texture_pack .. "/bl_jane_blinds.png"
} }
local final_operations = { local final_operations = {
[1] = {"+", "UI_CHIPS"}, [1] = {"+", "UI_CHIPS"},
[2] = {"X", "UI_MULT"}, [2] = {"X", "UI_MULT"},
[3] = {"^", G.C.jane_RGB}, [3] = {"^", G.C.jane_RGB},
} }
local function offset_operator(by) local function offset_operator(by)
@ -22,9 +22,9 @@ local function offset_operator(by)
local previous = Jane.get_operator() local previous = Jane.get_operator()
set(by + previous) set(by + previous)
by = Jane.get_operator() by = Jane.get_operator()
local txt = final_operations[by][1] ---@diagnostic disable-next-line: cast-local-type local txt = final_operations[by][1] ---@diagnostic disable-next-line: cast-local-type
local col = type(final_operations[by][2]) == "table" and final_operations[by][2] or G.C[final_operations[by][2]] local col = type(final_operations[by][2]) == "table" and final_operations[by][2] or G.C[final_operations[by][2]]
Jane.q(function() Jane.q(function()
local changed_text = false local changed_text = false
@ -54,7 +54,7 @@ local function offset_operator(by)
play_sound("button", 1.1, 0.65) play_sound("button", 1.1, 0.65)
end end
return true return true
end) end)
end end
@ -105,21 +105,21 @@ SMODS.Blind {
vars = {}, vars = {},
dollars = 7, dollars = 7,
mult = 2, mult = 2,
debuff_hand = function(_, cards, _, _, _) debuff_hand = function(_, cards, _, _, _)
local numsuits = 0 local numsuits = 0
local checked_suits = {} local checked_suits = {}
for _, card in ipairs(cards) do for _, card in ipairs(cards) do
if not card:nosuit() and not checked_suits[card.base.suit] then if not card:nosuit() and not checked_suits[card.base.suit] then
numsuits = numsuits + 1 numsuits = numsuits + 1
checked_suits[card.base.suit] = true checked_suits[card.base.suit] = true
if numsuits > 1 then if numsuits > 1 then
return true return true
end end
end end
end end
end end
} }
SMODS.Blind { SMODS.Blind {
@ -136,17 +136,17 @@ SMODS.Blind {
vars = {}, vars = {},
dollars = 2, dollars = 2,
mult = 22 / 300, mult = 22 / 300,
debuff_hand = function(_, cards, _, _, _) debuff_hand = function(_, cards, _, _, _)
for _, v in ipairs(cards) do for _, v in ipairs(cards) do
if v:norank() or v:get_id() ~= 2 then if v:norank() or v:get_id() ~= 2 then
return true return true
end end
end end
end, end,
get_loc_debuff_text = function(_) get_loc_debuff_text = function(_)
return "Hand must contain only 2s" return "Hand must contain only 2s"
end, end,
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,
} }

View file

@ -1,35 +1,35 @@
SMODS.Atlas { SMODS.Atlas {
px = 71, px = 71,
py = 95, py = 95,
key = "janebooster", key = "janebooster",
path = Jane.config.texture_pack .. "/p_jane_boosters.png" path = Jane.config.texture_pack .. "/p_jane_boosters.png"
} }
for i = 1, 2 do for i = 1, 2 do
SMODS.Booster { SMODS.Booster {
key = "ministandard" .. i, key = "ministandard" .. i,
loc_txt = { loc_txt = {
name = "Mini Standard Pack", name = "Mini Standard Pack",
text = { text = {
"Choose {C:attention}#1#{} of up to", "Choose {C:attention}#1#{} of up to",
"{C:attention}#2# playing cards{} to", "{C:attention}#2# playing cards{} to",
"add to your deck", "add to your deck",
} }
}, },
atlas = "janebooster", atlas = "janebooster",
pos = {x = 6, y = i - 1}, pos = {x = 6, y = i - 1},
weight = 0.4, weight = 0.4,
cost = 2, cost = 2,
config = {extra = 2, choose = 1}, config = {extra = 2, choose = 1},
loc_vars = function(_, _, card) loc_vars = function(_, _, card)
return {vars = {card.ability.choose, card.ability.extra}} return {vars = {card.ability.choose, card.ability.extra}}
end, end,
ease_background_colour = function(_) ease_background_colour = function(_)
ease_background_colour_blind(G.STATES.STANDARD_PACK) ease_background_colour_blind(G.STATES.STANDARD_PACK)
end, end,
create_UIBox = function(_) create_UIBox = function(_)
return create_UIBox_standard_pack() return create_UIBox_standard_pack()
end, end,
particles = function(_) particles = function(_)
G.booster_pack_sparkles = Particles(1, 1, 0,0, { G.booster_pack_sparkles = Particles(1, 1, 0,0, {
timer = 0.015, timer = 0.015,
@ -51,44 +51,44 @@ for i = 1, 2 do
local seal = SMODS.poll_seal({mod = 10}) local seal = SMODS.poll_seal({mod = 10})
return { return {
set = (pseudorandom(pseudoseed("stdset"..G.GAME.round_resets.ante)) > 0.6) and "Enhanced" or "Base", set = (pseudorandom(pseudoseed("stdset"..G.GAME.round_resets.ante)) > 0.6) and "Enhanced" or "Base",
edition = edition, edition = edition,
seal = seal, seal = seal,
area = G.pack_cards, area = G.pack_cards,
skip_materialize = true, skip_materialize = true,
soulable = true, soulable = true,
key_append = "sta" key_append = "sta"
} }
end, end,
} }
end end
for i = 1, 2 do for i = 1, 2 do
SMODS.Booster { SMODS.Booster {
key = "miniarcana" .. i, key = "miniarcana" .. i,
loc_txt = { loc_txt = {
name = "Mini Arcana Pack", name = "Mini Arcana Pack",
text = { text = {
"Choose {C:attention}#1#{} of up to", "Choose {C:attention}#1#{} of up to",
"{C:attention}#2# {C:tarot}Tarot{} cards to", "{C:attention}#2# {C:tarot}Tarot{} cards to",
"be used immediately", "be used immediately",
} }
}, },
atlas = "janebooster", atlas = "janebooster",
pos = {x = 3 + i, y = 1}, pos = {x = 3 + i, y = 1},
weight = 0.4, weight = 0.4,
cost = 2, cost = 2,
config = {extra = 2, choose = 1}, config = {extra = 2, choose = 1},
draw_hand = true, draw_hand = true,
loc_vars = function(_, _, card) loc_vars = function(_, _, card)
return {vars = {card.ability.choose, card.ability.extra}} return {vars = {card.ability.choose, card.ability.extra}}
end, end,
ease_background_colour = function(_) ease_background_colour = function(_)
ease_background_colour_blind(G.STATES.TAROT_PACK) ease_background_colour_blind(G.STATES.TAROT_PACK)
end, end,
create_UIBox = function(_) create_UIBox = function(_)
return create_UIBox_arcana_pack() return create_UIBox_arcana_pack()
end, end,
particles = function(_) particles = function(_)
G.booster_pack_sparkles = Particles(1, 1, 0,0, { G.booster_pack_sparkles = Particles(1, 1, 0,0, {
timer = 0.015, timer = 0.015,
@ -108,143 +108,143 @@ for i = 1, 2 do
create_card = function(_, _, _) create_card = function(_, _, _)
if G.GAME.used_vouchers.v_omen_globe and pseudorandom("omen_globe") > 0.8 then if G.GAME.used_vouchers.v_omen_globe and pseudorandom("omen_globe") > 0.8 then
return { return {
set = "Spectral", set = "Spectral",
soulable = true, soulable = true,
key_append = "ar2", key_append = "ar2",
area = G.pack_cards, area = G.pack_cards,
skip_materialize = true, skip_materialize = true,
} }
end end
return { return {
set = "Tarot", set = "Tarot",
soulable = true, soulable = true,
key_append = "ar1", key_append = "ar1",
area = G.pack_cards, area = G.pack_cards,
skip_materialize = true, skip_materialize = true,
} }
end end
} }
end end
for i = 1, 2 do for i = 1, 2 do
SMODS.Booster { SMODS.Booster {
key = "minicelestial" .. i, key = "minicelestial" .. i,
atlas = "janebooster", atlas = "janebooster",
loc_txt = { loc_txt = {
name = "Mini Celestial Pack", name = "Mini Celestial Pack",
text = { text = {
"Choose {C:attention}#1#{} of up to", "Choose {C:attention}#1#{} of up to",
"{C:attention}#2# {C:planet}Planet{} cards to", "{C:attention}#2# {C:planet}Planet{} cards to",
"be used immediately", "be used immediately",
} }
}, },
config = {extra = 2, choose = 1}, config = {extra = 2, choose = 1},
pos = {x = 3 + i, y = 0}, pos = {x = 3 + i, y = 0},
cost = 2, cost = 2,
weight = 0.4, weight = 0.4,
loc_vars = function(_, _, card) loc_vars = function(_, _, card)
return {vars = {card.ability.choose, card.ability.extra}} return {vars = {card.ability.choose, card.ability.extra}}
end, end,
ease_background_colour = function(_) ease_background_colour_blind(G.STATES.PLANET_PACK) end, ease_background_colour = function(_) ease_background_colour_blind(G.STATES.PLANET_PACK) end,
create_UIBox = function(_) return create_UIBox_celestial_pack() end, create_UIBox = function(_) return create_UIBox_celestial_pack() end,
set_ability = function (_, card, _, delay_sprites) set_ability = function (_, card, _, delay_sprites)
card.ability = card.ability or {} card.ability = card.ability or {}
card.ability.set = "Booster" card.ability.set = "Booster"
card.ability.name = "Mini Celestial Pack" card.ability.name = "Mini Celestial Pack"
end, end,
particles = function(_) particles = function(_)
G.booster_pack_stars = Particles(1, 1, 0,0, { G.booster_pack_stars = Particles(1, 1, 0,0, {
fill = true, fill = true,
scale = 0.1, scale = 0.1,
speed = 0.1, speed = 0.1,
timer = 0.07, timer = 0.07,
padding = -4, padding = -4,
lifespan = 15, lifespan = 15,
initialize = true, initialize = true,
attach = G.ROOM_ATTACH, attach = G.ROOM_ATTACH,
colours = {G.C.WHITE, HEX("a7d6e0"), HEX("fddca0")}, colours = {G.C.WHITE, HEX("a7d6e0"), HEX("fddca0")},
}) })
G.booster_pack_meteors = Particles(1, 1, 0,0, { G.booster_pack_meteors = Particles(1, 1, 0,0, {
speed = 4, speed = 4,
timer = 2, timer = 2,
fill = true, fill = true,
scale = 0.05, scale = 0.05,
lifespan = 1.5, lifespan = 1.5,
attach = G.ROOM_ATTACH, attach = G.ROOM_ATTACH,
colours = {G.C.WHITE}, colours = {G.C.WHITE},
}) })
end, end,
create_card = function(_, _, index) create_card = function(_, _, index)
if not G.GAME.used_vouchers.v_telescope or index ~= 1 then if not G.GAME.used_vouchers.v_telescope or index ~= 1 then
return { return {
set = "Planet", set = "Planet",
area = G.pack_cards, area = G.pack_cards,
skip_materialize = true, skip_materialize = true,
soulable = true, soulable = true,
key_append = "pl1" key_append = "pl1"
} }
end end
local planet, hand, tally = nil, nil, 0 local planet, hand, tally = nil, nil, 0
for _, v in ipairs(G.handlist) do for _, v in ipairs(G.handlist) do
if G.GAME.hands[v].visible and G.GAME.hands[v].played > tally then if G.GAME.hands[v].visible and G.GAME.hands[v].played > tally then
hand = v hand = v
tally = G.GAME.hands[v].played tally = G.GAME.hands[v].played
end end
end end
if hand then if hand then
for _, v in pairs(G.P_CENTER_POOLS.Planet) do for _, v in pairs(G.P_CENTER_POOLS.Planet) do
if v.config.hand_type == hand then if v.config.hand_type == hand then
planet = v.key planet = v.key
end end
end end
end end
return { return {
key = planet, key = planet,
set = "Planet", set = "Planet",
soulable = true, soulable = true,
key_append = "pl1", key_append = "pl1",
area = G.pack_cards, area = G.pack_cards,
skip_materialize = true, skip_materialize = true,
} }
end end
} }
end end
for i = 1, 2 do for i = 1, 2 do
SMODS.Booster { SMODS.Booster {
key = "minispectral" .. i, key = "minispectral" .. i,
atlas = "janebooster", atlas = "janebooster",
loc_txt = { loc_txt = {
name = "Mini Spectral Pack", name = "Mini Spectral Pack",
text = { text = {
"Choose {C:attention}#1#{} of up to", "Choose {C:attention}#1#{} of up to",
"{C:attention}#2# {C:spectral}Spectral{} cards to", "{C:attention}#2# {C:spectral}Spectral{} cards to",
"be used immediately", "be used immediately",
} }
}, },
config = {extra = 1, choose = 1}, config = {extra = 1, choose = 1},
pos = {x = 3 + i, y = 2}, pos = {x = 3 + i, y = 2},
cost = 2, cost = 2,
weight = 0.225, weight = 0.225,
draw_hand = true, draw_hand = true,
loc_vars = function(_, _, card) loc_vars = function(_, _, card)
return {vars = {card.ability.choose, card.ability.extra}} return {vars = {card.ability.choose, card.ability.extra}}
end, end,
ease_background_colour = function(_) ease_background_colour = function(_)
ease_background_colour_blind(G.STATES.SPECTRAL_PACK) ease_background_colour_blind(G.STATES.SPECTRAL_PACK)
end, end,
create_UIBox = function(_) create_UIBox = function(_)
return create_UIBox_spectral_pack() return create_UIBox_spectral_pack()
end, end,
particles = function(_) particles = function(_)
G.booster_pack_sparkles = Particles(1, 1, 0,0, { G.booster_pack_sparkles = Particles(1, 1, 0,0, {
scale = 0.1, scale = 0.1,
fill = true, fill = true,
speed = 0.2, speed = 0.2,
lifespan = 3, lifespan = 3,
@ -260,12 +260,12 @@ for i = 1, 2 do
end, end,
create_card = function(_, _, _) create_card = function(_, _, _)
return { return {
soulable = true, soulable = true,
set = "Spectral", set = "Spectral",
key_append = "spe", key_append = "spe",
area = G.pack_cards, area = G.pack_cards,
skip_materialize = true, skip_materialize = true,
} }
end, end,
} }
end end

View file

@ -3,22 +3,22 @@ SMODS.Shader({key = "polygloss", path = "polygloss.fs"})
SMODS.Sound({key = "e_polygloss", path = "e_polygloss.ogg"}) SMODS.Sound({key = "e_polygloss", path = "e_polygloss.ogg"})
local function resize(card, mod, force_save) local function resize(card, mod, force_save)
if force_save or not card.origsize then if force_save or not card.origsize then
card.origsize = {w = card.T.w, h = card.T.h} card.origsize = {w = card.T.w, h = card.T.h}
end end
card:hard_set_T(card.T.x, card.T.y, card.T.w * mod, card.T.h * mod) card:hard_set_T(card.T.x, card.T.y, card.T.w * mod, card.T.h * mod)
remove_all(card.children) remove_all(card.children)
card.children = {} card.children = {}
card.children.shadow = Moveable(0, 0, 0, 0) card.children.shadow = Moveable(0, 0, 0, 0)
card:set_sprites(card.config.center, card.base.id and card.config.card) card:set_sprites(card.config.center, card.base.id and card.config.card)
if card.area and if card.area and
((G.shop_jokers and card.area == G.shop_jokers) or ((G.shop_jokers and card.area == G.shop_jokers) or
(G.shop_booster and card.area == G.shop_booster) or (G.shop_booster and card.area == G.shop_booster) or
(G.shop_vouchers and card.area == G.shop_vouchers)) then (G.shop_vouchers and card.area == G.shop_vouchers)) then
create_shop_card_ui(card) create_shop_card_ui(card)
end end
end end
SMODS.Edition({ SMODS.Edition({
@ -29,15 +29,15 @@ SMODS.Edition({
text = { text = {
"{C:chips}+#1#{}, {X:chips,C:white}x#2#{} & {X:chips,C:dark_edition}^#3#{} Chips", "{C:chips}+#1#{}, {X:chips,C:white}x#2#{} & {X:chips,C:dark_edition}^#3#{} Chips",
"{C:mult}+#4#{}, {X:mult,C:white}x#5#{} & {X:mult,C:dark_edition}^#6#{} Mult", "{C:mult}+#4#{}, {X:mult,C:white}x#5#{} & {X:mult,C:dark_edition}^#6#{} Mult",
"Generates {C:money}+$#7#", "Generates {C:money}+$#7#",
} }
}, },
config = {chips = 1, mult = 1, x_chips = 1.1, x_mult = 1.1, e_chips = 1.01, e_mult = 1.01, p_dollars = 1}, config = {chips = 1, mult = 1, x_chips = 1.1, x_mult = 1.1, e_chips = 1.01, e_mult = 1.01, p_dollars = 1},
sound = { sound = {
sound = "jane_e_polygloss", sound = "jane_e_polygloss",
per = 1.2, per = 1.2,
vol = 0.4 vol = 0.4
}, },
weight = 8, weight = 8,
extra_cost = 2, extra_cost = 2,
in_shop = true, in_shop = true,
@ -45,16 +45,16 @@ SMODS.Edition({
apply_to_float = false, apply_to_float = false,
loc_vars = function(self) loc_vars = function(self)
return {vars = { return {vars = {
self.config.chips, self.config.chips,
self.config.x_chips, self.config.x_chips,
self.config.e_chips, self.config.e_chips,
self.config.mult, self.config.mult,
self.config.x_mult, self.config.x_mult,
self.config.e_mult, self.config.e_mult,
self.config.p_dollars self.config.p_dollars
}} }}
end, end,
calculate = function(_, card, context) calculate = function(_, card, context)
if context.pre_joker then if context.pre_joker then
return { return {
chips = card.edition.chips, chips = card.edition.chips,
@ -77,77 +77,77 @@ SMODS.Edition({
local jumbo_modifier = Cryptid and 100 or 2 local jumbo_modifier = Cryptid and 100 or 2
SMODS.Edition({ SMODS.Edition({
key = "jumbo", key = "jumbo",
loc_txt = { loc_txt = {
name = "Jumbo", name = "Jumbo",
label = "Jumbo", label = "Jumbo",
text = { text = {
"All card values are", "All card values are",
"{C:attention}multiplied{} by {C:attention}up to " .. jumbo_modifier, "{C:attention}multiplied{} by {C:attention}up to " .. jumbo_modifier,
"{C:inactive}(If possible)", "{C:inactive}(If possible)",
"{C:inactive,E:1,s:0.7}Whoa, it's huge!!{}" "{C:inactive,E:1,s:0.7}Whoa, it's huge!!{}"
} }
}, },
on_apply = function(card) on_apply = function(card)
G.E_MANAGER:add_event(Event({ G.E_MANAGER:add_event(Event({
blocking = false, blocking = false,
blockable = false, blockable = false,
func = function() func = function()
resize(card, Jane.config.wee_sizemod) resize(card, Jane.config.wee_sizemod)
return true return true
end end
})) }))
local obj = card:gc() local obj = card:gc()
if obj.set == "Booster" or obj.jumbo_mod then if obj.set == "Booster" or obj.jumbo_mod then
jumbo_modifier = obj.jumbo_mod or 10 jumbo_modifier = obj.jumbo_mod or 10
end end
if card.added_to_deck then if card.added_to_deck then
card:remove_from_deck() card:remove_from_deck()
end end
Jane.misprintize(card, {min = jumbo_modifier, max = jumbo_modifier}, nil, true) Jane.misprintize(card, {min = jumbo_modifier, max = jumbo_modifier}, nil, true)
if card.added_to_deck then if card.added_to_deck then
card:add_to_deck() card:add_to_deck()
end end
end, end,
on_remove = function(card) on_remove = function(card)
G.E_MANAGER:add_event(Event({ G.E_MANAGER:add_event(Event({
blocking = false, blocking = false,
blockable = false, blockable = false,
func = function() func = function()
resize(card, 1 / Jane.config.wee_sizemod) resize(card, 1 / Jane.config.wee_sizemod)
return true return true
end end
})) }))
local was_added = card.added_to_deck local was_added = card.added_to_deck
if was_added then if was_added then
card:remove_from_deck() card:remove_from_deck()
end end
Jane.misprintize(card, {min = 1 / jumbo_modifier, max = 1 / jumbo_modifier}, nil, true) Jane.misprintize(card, {min = 1 / jumbo_modifier, max = 1 / jumbo_modifier}, nil, true)
if was_added then if was_added then
card:add_to_deck() card:add_to_deck()
end end
end, end,
config = {twos_scored = 0}, config = {twos_scored = 0},
sound = { sound = {
sound = "jane_e_jumbo", sound = "jane_e_jumbo",
per = 1, per = 1,
vol = 0.5 vol = 0.5
}, },
weight = 0.8, weight = 0.8,
in_shop = true, in_shop = true,
shader = false, shader = false,
extra_cost = 12, extra_cost = 12,
apply_to_float = false, apply_to_float = false,
get_weight = function(self) get_weight = function(self)
return G.GAME.edition_rate * self.weight return G.GAME.edition_rate * self.weight
end, end,
}) })

View file

@ -1,48 +1,48 @@
for _, v in pairs({"7granddad", "betmma", "oxy", "peppino"}) do for _, v in pairs({"7granddad", "betmma", "oxy", "peppino"}) do
SMODS.Atlas { SMODS.Atlas {
px = 71, px = 71,
py = 95, py = 95,
key = "jane" .. v, key = "jane" .. v,
path = Jane.config.texture_pack .. "/j_jane_" .. v .. ".png", path = Jane.config.texture_pack .. "/j_jane_" .. v .. ".png",
} }
end end
for i = 1, 6 do for i = 1, 6 do
SMODS.Sound({key = 'grand' .. i, path = 'grand_dad' .. i .. '.ogg'}) SMODS.Sound({key = 'grand' .. i, path = 'grand_dad' .. i .. '.ogg'})
end end
local exotic = Cryptid and "cry_exotic" or 4 local exotic = Cryptid and "cry_exotic" or 4
local food = { local food = {
"j_gros_michel", "j_gros_michel",
"j_egg", "j_egg",
"j_ice_cream", "j_ice_cream",
"j_cavendish", "j_cavendish",
"j_turtle_bean", "j_turtle_bean",
"j_diet_cola", "j_diet_cola",
"j_popcorn", "j_popcorn",
"j_ramen", "j_ramen",
"j_selzer", "j_selzer",
"j_cry_pickle", "j_cry_pickle",
"j_cry_chili_pepper", "j_cry_chili_pepper",
"j_cry_oldcandy", "j_cry_oldcandy",
"j_cry_caramel", "j_cry_caramel",
"j_cry_foodm", "j_cry_foodm",
"j_cry_cotton_candy", "j_cry_cotton_candy",
"j_cry_wrapped", "j_cry_wrapped",
"j_cry_candy_cane", "j_cry_candy_cane",
"j_cry_candy_buttons", "j_cry_candy_buttons",
"j_cry_jawbreaker", "j_cry_jawbreaker",
"j_cry_mellowcreme", "j_cry_mellowcreme",
"j_cry_brittle", "j_cry_brittle",
"j_jane_peppino", "j_jane_peppino",
} }
local granddad_palette = { local granddad_palette = {
HEX("155fd9"), HEX("155fd9"),
HEX("ff8170"), HEX("ff8170"),
HEX("ffffff"), HEX("ffffff"),
HEX("6c0700") HEX("6c0700")
} }
local function food_jokers_count() local function food_jokers_count()
@ -50,231 +50,231 @@ local function food_jokers_count()
return 0 return 0
end end
local amount = 0 local amount = 0
for _, v in pairs(food) do for _, v in pairs(food) do
amount = amount + #SMODS.find_card(v) amount = amount + #SMODS.find_card(v)
end end
return amount return amount
end end
local function grand_dad(card) local function grand_dad(card)
Jane.q(function() Jane.q(function()
card:juice_up(0.5, 0.5) card:juice_up(0.5, 0.5)
return true return true
end) end)
local rnd = math.random(6) local rnd = math.random(6)
local obj = card.edition or {} local obj = card.edition or {}
Jane.play_sound( Jane.play_sound(
"jane_grand" .. rnd, "jane_grand" .. rnd,
obj.jane_jumbo and (1 / Jane.config.wee_sizemod) or 1, obj.jane_jumbo and (1 / Jane.config.wee_sizemod) or 1,
0.5 0.5
) )
Jane.card_status_text( Jane.card_status_text(
card, card,
rnd == 2 and "Flintstones?!" or rnd == 6 and "Gruhh- Dad!" or "Grand Dad!", rnd == 2 and "Flintstones?!" or rnd == 6 and "Gruhh- Dad!" or "Grand Dad!",
nil, nil,
0.05 * card.T.h, 0.05 * card.T.h,
granddad_palette[math.random(#granddad_palette)], granddad_palette[math.random(#granddad_palette)],
0.6, 0.6,
0.6, 0.6,
nil, nil,
nil, nil,
"bm" "bm"
) )
end end
local function voucher_count() local function voucher_count()
if not G.GAME.used_vouchers then if not G.GAME.used_vouchers then
return 0 return 0
end end
local count = 0 local count = 0
for _, v in pairs(G.GAME.used_vouchers) do for _, v in pairs(G.GAME.used_vouchers) do
if v then if v then
count = count + 1 count = count + 1
end end
end end
return count return count
end end
SMODS.Joker { SMODS.Joker {
key = "oxy", key = "oxy",
atlas = "janeoxy", atlas = "janeoxy",
loc_txt = { loc_txt = {
name = "Oxy", name = "Oxy",
text = { text = {
"{C:attention}Scored steel{} cards give", "{C:attention}Scored steel{} cards give",
"{X:mult,C:white}x#1#{} {C:mult}Mult {}& {X:chips,C:white}x#1#{} {C:chips}Chips", "{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:inactive,s:0.75,E:1}#2#{C:red,s:1.5,E:1}#3#",
} }
}, },
pos = {x = 0, y = 0}, pos = {x = 0, y = 0},
config = {steel = 1.5}, config = {steel = 1.5},
sinis = {x = 2, y = 0}, sinis = {x = 2, y = 0},
soul_pos = {x = 1, y = 0}, soul_pos = {x = 1, y = 0},
cost = 10, cost = 10,
blueprint_compat = true, blueprint_compat = true,
rarity = Cryptid and 3 or 4, rarity = Cryptid and 3 or 4,
loc_vars = function(_, _, center) loc_vars = function(_, _, center)
return {vars = { return {vars = {
center.ability.steel, center.ability.steel,
Jane.sinister and "" or "We all cut close...", Jane.sinister and "" or "We all cut close...",
Jane.sinister and "WHAT ARE YOU DOING DOWN THERE?!?" or "", Jane.sinister and "WHAT ARE YOU DOING DOWN THERE?!?" or "",
}} }}
end, end,
calculate = function(_, card, context) calculate = function(_, card, context)
if context.individual and if context.individual and
context.cardarea == G.play and context.cardarea == G.play and
context.other_card.ability.name == "Steel Card" then context.other_card.ability.name == "Steel Card" then
return { return {
x_chips = card.ability.steel, x_chips = card.ability.steel,
x_mult = card.ability.steel, x_mult = card.ability.steel,
colour = G.C.PURPLE, colour = G.C.PURPLE,
card = card card = card
}, true }, true
end end
end end
} }
SMODS.Joker { SMODS.Joker {
key = "7granddad", key = "7granddad",
loc_txt = { loc_txt = {
name = "7 GRAND DAD", name = "7 GRAND DAD",
text = { text = {
"This Joker has a {C:jane_RGB,E:1}strange", "This Joker has a {C:jane_RGB,E:1}strange",
"{C:jane_RGB,E:1}reaction {}to scored {C:attention}7{}s", "{C:jane_RGB,E:1}reaction {}to scored {C:attention}7{}s",
} }
}, },
config = {}, config = {},
pos = {x = 0, y = 0}, pos = {x = 0, y = 0},
soul_pos = {x = 1, y = 0}, soul_pos = {x = 1, y = 0},
cost = 12, cost = 12,
atlas = "jane7granddad", atlas = "jane7granddad",
blueprint_compat = true, blueprint_compat = true,
rarity = Cryptid and exotic or 3, rarity = Cryptid and exotic or 3,
loc_vars = function(_, _, center) loc_vars = function(_, _, center)
return {vars = {center.ability.shopslots}} return {vars = {center.ability.shopslots}}
end, end,
add_to_deck = function(_, card, _) add_to_deck = function(_, card, _)
grand_dad(card) grand_dad(card)
end, end,
remove_from_deck = function(_, card, _) remove_from_deck = function(_, card, _)
grand_dad(card) grand_dad(card)
end, end,
calculate = function(_, card, context) calculate = function(_, card, context)
if context.cardarea == G.play then if context.cardarea == G.play then
local function scj(c) local function scj(c)
return c.cardarea and c.cardarea == G.play and not c.before and not c.after and not c.repetition return c.cardarea and c.cardarea == G.play and not c.before and not c.after and not c.repetition
end end
if context.other_card and context.other_card:get_id() == 7 and scj(context) then if context.other_card and context.other_card:get_id() == 7 and scj(context) then
grand_dad(card) grand_dad(card)
local palette = granddad_palette[math.random(#granddad_palette)] local palette = granddad_palette[math.random(#granddad_palette)]
local rnd = pseudorandom(pseudoseed("granddad"), 1, Cryptid and 7 or 5) local rnd = pseudorandom(pseudoseed("granddad"), 1, Cryptid and 7 or 5)
if rnd == 1 then if rnd == 1 then
return { return {
message = "+777", message = "+777",
chips = 777, chips = 777,
colour = palette, colour = palette,
card = card card = card
}, true }, true
elseif rnd == 2 then elseif rnd == 2 then
return { return {
message = "+777 Mult", message = "+777 Mult",
mult = 777, mult = 777,
colour = palette, colour = palette,
card = card card = card
}, true }, true
elseif rnd == 3 then elseif rnd == 3 then
return { return {
message = "+$7", message = "+$7",
dollars = 7, dollars = 7,
colour = palette, colour = palette,
card = card card = card
}, true }, true
elseif rnd == 4 then elseif rnd == 4 then
return { return {
message = "x7", message = "x7",
x_chips = 7, x_chips = 7,
colour = palette, colour = palette,
card = card card = card
}, true }, true
elseif rnd == 5 then elseif rnd == 5 then
return { return {
message = "x7 Mult", message = "x7 Mult",
x_mult = 7, x_mult = 7,
colour = palette, colour = palette,
card = card card = card
}, true }, true
elseif rnd == 6 then elseif rnd == 6 then
return { return {
message = "^1.77", message = "^1.77",
e_chips = 1.77, e_chips = 1.77,
colour = palette, colour = palette,
card = card card = card
}, true }, true
else else
return { return {
message = "^1.77 Mult", message = "^1.77 Mult",
e_mult = 1.77, e_mult = 1.77,
colour = palette, colour = palette,
card = card card = card
}, true }, true
end end
end end
end end
end end
} }
local operator = Cryptid and "^" or "*" local operator = Cryptid and "^" or "*"
SMODS.Joker { SMODS.Joker {
key = "betmma", key = "betmma",
atlas = "janebetmma", atlas = "janebetmma",
loc_txt = { loc_txt = {
name = "Betmma", name = "Betmma",
text = { text = {
"{X:dark_edition,C:chips}+" .. operator .. "#1#{C:chips} Chips{} for every", "{X:dark_edition,C:chips}+" .. operator .. "#1#{C:chips} Chips{} for every",
"{C:attention}unique Voucher redeemed", "{C:attention}unique Voucher redeemed",
"{C:inactive}(Currently {X:dark_edition,C:chips}" .. operator .. "#2#{C:inactive})", "{C:inactive}(Currently {X:dark_edition,C:chips}" .. operator .. "#2#{C:inactive})",
} }
}, },
config = {big_num_scaler = true, extra = {tet = 0.1}}, config = {big_num_scaler = true, extra = {tet = 0.1}},
pos = {x = 0, y = 0}, pos = {x = 0, y = 0},
soul_pos = {x = 1, y = 0}, soul_pos = {x = 1, y = 0},
cost = 50, cost = 50,
rarity = exotic, rarity = exotic,
blueprint_compat = true, blueprint_compat = true,
loc_vars = function(_, _, center) loc_vars = function(_, _, center)
return {vars = {center.ability.extra.tet, 1 + (voucher_count() * center.ability.extra.tet)}} return {vars = {center.ability.extra.tet, 1 + (voucher_count() * center.ability.extra.tet)}}
end, end,
calculate = function(_, card, context) calculate = function(_, card, context)
if not context.joker_main then if not context.joker_main then
return return
end end
local v = voucher_count() local v = voucher_count()
if v > 0 then if v > 0 then
local num = 1 + (v * card.ability.extra.tet) local num = 1 + (v * card.ability.extra.tet)
return { return {
card = card, card = card,
colour = G.C.jane_RGB, colour = G.C.jane_RGB,
message = operator .. number_format(num), message = operator .. number_format(num),
[Cryptid and "Echips_mod" or "xchips_mod"] = num, [Cryptid and "Echips_mod" or "xchips_mod"] = num,
}, true }, true
end end
end end
} }
SMODS.Joker { SMODS.Joker {
@ -285,7 +285,7 @@ SMODS.Joker {
text = { text = {
"{X:dark_edition,C:red}" .. operator .. "2^x{C:red} Mult{} for every", "{X:dark_edition,C:red}" .. operator .. "2^x{C:red} Mult{} for every",
"{C:attention}food or Peppino Joker", "{C:attention}food or Peppino Joker",
"in your possession", "in your possession",
"{C:inactive}(Currently {X:dark_edition,C:red}" .. operator .. "#1#{C:red} Mult{C:inactive})", "{C:inactive}(Currently {X:dark_edition,C:red}" .. operator .. "#1#{C:red} Mult{C:inactive})",
} }
}, },
@ -293,7 +293,7 @@ SMODS.Joker {
soul_pos = {x = 1, y = 0}, soul_pos = {x = 1, y = 0},
cost = 50, cost = 50,
rarity = exotic, rarity = exotic,
blueprint_compat = true, blueprint_compat = true,
loc_vars = function(_, _, _) loc_vars = function(_, _, _)
return {vars = {2 ^ food_jokers_count()}} return {vars = {2 ^ food_jokers_count()}}
end, end,
@ -302,7 +302,7 @@ SMODS.Joker {
if context.joker_main and count > 0 then if context.joker_main and count > 0 then
return { return {
colour = G.C.DARK_EDITION, colour = G.C.DARK_EDITION,
message = "^" .. 2 ^ count .. " Mult", message = "^" .. 2 ^ count .. " Mult",
[Cryptid and "Emult_mod" or "xmult_mod"] = 2 ^ count, [Cryptid and "Emult_mod" or "xmult_mod"] = 2 ^ count,
}, true }, true

View file

@ -1,9 +1,9 @@
Jane = { Jane = {
config = { config = {
wee_sizemod = 1.25, wee_sizemod = 1.25,
texture_pack = "default", texture_pack = "default",
bans = {"j_cry_crustulum", "c_cry_hammerspace"} bans = {"j_cry_crustulum", "c_cry_hammerspace"}
}, },
} }
Jane.misprintize = (Cryptid or {}).misprintize Jane.misprintize = (Cryptid or {}).misprintize
@ -11,129 +11,129 @@ Jane.misprintize_tbl = (Cryptid or {}).misprintize_tbl
Jane.misprinitze_val = (Cryptid or {}).misprintize_val Jane.misprinitze_val = (Cryptid or {}).misprintize_val
if not Jane.misprintize then if not Jane.misprintize then
assert(SMODS.load_file("src/misprintize.lua"))() assert(SMODS.load_file("src/misprintize.lua"))()
end end
function Jane.canuse() function Jane.canuse()
return not (((G.play and #G.play.cards > 0) or return not (((G.play and #G.play.cards > 0) or
(G.CONTROLLER.locked) or (G.CONTROLLER.locked) or
(G.GAME.STOP_USE and G.GAME.STOP_USE > 0)) and (G.GAME.STOP_USE and G.GAME.STOP_USE > 0)) and
G.STATE ~= G.STATES.HAND_PLAYED and G.STATE ~= G.STATES.HAND_PLAYED and
G.STATE ~= G.STATES.DRAW_TO_HAND and G.STATE ~= G.STATES.DRAW_TO_HAND and
G.STATE ~= G.STATES.PLAY_TAROT) G.STATE ~= G.STATES.PLAY_TAROT)
end end
function Jane.card_status_text( function Jane.card_status_text(
card, card,
text, text,
xoffset, xoffset,
yoffset, yoffset,
colour, colour,
size, size,
delay, delay,
juice, juice,
jiggle, jiggle,
align, align,
sound, sound,
volume, volume,
pitch, pitch,
trig, trig,
f f
) )
if (delay or 0) <= 0 then if (delay or 0) <= 0 then
if type(f) == "function" then if type(f) == "function" then
f(card) f(card)
end end
attention_text({ attention_text({
text = text, text = text,
scale = size or 1, scale = size or 1,
hold = 0.7, hold = 0.7,
backdrop_colour = colour or (G.C.FILTER), backdrop_colour = colour or (G.C.FILTER),
align = align or "bm", align = align or "bm",
major = card, major = card,
offset = {x = xoffset or 0, y = yoffset or (-0.05*G.CARD_H)} offset = {x = xoffset or 0, y = yoffset or (-0.05*G.CARD_H)}
}) })
if sound then if sound then
play_sound(sound, pitch or (0.9 + (0.2 * math.random())), volume or 1) play_sound(sound, pitch or (0.9 + (0.2 * math.random())), volume or 1)
end end
if juice then if juice then
if type(juice) == "table" then if type(juice) == "table" then
card:juice_up(juice[1], juice[2]) card:juice_up(juice[1], juice[2])
elseif type(juice) == "number" and juice ~= 0 then elseif type(juice) == "number" and juice ~= 0 then
card:juice_up(juice, juice / 6) card:juice_up(juice, juice / 6)
end end
end end
if jiggle then if jiggle then
G.ROOM.jiggle = G.ROOM.jiggle + jiggle G.ROOM.jiggle = G.ROOM.jiggle + jiggle
end end
else else
G.E_MANAGER:add_event(Event({ G.E_MANAGER:add_event(Event({
trigger = trig, trigger = trig,
delay = delay, delay = delay,
func = function() func = function()
if f and type(f) == "function" then if f and type(f) == "function" then
f(card) f(card)
end end
attention_text({ attention_text({
text = text, text = text,
scale = size or 1, scale = size or 1,
hold = 0.7 + (delay or 0), hold = 0.7 + (delay or 0),
backdrop_colour = colour or (G.C.FILTER), backdrop_colour = colour or (G.C.FILTER),
align = align or "bm", align = align or "bm",
major = card, major = card,
offset = {x = xoffset or 0, y = yoffset or (-0.05*G.CARD_H)} offset = {x = xoffset or 0, y = yoffset or (-0.05*G.CARD_H)}
}) })
if sound then if sound then
play_sound(sound, pitch or (0.9 + (0.2*math.random())), volume or 1) play_sound(sound, pitch or (0.9 + (0.2*math.random())), volume or 1)
end end
if juice then if juice then
if type(juice) == "table" then if type(juice) == "table" then
card:juice_up(juice[1], juice[2]) card:juice_up(juice[1], juice[2])
elseif type(juice) == "number" and juice ~= 0 then elseif type(juice) == "number" and juice ~= 0 then
card:juice_up(juice, juice / 6) card:juice_up(juice, juice / 6)
end end
end end
if jiggle then if jiggle then
G.ROOM.jiggle = G.ROOM.jiggle + jiggle G.ROOM.jiggle = G.ROOM.jiggle + jiggle
end end
return true return true
end end
})) }))
end end
end end
function Jane.empowered() function Jane.empowered()
if Cryptid then if Cryptid then
add_tag(Tag("tag_cry_empowered")) add_tag(Tag("tag_cry_empowered"))
return true return true
end end
local card = create_card("Spectral", G.consumeables, nil, nil, nil, nil, "c_soul", "acceleration_soul") local card = create_card("Spectral", G.consumeables, nil, nil, nil, nil, "c_soul", "acceleration_soul")
card:set_edition({negative = true}) card:set_edition({negative = true})
card:add_to_deck() card:add_to_deck()
G.consumeables:emplace(card) G.consumeables:emplace(card)
end end
function Jane.get_chipmult_sum(chips, mult) function Jane.get_chipmult_sum(chips, mult)
chips = chips or 0 chips = chips or 0
mult = mult or 0 mult = mult or 0
local op, big = Jane.get_operator(), Talisman.config_file.break_infinity == "omeganum" and local op, big = Jane.get_operator(), Talisman.config_file.break_infinity == "omeganum" and
to_big or function (x) return x end to_big or function (x) return x end
if op >= 3 then if op >= 3 then
return big(chips) ^ big(mult) return big(chips) ^ big(mult)
elseif op == 2 then elseif op == 2 then
return big(chips) * big(mult) return big(chips) * big(mult)
end end
return big(chips) + big(mult) return big(chips) + big(mult)
@ -149,140 +149,140 @@ function Jane.get_operator()
end end
function Jane.hidden(card) function Jane.hidden(card)
return G.GAME and not return G.GAME and not
G.GAME.obsidian and G.GAME.obsidian and
type(card) == 'table' and type(card) == 'table' and
(card.name == "Black Hole" or card.name == "The Soul" or card.hidden) (card.name == "Black Hole" or card.name == "The Soul" or card.hidden)
end end
function Jane.play_sound(sound, per, vol) function Jane.play_sound(sound, per, vol)
G.E_MANAGER:add_event(Event({ G.E_MANAGER:add_event(Event({
func = function() func = function()
play_sound(sound,per,vol) play_sound(sound,per,vol)
return true return true
end end
})) }))
end end
function Jane.q(fc, de, t, tr, bl, ba) function Jane.q(fc, de, t, tr, bl, ba)
G.E_MANAGER:add_event(Event({ G.E_MANAGER:add_event(Event({
timer = t, timer = t,
trigger = tr, trigger = tr,
delay = de, delay = de,
blockable = bl, blockable = bl,
blocking = ba, blocking = ba,
func = fc func = fc
})) }))
end end
function Card:gc() function Card:gc()
return (self.config or {}).center or {} return (self.config or {}).center or {}
end end
function Card:norank() function Card:norank()
return self.ability.name == "Stone Card" or self.config.center.no_rank return self.ability.name == "Stone Card" or self.config.center.no_rank
end end
function Card:nosuit() function Card:nosuit()
return self.ability.name == "Stone Card" or self.config.center.no_suit return self.ability.name == "Stone Card" or self.config.center.no_suit
end end
local orig_debuff = Card.set_debuff local orig_debuff = Card.set_debuff
function Card:set_debuff(should_debuff) function Card:set_debuff(should_debuff)
if should_debuff and ((self.config or {}).center or {}).debuff_immune then if should_debuff and ((self.config or {}).center or {}).debuff_immune then
Jane.card_status_text(self, "Immune", nil, 0.05 * self.T.h, G.C.RED, nil, 0.6, nil, nil, "bm", "cancel", 1, 0.9) Jane.card_status_text(self, "Immune", nil, 0.05 * self.T.h, G.C.RED, nil, 0.6, nil, nil, "bm", "cancel", 1, 0.9)
return false return false
else else
orig_debuff(self, should_debuff) orig_debuff(self, should_debuff)
end end
end end
local orig_menu = Game.main_menu local orig_menu = Game.main_menu
function Game:main_menu(change_context) function Game:main_menu(change_context)
Jane.sinister = nil Jane.sinister = nil
orig_menu(self, change_context) orig_menu(self, change_context)
end end
local orig_update = Game.update local orig_update = Game.update
function Game:update(dt) function Game:update(dt)
local function delete_hardbans() local function delete_hardbans()
if not Jane.config.disable_bans then if not Jane.config.disable_bans then
for _, v in pairs(Jane.config.bans) do for _, v in pairs(Jane.config.bans) do
local e = SMODS.Center:get_obj(v) local e = SMODS.Center:get_obj(v)
if e then if e then
e:delete() e:delete()
end end
end end
end end
end end
local function hand(name, chip, mul, lv, notif, snd, vol, pit, de) local function hand(name, chip, mul, lv, notif, snd, vol, pit, de)
local config = { local config = {
delay = de or 0.3, delay = de or 0.3,
pitch = pit or 0.8, pitch = pit or 0.8,
volume = vol or 0.7, volume = vol or 0.7,
sound = type(snd) == "string" and snd or type(snd) == "nil" and "button", sound = type(snd) == "string" and snd or type(snd) == "nil" and "button",
} }
local vals = { local vals = {
level = lv or "?", level = lv or "?",
mult = mul or "?", mult = mul or "?",
StatusText = notif, StatusText = notif,
chips = chip or "?", chips = chip or "?",
handname = name or "????", handname = name or "????",
} }
update_hand_text(config, vals) update_hand_text(config, vals)
end end
local function rebalance_orrery() local function rebalance_orrery()
local function small(x) local function small(x)
return type(x) == "table" and x:to_number() or x return type(x) == "table" and x:to_number() or x
end end
local orrery = (G.GAME or {}).orrery local orrery = (G.GAME or {}).orrery
if not orrery then if not orrery then
return return
end end
local count = 0 local count = 0
local hands = {} local hands = {}
local pools = {chips = 0, level = 0, mult = 0} local pools = {chips = 0, level = 0, mult = 0}
for k, v in pairs(G.GAME.hands) do for k, v in pairs(G.GAME.hands) do
if k ~= "cry_WholeDeck" then if k ~= "cry_WholeDeck" then
count = count + 1 count = count + 1
hands[#hands + 1] = v hands[#hands + 1] = v
pools.mult = v.mult + pools.mult pools.mult = v.mult + pools.mult
pools.chips = v.chips + pools.chips pools.chips = v.chips + pools.chips
pools.level = v.level + pools.level pools.level = v.level + pools.level
end end
end end
if pools.mult == orrery.mult and pools.chips == orrery.chips and pools.level == orrery.level then if pools.mult == orrery.mult and pools.chips == orrery.chips and pools.level == orrery.level then
return return
end end
table.sort(hands, function (x, y) return x.order > y.order end) table.sort(hands, function (x, y) return x.order > y.order end)
for i, v in ipairs(hands) do for i, v in ipairs(hands) do
v.mult = math.floor(pools.mult / count) + (small(pools.mult % count) >= i and 1 or 0) v.mult = math.floor(pools.mult / count) + (small(pools.mult % count) >= i and 1 or 0)
v.chips = math.floor(pools.chips / count) + (small(pools.chips % count) >= i and 1 or 0) v.chips = math.floor(pools.chips / count) + (small(pools.chips % count) >= i and 1 or 0)
v.level = math.floor(pools.level / count) + (small(pools.level % count) >= i and 1 or 0) v.level = math.floor(pools.level / count) + (small(pools.level % count) >= i and 1 or 0)
end end
orrery.mult = pools.mult orrery.mult = pools.mult
orrery.chips = pools.chips orrery.chips = pools.chips
orrery.level = pools.level orrery.level = pools.level
hand(localize("k_all_hands"), math.floor(pools.chips / count), math.floor(pools.mult / count), math.floor(pools.level / count)) hand(localize("k_all_hands"), math.floor(pools.chips / count), math.floor(pools.mult / count), math.floor(pools.level / count))
delay(1) delay(1)
update_hand_text({sound = "button", volume = 0.7, pitch = 1.1, delay = 0}, {mult = 0, chips = 0, handname = "", level = ""}) update_hand_text({sound = "button", volume = 0.7, pitch = 1.1, delay = 0}, {mult = 0, chips = 0, handname = "", level = ""})
end end
local function hsv(h, s, v) local function hsv(h, s, v)
if s <= 0 then return v, v, v end if s <= 0 then return v, v, v end
@ -308,29 +308,29 @@ function Game:update(dt)
return r + m, g + m, b + m return r + m, g + m, b + m
end end
orig_update(self, dt) orig_update(self, dt)
if not Jane.bans_done then if not Jane.bans_done then
delete_hardbans() delete_hardbans()
Jane.bans_done = true Jane.bans_done = true
end end
if (G.GAME or {}).banned_keys then if (G.GAME or {}).banned_keys then
for _, v in pairs(Jane.config.bans) do for _, v in pairs(Jane.config.bans) do
G.GAME.banned_keys[v] = true G.GAME.banned_keys[v] = true
end end
end end
if G.ARGS.LOC_COLOURS then if G.ARGS.LOC_COLOURS then
local r, g, b = hsv(self.C.jane_RGB_HUE / 360, .5, 1) local r, g, b = hsv(self.C.jane_RGB_HUE / 360, .5, 1)
self.C.jane_RGB[1] = r self.C.jane_RGB[1] = r
self.C.jane_RGB[3] = g self.C.jane_RGB[3] = g
self.C.jane_RGB[2] = b self.C.jane_RGB[2] = b
self.C.jane_RGB_HUE = (self.C.jane_RGB_HUE + 0.5) % 360 self.C.jane_RGB_HUE = (self.C.jane_RGB_HUE + 0.5) % 360
G.ARGS.LOC_COLOURS.jane_RGB = self.C.jane_RGB G.ARGS.LOC_COLOURS.jane_RGB = self.C.jane_RGB
end end
rebalance_orrery() rebalance_orrery()
end end
local orig_card = SMODS.find_card local orig_card = SMODS.find_card
@ -340,34 +340,34 @@ local orig_card = SMODS.find_card
---@return Card[]|table[] ---@return Card[]|table[]
--- Returns all cards matching provided `key`. --- Returns all cards matching provided `key`.
function SMODS.find_card(key, count_debuffed) function SMODS.find_card(key, count_debuffed)
return orig_card(key == "j_jen_saint" and "j_jane_saint" or key, count_debuffed) return orig_card(key == "j_jen_saint" and "j_jane_saint" or key, count_debuffed)
end end
SMODS.Atlas { SMODS.Atlas {
px = 34, px = 34,
py = 34, py = 34,
key = "modicon", key = "modicon",
path = "almanac_avatar.png", path = "almanac_avatar.png",
} }
SMODS.Atlas { SMODS.Atlas {
px = 71, px = 71,
py = 95, py = 95,
key = "janeacc", key = "janeacc",
path = Jane.config.texture_pack .. "/c_jane_acc.png", path = Jane.config.texture_pack .. "/c_jane_acc.png",
} }
for _, v in ipairs({ for _, v in ipairs({
"back", "back",
"blind", "blind",
"booster", "booster",
"edition", "edition",
"joker", "joker",
"slugcat", "slugcat",
"spectral", "spectral",
"tarot", "tarot",
"token", "token",
"voucher", "voucher",
}) do }) do
assert(SMODS.load_file("src/" .. v .. ".lua"))() assert(SMODS.load_file("src/" .. v .. ".lua"))()
end end

View file

@ -91,8 +91,8 @@ local function deep_copy(obj, seen)
end end
local function format(number, str) local function format(number, str)
return math.abs(to_big(number)) >= to_big(1e300) and number return math.abs(to_big(number)) >= to_big(1e300) and number
or tonumber(str:format((Big and to_number(to_big(number)) or number))) or tonumber(str:format((Big and to_number(to_big(number)) or number)))
end end
local function is_card_big(joker) local function is_card_big(joker)
@ -106,16 +106,16 @@ local function is_card_big(joker)
end end
local function log_random(seed, min, max) local function log_random(seed, min, max)
math.randomseed(seed) math.randomseed(seed)
local lmin = math.log(min, 2.718281828459045) local lmin = math.log(min, 2.718281828459045)
local lmax = math.log(max, 2.718281828459045) local lmax = math.log(max, 2.718281828459045)
local poll = math.random() * (lmax - lmin) + lmin local poll = math.random() * (lmax - lmin) + lmin
return math.exp(poll) return math.exp(poll)
end end
function Jane.misprintize_val(val, override, big) function Jane.misprintize_val(val, override, big)
return is_number(val) and check( return is_number(val) and check(
format( format(
val * log_random( val * log_random(
pseudoseed("cry_misprint" .. G.GAME.round_resets.ante), pseudoseed("cry_misprint" .. G.GAME.round_resets.ante),
@ -129,12 +129,12 @@ function Jane.misprintize_val(val, override, big)
end end
function Jane.misprintize_tbl(name, ref_tbl, ref_value, clear, override, stack, big) function Jane.misprintize_tbl(name, ref_tbl, ref_value, clear, override, stack, big)
if name and ref_tbl and ref_value then if name and ref_tbl and ref_value then
local tbl = deep_copy(ref_tbl[ref_value]) local tbl = deep_copy(ref_tbl[ref_value])
for k, v in pairs(tbl) do for k, v in pairs(tbl) do
if (type(tbl[k]) ~= "table") or is_number(tbl[k]) then if (type(tbl[k]) ~= "table") or is_number(tbl[k]) then
if is_number(tbl[k]) and not if is_number(tbl[k]) and not
(k == "id") and not (k == "id") and not
(k == "colour") and not (k == "colour") and not
(k == "suit_nominal") and not (k == "suit_nominal") and not
@ -143,31 +143,31 @@ function Jane.misprintize_tbl(name, ref_tbl, ref_value, clear, override, stack,
(k == "qty") and not (k == "qty") and not
(k == "x_mult" and v == 1 and not tbl.override_x_mult_check) and not (k == "x_mult" and v == 1 and not tbl.override_x_mult_check) and not
(k == "selected_d6_face") then (k == "selected_d6_face") then
if not base_values[name] then if not base_values[name] then
base_values[name] = {} base_values[name] = {}
end end
if not base_values[name][k] then if not base_values[name][k] then
base_values[name][k] = tbl[k] base_values[name][k] = tbl[k]
end end
tbl[k] = check( tbl[k] = check(
clear and base_values[name][k] clear and base_values[name][k]
or format( or format(
(stack and tbl[k] or base_values[name][k]) (stack and tbl[k] or base_values[name][k])
* log_random( * log_random(
pseudoseed("cry_misprint" .. G.GAME.round_resets.ante), pseudoseed("cry_misprint" .. G.GAME.round_resets.ante),
override and override.min or G.GAME.modifiers.cry_misprint_min, override and override.min or G.GAME.modifiers.cry_misprint_min,
override and override.max or G.GAME.modifiers.cry_misprint_max override and override.max or G.GAME.modifiers.cry_misprint_max
), ),
"%.2g" "%.2g"
), ),
big big
) )
end end
else else
for _k, _ in pairs(tbl[k]) do for _k, _ in pairs(tbl[k]) do
if is_number(tbl[k][_k]) and not if is_number(tbl[k][_k]) and not
(_k == "id") and not (_k == "id") and not
(k == "perish_tally") and not (k == "perish_tally") and not
(k == "colour") and not (k == "colour") and not
@ -177,136 +177,136 @@ function Jane.misprintize_tbl(name, ref_tbl, ref_value, clear, override, stack,
(_k == "qty") and not (_k == "qty") and not
(k == "x_mult" and v == 1 and not tbl[k].override_x_mult_check) and not (k == "x_mult" and v == 1 and not tbl[k].override_x_mult_check) and not
(_k == "selected_d6_face") then (_k == "selected_d6_face") then
if not base_values[name] then if not base_values[name] then
base_values[name] = {} base_values[name] = {}
end end
if not base_values[name][k] then if not base_values[name][k] then
base_values[name][k] = {} base_values[name][k] = {}
end end
if not base_values[name][k][_k] then if not base_values[name][k][_k] then
base_values[name][k][_k] = tbl[k][_k] base_values[name][k][_k] = tbl[k][_k]
end end
tbl[k][_k] = check( tbl[k][_k] = check(
clear and base_values[name][k][_k] clear and base_values[name][k][_k]
or cry_format( or cry_format(
(stack and tbl[k][_k] or base_values[name][k][_k]) * (stack and tbl[k][_k] or base_values[name][k][_k]) *
log_random( log_random(
pseudoseed("cry_misprint" .. G.GAME.round_resets.ante), pseudoseed("cry_misprint" .. G.GAME.round_resets.ante),
override and override.min or G.GAME.modifiers.cry_misprint_min, override and override.min or G.GAME.modifiers.cry_misprint_min,
override and override.max or G.GAME.modifiers.cry_misprint_max override and override.max or G.GAME.modifiers.cry_misprint_max
), ),
"%.2g" "%.2g"
), ),
big big
) )
end end
end end
end end
end end
ref_tbl[ref_value] = tbl ref_tbl[ref_value] = tbl
end end
end end
function Jane.misprintize(card, override, force_reset, stack) function Jane.misprintize(card, override, force_reset, stack)
local function no(self, m, no_no) local function no(self, m, no_no)
if no_no then if no_no then
if self.infinifusion then if self.infinifusion then
for i = 1, #self.infinifusion do for i = 1, #self.infinifusion do
if G.P_CENTERS[self.infinifusion[i].key][m] or if G.P_CENTERS[self.infinifusion[i].key][m] or
(G.GAME and G.GAME[m] and G.GAME[m][self.infinifusion[i].key]) then (G.GAME and G.GAME[m] and G.GAME[m][self.infinifusion[i].key]) then
return true return true
end end
end end
return false return false
end end
if not self.config then if not self.config then
return G.P_CENTERS[self.key][m] or (G.GAME and G.GAME[m] and G.GAME[m][self.key]) return G.P_CENTERS[self.key][m] or (G.GAME and G.GAME[m] and G.GAME[m][self.key])
end end
return self.config.center[m] or (G.GAME and G.GAME[m] and G.GAME[m][self.config.center_key]) or false return self.config.center[m] or (G.GAME and G.GAME[m] and G.GAME[m][self.config.center_key]) or false
end end
return no(self, "no_" .. m, true) return no(self, "no_" .. m, true)
end end
if no(card, "immutable", true) then if no(card, "immutable", true) then
force_reset = true force_reset = true
end end
if card.infinifusion then if card.infinifusion then
if card.config.center == card.infinifusion_center or card.config.center.key == "j_infus_fused" then if card.config.center == card.infinifusion_center or card.config.center.key == "j_infus_fused" then
---@diagnostic disable-next-line: undefined-global ---@diagnostic disable-next-line: undefined-global
calculate_infinifusion(card, nil, function(i) calculate_infinifusion(card, nil, function(i)
Jane.misprintize(card, override, force_reset, stack) Jane.misprintize(card, override, force_reset, stack)
end) end)
end end
end end
if (not force_reset or G.GAME.modifiers.cry_jkr_misprint_mod) and if (not force_reset or G.GAME.modifiers.cry_jkr_misprint_mod) and
(G.GAME.modifiers.cry_misprint_min or override or card.ability.set == "Joker") and not (G.GAME.modifiers.cry_misprint_min or override or card.ability.set == "Joker") and not
stack or not stack or not
no(card, "immutable", true) then no(card, "immutable", true) then
if card.ability.name == "Ace Aequilibrium" then if card.ability.name == "Ace Aequilibrium" then
return return
end end
if G.GAME.modifiers.cry_jkr_misprint_mod and card.ability.set == "Joker" then if G.GAME.modifiers.cry_jkr_misprint_mod and card.ability.set == "Joker" then
if not override then if not override then
override = {} override = {}
end end
override.min = override.min or G.GAME.modifiers.cry_misprint_min or 1 override.min = override.min or G.GAME.modifiers.cry_misprint_min or 1
override.max = override.max or G.GAME.modifiers.cry_misprint_max or 1 override.max = override.max or G.GAME.modifiers.cry_misprint_max or 1
override.min = override.min * G.GAME.modifiers.cry_jkr_misprint_mod override.min = override.min * G.GAME.modifiers.cry_jkr_misprint_mod
override.max = override.max * G.GAME.modifiers.cry_jkr_misprint_mod override.max = override.max * G.GAME.modifiers.cry_jkr_misprint_mod
end end
if G.GAME.modifiers.cry_misprint_min or override and override.min then if G.GAME.modifiers.cry_misprint_min or override and override.min then
Jane.misprintize_tbl( Jane.misprintize_tbl(
card.config.center_key, card.config.center_key,
card, card,
"ability", "ability",
nil, nil,
override, override,
stack, stack,
is_card_big(card) is_card_big(card)
) )
if card.base then if card.base then
Jane.misprintize_tbl( Jane.misprintize_tbl(
card.config.card_key, card.config.card_key,
card, card,
"base", "base",
nil, nil,
override, override,
stack, stack,
is_card_big(card) is_card_big(card)
) )
end end
end end
if G.GAME.modifiers.cry_misprint_min then if G.GAME.modifiers.cry_misprint_min then
card.misprint_cost_fac = 1 / card.misprint_cost_fac = 1 /
log_random( log_random(
pseudoseed("cry_misprint" .. G.GAME.round_resets.ante), pseudoseed("cry_misprint" .. G.GAME.round_resets.ante),
override and override.min or G.GAME.modifiers.cry_misprint_min, override and override.min or G.GAME.modifiers.cry_misprint_min,
override and override.max or G.GAME.modifiers.cry_misprint_max override and override.max or G.GAME.modifiers.cry_misprint_max
) )
card:set_cost() card:set_cost()
end end
else else
Jane.misprintize_tbl(card.config.center_key, card, "ability", true, nil, nil, is_card_big(card)) Jane.misprintize_tbl(card.config.center_key, card, "ability", true, nil, nil, is_card_big(card))
end end
if card.ability.consumeable then if card.ability.consumeable then
for k, _ in pairs(card.ability.consumeable) do for k, _ in pairs(card.ability.consumeable) do
card.ability.consumeable[k] = deep_copy(card.ability[k]) card.ability.consumeable[k] = deep_copy(card.ability[k])
end end
end end
end end

File diff suppressed because it is too large Load diff

View file

@ -1,354 +1,354 @@
SMODS.Atlas { SMODS.Atlas {
key = "janertarots", key = "janertarots",
px = 71, px = 71,
py = 95, py = 95,
path = Jane.config.texture_pack .. "/c_jane_reversetarots.png" path = Jane.config.texture_pack .. "/c_jane_reversetarots.png"
} }
SMODS.Sound({key = "draw", path = "draw.ogg"}) SMODS.Sound({key = "draw", path = "draw.ogg"})
local function conjure(card, number) local function conjure(card, number)
for _ = 1, math.min( for _ = 1, math.min(
math.ceil(card.ability.extra.spectrals) * number, math.ceil(card.ability.extra.spectrals) * number,
G.consumeables.config.card_limit - #G.consumeables.cards G.consumeables.config.card_limit - #G.consumeables.cards
) do ) do
G.E_MANAGER:add_event(Event({ G.E_MANAGER:add_event(Event({
trigger = "after", trigger = "after",
delay = 0.4, delay = 0.4,
func = function() func = function()
if G.consumeables.config.card_limit <= #G.consumeables.cards then if G.consumeables.config.card_limit <= #G.consumeables.cards then
return true return true
end end
play_sound("jane_draw") play_sound("jane_draw")
local spectral = create_card("Spectral", G.consumeables, nil, nil, nil, nil, nil, "pri") local spectral = create_card("Spectral", G.consumeables, nil, nil, nil, nil, nil, "pri")
spectral:add_to_deck() spectral:add_to_deck()
G.consumeables:emplace(spectral) G.consumeables:emplace(spectral)
card:juice_up(0.3, 0.5) card:juice_up(0.3, 0.5)
return true return true
end end
})) }))
end end
end end
local function createfulldeck(enhancement, edition, amount, emplacement) local function createfulldeck(enhancement, edition, amount, emplacement)
local cards = {} local cards = {}
for _, v in pairs(G.P_CARDS) do for _, v in pairs(G.P_CARDS) do
for i = 1, (amount or 1) do for i = 1, (amount or 1) do
G.E_MANAGER:add_event(Event({ G.E_MANAGER:add_event(Event({
delay = 0.1, delay = 0.1,
func = function() func = function()
cards[i] = true cards[i] = true
G.playing_card = (G.playing_card and G.playing_card + 1) or 1 G.playing_card = (G.playing_card and G.playing_card + 1) or 1
local card = Card( local card = Card(
G.play.T.x + G.play.T.w / 2, G.play.T.x + G.play.T.w / 2,
G.play.T.y, G.CARD_W, G.CARD_H, G.play.T.y, G.CARD_W, G.CARD_H,
v, v,
enhancement or G.P_CENTERS.c_base, enhancement or G.P_CENTERS.c_base,
{playing_card = G.playing_card} {playing_card = G.playing_card}
) )
if edition then if edition then
card:set_edition(type(edition) == "table" and edition or {[edition] = true}, true, true) card:set_edition(type(edition) == "table" and edition or {[edition] = true}, true, true)
end end
play_sound("card1") play_sound("card1")
table.insert(G.playing_cards, card) table.insert(G.playing_cards, card)
card:add_to_deck() card:add_to_deck()
if emplacement then if emplacement then
emplacement:emplace(card) emplacement:emplace(card)
else else
G.deck:emplace(card) G.deck:emplace(card)
end end
return true return true
end end
})) }))
end end
end end
Jane.q(function() Jane.q(function()
if next(cards) then if next(cards) then
playing_card_joker_effects(cards) playing_card_joker_effects(cards)
end end
return true return true
end) end)
Jane.q(function() Jane.q(function()
cards = nil cards = nil
return true return true
end) end)
end end
local function randomize(targets, noanim) local function randomize(targets, noanim)
if #targets <= 0 then if #targets <= 0 then
return return
end end
if noanim then if noanim then
for i=1, #targets do for i=1, #targets do
local card = targets[i] local card = targets[i]
card:set_base(pseudorandom_element(G.P_CARDS)) card:set_base(pseudorandom_element(G.P_CARDS))
card:set_ability( card:set_ability(
pseudorandom(pseudoseed("chancetime")) > 1 / (#G.P_CENTER_POOLS["Enhanced"] + 1) and pseudorandom(pseudoseed("chancetime")) > 1 / (#G.P_CENTER_POOLS["Enhanced"] + 1) and
pseudorandom_element(G.P_CENTER_POOLS["Enhanced"], pseudoseed("spectral_chance")) or pseudorandom_element(G.P_CENTER_POOLS["Enhanced"], pseudoseed("spectral_chance")) or
G.P_CENTERS["c_base"] G.P_CENTERS["c_base"]
) )
local edition_rate = 2 local edition_rate = 2
card:set_edition(poll_edition("standard_edition" .. G.GAME.round_resets.ante, edition_rate, true), true, true) card:set_edition(poll_edition("standard_edition" .. G.GAME.round_resets.ante, edition_rate, true), true, true)
local seal_rate = 10 local seal_rate = 10
local seal_poll = pseudorandom(pseudoseed("stdseal" .. G.GAME.round_resets.ante)) local seal_poll = pseudorandom(pseudoseed("stdseal" .. G.GAME.round_resets.ante))
if seal_poll > 1 - 0.02 * seal_rate then if seal_poll > 1 - 0.02 * seal_rate then
local seal_type = pseudorandom(pseudoseed("stdsealtype" .. G.GAME.round_resets.ante)) local seal_type = pseudorandom(pseudoseed("stdsealtype" .. G.GAME.round_resets.ante))
local seal_list = {} local seal_list = {}
for k, _ in pairs(G.P_SEALS) do for k, _ in pairs(G.P_SEALS) do
table.insert(seal_list, k) table.insert(seal_list, k)
end end
seal_type = math.floor(seal_type * #seal_list) seal_type = math.floor(seal_type * #seal_list)
card:set_seal(seal_list[seal_type], true, true) card:set_seal(seal_list[seal_type], true, true)
else else
card:set_seal(nil, true, true) card:set_seal(nil, true, true)
end end
card:juice_up(0.3, 0.3) card:juice_up(0.3, 0.3)
end end
else else
for i = 1, #targets do for i = 1, #targets do
local percent = 1.15 - (i - 0.999) / (#G.hand.cards - 0.998) * 0.3 local percent = 1.15 - (i - 0.999) / (#G.hand.cards - 0.998) * 0.3
G.E_MANAGER:add_event(Event({ G.E_MANAGER:add_event(Event({
trigger = "after", trigger = "after",
delay = 0.15, delay = 0.15,
func = function() func = function()
targets[i]:flip() targets[i]:flip()
play_sound("card1", percent) play_sound("card1", percent)
targets[i]:juice_up(0.3, 0.3) targets[i]:juice_up(0.3, 0.3)
return true return true
end end
})) }))
end end
delay(0.2) delay(0.2)
for i = 1, #targets do for i = 1, #targets do
local percent = 0.85 + (i - 0.999) / (#G.hand.cards - 0.998) * 0.3 local percent = 0.85 + (i - 0.999) / (#G.hand.cards - 0.998) * 0.3
G.E_MANAGER:add_event(Event({ G.E_MANAGER:add_event(Event({
trigger = "after", trigger = "after",
delay = 0.1, delay = 0.1,
func = function() func = function()
local card = targets[i] local card = targets[i]
card:set_base(pseudorandom_element(G.P_CARDS)) card:set_base(pseudorandom_element(G.P_CARDS))
card:set_ability(pseudorandom_element(G.P_CENTER_POOLS["Enhanced"])) card:set_ability(pseudorandom_element(G.P_CENTER_POOLS["Enhanced"]))
local edition_rate = 2 local edition_rate = 2
card:set_edition(poll_edition("standard_edition" .. G.GAME.round_resets.ante, edition_rate, true)) card:set_edition(poll_edition("standard_edition" .. G.GAME.round_resets.ante, edition_rate, true))
local seal_rate = 10 local seal_rate = 10
local seal_poll = pseudorandom(pseudoseed("stdseal" .. G.GAME.round_resets.ante)) local seal_poll = pseudorandom(pseudoseed("stdseal" .. G.GAME.round_resets.ante))
if seal_poll > 1 - 0.02 * seal_rate then if seal_poll > 1 - 0.02 * seal_rate then
local seal_type = pseudorandom(pseudoseed("stdsealtype" .. G.GAME.round_resets.ante)) local seal_type = pseudorandom(pseudoseed("stdsealtype" .. G.GAME.round_resets.ante))
local seal_list = {} local seal_list = {}
for k, _ in pairs(G.P_SEALS) do for k, _ in pairs(G.P_SEALS) do
table.insert(seal_list, k) table.insert(seal_list, k)
end end
seal_type = math.floor(seal_type * #seal_list) seal_type = math.floor(seal_type * #seal_list)
card:set_seal(seal_list[seal_type]) card:set_seal(seal_list[seal_type])
else else
card:set_seal() card:set_seal()
end end
card:flip() card:flip()
play_sound("card3", percent, 0.6) play_sound("card3", percent, 0.6)
card:juice_up(0.3, 0.3) card:juice_up(0.3, 0.3)
return true return true
end end
})) }))
end end
end end
end end
SMODS.Consumable { SMODS.Consumable {
key = "obfuscation", key = "obfuscation",
atlas = "janeacc", atlas = "janeacc",
set = "Spectral", set = "Spectral",
loc_txt = { loc_txt = {
name = "Obfuscation", name = "Obfuscation",
text = { text = {
"{C:green,E:1}Randomises{} all cards in hand", "{C:green,E:1}Randomises{} all cards in hand",
"{C:inactive}(Rank, seal, edition,", "{C:inactive}(Rank, seal, edition,",
"{C:inactive}enhancement, and suit)", "{C:inactive}enhancement, and suit)",
} }
}, },
pos = {x = 0, y = 4}, pos = {x = 0, y = 4},
cost = 4, cost = 4,
can_use = function(_, _) can_use = function(_, _)
return Jane.canuse() and #((G.hand or {}).cards or {}) > 0 return Jane.canuse() and #((G.hand or {}).cards or {}) > 0
end, end,
use = function(_, card, _, _) use = function(_, card, _, _)
G.E_MANAGER:add_event(Event({ G.E_MANAGER:add_event(Event({
trigger = "after", trigger = "after",
delay = 0.4, delay = 0.4,
func = function() func = function()
play_sound("tarot1") play_sound("tarot1")
card:juice_up(0.3, 0.5) card:juice_up(0.3, 0.5)
return true return true
end end
})) }))
randomize(G.hand.cards) randomize(G.hand.cards)
delay(0.5) delay(0.5)
end end
} }
SMODS.Consumable { SMODS.Consumable {
key = "conjure", key = "conjure",
set = "Spectral", set = "Spectral",
atlas = "janeacc", atlas = "janeacc",
loc_txt = { loc_txt = {
name = "Conjure", name = "Conjure",
text = { text = {
"Creates {C:attention}#1#", "Creates {C:attention}#1#",
"{C:spectral}Spectral{} cards", "{C:spectral}Spectral{} cards",
"{C:inactive}(Must have room)", "{C:inactive}(Must have room)",
} }
}, },
config = {extra = {spectrals = 2}}, config = {extra = {spectrals = 2}},
pos = {x = 2, y = 4}, pos = {x = 2, y = 4},
cost = 4, cost = 4,
loc_vars = function(self, info_queue, center) loc_vars = function(self, info_queue, center)
return {vars = {math.ceil(center.ability.extra.spectrals)}} return {vars = {math.ceil(center.ability.extra.spectrals)}}
end, end,
can_use = Jane.canuse, can_use = Jane.canuse,
use = function(_, card, _, _) use = function(_, card, _, _)
conjure(card, 1) conjure(card, 1)
delay(0.6) delay(0.6)
end, end,
bulk_use = function(_, card, _, _, number) bulk_use = function(_, card, _, _, number)
conjure(card, number) conjure(card, number)
delay(0.6) delay(0.6)
end end
} }
SMODS.Consumable { SMODS.Consumable {
key = "shadows", key = "shadows",
set = "Spectral", set = "Spectral",
atlas = "janeacc", atlas = "janeacc",
loc_txt = { loc_txt = {
name = "Shadows", name = "Shadows",
text = { text = {
"Create {C:attention}#1#{} {C:green}random {C:dark_edition}Negative", "Create {C:attention}#1#{} {C:green}random {C:dark_edition}Negative",
"{C:attention}Perishable {C:attention}Jokers{}, set", "{C:attention}Perishable {C:attention}Jokers{}, set",
"{C:money}sell value{} of {C:attention}all Jokers{} to {C:money}$0", "{C:money}sell value{} of {C:attention}all Jokers{} to {C:money}$0",
} }
}, },
config = {extra = {shadows = 2}}, config = {extra = {shadows = 2}},
pos = {x = 3, y = 4}, pos = {x = 3, y = 4},
cost = 4, cost = 4,
loc_vars = function(_, _, center) loc_vars = function(_, _, center)
return {vars = {((center.ability or {}).extra or {}).shadows or 2}} return {vars = {((center.ability or {}).extra or {}).shadows or 2}}
end, end,
can_use = Jane.canuse, can_use = Jane.canuse,
use = function(_, card, _, _) use = function(_, card, _, _)
for _ = 1, card.ability.extra.shadows do for _ = 1, card.ability.extra.shadows do
local joker = create_card("Joker", G.jokers, nil, nil, nil, nil, nil, "phantom") local joker = create_card("Joker", G.jokers, nil, nil, nil, nil, nil, "phantom")
joker:set_edition({negative = true}) joker:set_edition({negative = true})
joker.ability.eternal = false joker.ability.eternal = false
joker.ability.perishable = true joker.ability.perishable = true
joker.ability.perish_tally = 5 joker.ability.perish_tally = 5
joker:add_to_deck() joker:add_to_deck()
G.jokers:emplace(joker) G.jokers:emplace(joker)
end end
delay(0.6) delay(0.6)
for i = 1, #G.jokers.cards do for i = 1, #G.jokers.cards do
G.jokers.cards[i].base_cost = 0 G.jokers.cards[i].base_cost = 0
G.jokers.cards[i].extra_cost = 0 G.jokers.cards[i].extra_cost = 0
G.jokers.cards[i].cost = 0 G.jokers.cards[i].cost = 0
G.jokers.cards[i].sell_cost = 0 G.jokers.cards[i].sell_cost = 0
G.jokers.cards[i].sell_cost_label = G.jokers.cards[i].facing == "back" and "?" or G.jokers.cards[i].sell_cost G.jokers.cards[i].sell_cost_label = G.jokers.cards[i].facing == "back" and "?" or G.jokers.cards[i].sell_cost
end end
end, end,
bulk_use = function(_, card, _, _, number) bulk_use = function(_, card, _, _, number)
for _ = 1, card.ability.extra.shadows * number do for _ = 1, card.ability.extra.shadows * number do
local joker = create_card("Joker", G.jokers, nil, nil, nil, nil, nil, "phantom") local joker = create_card("Joker", G.jokers, nil, nil, nil, nil, nil, "phantom")
joker.no_forced_edition = true joker.no_forced_edition = true
joker:set_edition({negative = true}) joker:set_edition({negative = true})
joker.no_forced_edition = nil joker.no_forced_edition = nil
joker.ability.eternal = false joker.ability.eternal = false
joker.ability.perishable = true joker.ability.perishable = true
joker.ability.perish_tally = 5 joker.ability.perish_tally = 5
joker:add_to_deck() joker:add_to_deck()
G.jokers:emplace(joker) G.jokers:emplace(joker)
end end
delay(0.6) delay(0.6)
for i = 1, #G.jokers.cards do for i = 1, #G.jokers.cards do
G.jokers.cards[i].base_cost = 0 G.jokers.cards[i].base_cost = 0
G.jokers.cards[i].extra_cost = 0 G.jokers.cards[i].extra_cost = 0
G.jokers.cards[i].cost = 0 G.jokers.cards[i].cost = 0
G.jokers.cards[i].sell_cost = 0 G.jokers.cards[i].sell_cost = 0
G.jokers.cards[i].sell_cost_label = G.jokers.cards[i].facing == "back" and "?" or G.jokers.cards[i].sell_cost G.jokers.cards[i].sell_cost_label = G.jokers.cards[i].facing == "back" and "?" or G.jokers.cards[i].sell_cost
end end
end end
} }
SMODS.Consumable { SMODS.Consumable {
key = "reverse_hanged_man", key = "reverse_hanged_man",
atlas = "janertarots", atlas = "janertarots",
set = "Spectral", set = "Spectral",
loc_txt = { loc_txt = {
name = "Zen", name = "Zen",
text = { text = {
"{C:attention}Reset{} your deck to", "{C:attention}Reset{} your deck to",
"a {C:attention}standard 52-card deck" "a {C:attention}standard 52-card deck"
} }
}, },
config = {extra = {destruction = 0.5}}, config = {extra = {destruction = 0.5}},
pos = {x = 7, y = 1}, pos = {x = 7, y = 1},
cost = 15, cost = 15,
loc_vars = function(_, _, center) loc_vars = function(_, _, center)
return {vars = { return {vars = {
math.min(100, center.ability.extra.destruction * 100), math.min(100, center.ability.extra.destruction * 100),
math.ceil(#(G.playing_cards or {}) * center.ability.extra.destruction) math.ceil(#(G.playing_cards or {}) * center.ability.extra.destruction)
}} }}
end, end,
can_use = Jane.canuse, can_use = Jane.canuse,
use = function(_, _, _, _) use = function(_, _, _, _)
Jane.q(function() Jane.q(function()
for _, v in pairs(G.playing_cards) do for _, v in pairs(G.playing_cards) do
v:start_dissolve() v:start_dissolve()
end end
return true return true
end) end)
local function realdelay(time, queue) local function realdelay(time, queue)
G.E_MANAGER:add_event(Event({ G.E_MANAGER:add_event(Event({
trigger = "after", trigger = "after",
timer = "REAL", timer = "REAL",
delay = time or 1, delay = time or 1,
func = function() func = function()
return true return true
end end
}), queue) }), queue)
end end
realdelay(1) realdelay(1)
createfulldeck() createfulldeck()
end end
} }

View file

@ -1,50 +1,50 @@
local blurbs = { local blurbs = {
"Hey! Pick me!", "Hey! Pick me!",
"You wouldn't say no to a free negative me, would you?", "You wouldn't say no to a free negative me, would you?",
"Sometimes, an extra four mult goes a long way!", "Sometimes, an extra four mult goes a long way!",
"I won't take up space, I promise!", "I won't take up space, I promise!",
"Don't ask how I ended up in a tarot!", "Don't ask how I ended up in a tarot!",
"Hee-hee, hoo-hoo!", "Hee-hee, hoo-hoo!",
"Who knew even fortunes could be a circus act?", "Who knew even fortunes could be a circus act?",
"Looks like the joke is on the crystal globe!", "Looks like the joke is on the crystal globe!",
"It's a little cramped in this tarot...!", "It's a little cramped in this tarot...!",
"Ouch, I think the joke is on me!", "Ouch, I think the joke is on me!",
"Looks like the joke is on you!", "Looks like the joke is on you!",
"I'm not just a clown; I'm the whole circus!", "I'm not just a clown; I'm the whole circus!",
"Seems a little suspicious for a jolly old fella like me to be in this card...", "Seems a little suspicious for a jolly old fella like me to be in this card...",
"I can't help if I'm still in this silly old card, break me out!", "I can't help if I'm still in this silly old card, break me out!",
"Let me tell you, you'd love the show going on in this tarot!", "Let me tell you, you'd love the show going on in this tarot!",
"I'd give you more tickets to JimCon, but I'm fresh out.", "I'd give you more tickets to JimCon, but I'm fresh out.",
"I've heard of a round buffoon that lives in a pretty funky town...", "I've heard of a round buffoon that lives in a pretty funky town...",
"I can't give four mult if I'm still in this card!", "I can't give four mult if I'm still in this card!",
"I'm rooting for you! Even if it means I'll never get out of this card...", "I'm rooting for you! Even if it means I'll never get out of this card...",
"Who knew I'd have access to a great show? That show being you!", "Who knew I'd have access to a great show? That show being you!",
"The stakes are only gonna rise here!", "The stakes are only gonna rise here!",
"Juggling is one of my favourite passtimes!", "Juggling is one of my favourite passtimes!",
"I wonder what's the deal with pairs?", "I wonder what's the deal with pairs?",
"You don't need to understand math to enjoy watching the digits climb!", "You don't need to understand math to enjoy watching the digits climb!",
"You should meet my friend Joseph; he's stuck in a Planet card!", "You should meet my friend Joseph; he's stuck in a Planet card!",
"M!", "M!",
} }
SMODS.Consumable { SMODS.Consumable {
key = "jokerinatarot", key = "jokerinatarot",
atlas = "janeacc", atlas = "janeacc",
set = "Tarot", set = "Tarot",
loc_txt = { loc_txt = {
name = "Joker-in-a-Tarot", name = "Joker-in-a-Tarot",
text = { text = {
"Create a {C:dark_edition}Negative {C:attention}default Joker", "Create a {C:dark_edition}Negative {C:attention}default Joker",
"{C:inactive,E:1}#1#{}" "{C:inactive,E:1}#1#{}"
} }
}, },
loc_vars = function(_, _, _) loc_vars = function(_, _, _)
return {vars = {blurbs[math.random(#blurbs)]}} return {vars = {blurbs[math.random(#blurbs)]}}
end, end,
pos = {x = 0, y = 1}, pos = {x = 0, y = 1},
cost = 3, cost = 3,
can_use = Jane.canuse, can_use = Jane.canuse,
use = function(_, _, _, _) use = function(_, _, _, _)
local card = create_card("Joker", G.jokers, nil, nil, nil, nil, "j_joker", "jokerfromatarot") local card = create_card("Joker", G.jokers, nil, nil, nil, nil, "j_joker", "jokerfromatarot")
card:set_edition({negative = true}, true) card:set_edition({negative = true}, true)
card.cost = 1 card.cost = 1
@ -54,10 +54,10 @@ SMODS.Consumable {
card.sell_cost_label = card.facing == "back" and "?" or card.sell_cost card.sell_cost_label = card.facing == "back" and "?" or card.sell_cost
card:add_to_deck() card:add_to_deck()
G.jokers:emplace(card) G.jokers:emplace(card)
end, end,
bulk_use = function(self, card, area, copier, number) bulk_use = function(self, card, area, copier, number)
for _ = 1, number do for _ = 1, number do
self:use(card, area, copier) self:use(card, area, copier)
end end
end end
} }

View file

@ -1,86 +1,86 @@
SMODS.Atlas { SMODS.Atlas {
key = "janetokens", key = "janetokens",
px = 71, px = 71,
py = 95, py = 95,
path = Jane.config.texture_pack .. "/c_jane_tokens.png" path = Jane.config.texture_pack .. "/c_jane_tokens.png"
} }
SMODS.Sound({key = "e_gilded", path = "e_gilded.ogg"}) SMODS.Sound({key = "e_gilded", path = "e_gilded.ogg"})
SMODS.ConsumableType { SMODS.ConsumableType {
key = "jane_tokens", key = "jane_tokens",
default = "c_jane_token_tag_standard", default = "c_jane_token_tag_standard",
loc_txt = { loc_txt = {
collection = "Tokens", collection = "Tokens",
name = "Token" name = "Token"
}, },
shop_rate = 0, shop_rate = 0,
collection_rows = {6, 6}, collection_rows = {6, 6},
primary_colour = G.C.CHIPS, primary_colour = G.C.CHIPS,
secondary_colour = G.C.VOUCHER, secondary_colour = G.C.VOUCHER,
} }
for _, v in pairs({ for _, v in pairs({
{"tag_standard", "Standard", 0, 0, 3}, {"tag_standard", "Standard", 0, 0, 3},
{"tag_charm", "Charm", 1, 0, 5}, {"tag_charm", "Charm", 1, 0, 5},
{"tag_meteor", "Meteor", 2, 0, 5}, {"tag_meteor", "Meteor", 2, 0, 5},
{"tag_ethereal", "Ethereal", 3, 0, 5}, {"tag_ethereal", "Ethereal", 3, 0, 5},
{"tag_buffoon", "Buffoon", 4, 0, 8}, {"tag_buffoon", "Buffoon", 4, 0, 8},
{"tag_cry_bundle", "Bundle", 1, 1, 10}, {"tag_cry_bundle", "Bundle", 1, 1, 10},
{"tag_uncommon", "Uncommon", 2, 1, 3}, {"tag_uncommon", "Uncommon", 2, 1, 3},
{"tag_rare", "Rare", 3, 1, 5}, {"tag_rare", "Rare", 3, 1, 5},
{"tag_cry_epic", "Epic", 4, 1, 8}, {"tag_cry_epic", "Epic", 4, 1, 8},
{"tag_foil", "Foil", 1, 3, 3}, {"tag_foil", "Foil", 1, 3, 3},
{"tag_holo", "Holographic", 2, 3, 4}, {"tag_holo", "Holographic", 2, 3, 4},
{"tag_polychrome", "Polychrome", 3, 3, 5}, {"tag_polychrome", "Polychrome", 3, 3, 5},
{"tag_negative", "Negative", 4, 3, 10}, {"tag_negative", "Negative", 4, 3, 10},
{"tag_investment", "Investment", 0, 3, 8}, {"tag_investment", "Investment", 0, 3, 8},
{"tag_voucher", "Voucher", 4, 5, 5}, {"tag_voucher", "Voucher", 4, 5, 5},
{"tag_handy", "Handy", 1, 5, 8}, {"tag_handy", "Handy", 1, 5, 8},
{"tag_garbage", "Garbage", 0, 5, 6}, {"tag_garbage", "Garbage", 0, 5, 6},
{"tag_coupon", "Coupon", 4, 4, 10}, {"tag_coupon", "Coupon", 4, 4, 10},
{"tag_juggle", "Juggle", 2, 5, 2}, {"tag_juggle", "Juggle", 2, 5, 2},
{"tag_d_six", "Dice", 0, 4, 2}, {"tag_d_six", "Dice", 0, 4, 2},
{"tag_top_up", "Top-up", 2, 4, 2}, {"tag_top_up", "Top-up", 2, 4, 2},
{"tag_skip", "Speed", 4, 2, 7}, {"tag_skip", "Speed", 4, 2, 7},
{"tag_economy", "Economy", 5, 2, 10}, {"tag_economy", "Economy", 5, 2, 10},
{"tag_double", "Double", 0, 2, 6}, {"tag_double", "Double", 0, 2, 6},
{"tag_cry_triple", "Triple", 1, 2, 8}, {"tag_cry_triple", "Triple", 1, 2, 8},
{"tag_cry_quadruple", "Quadruple", 2, 2, 10}, {"tag_cry_quadruple", "Quadruple", 2, 2, 10},
{"tag_cry_quintuple", "Quintuple", 3, 2, 13}, {"tag_cry_quintuple", "Quintuple", 3, 2, 13},
{"tag_cry_memory", "Memory", 5, 4, 8} {"tag_cry_memory", "Memory", 5, 4, 8}
}) do }) do
if Cryptid or v[1]:sub(1, 7) ~= "tag_cry" then if Cryptid or v[1]:sub(1, 7) ~= "tag_cry" then
SMODS.Consumable { SMODS.Consumable {
key = "token_" .. v[1], key = "token_" .. v[1],
set = "jane_tokens", set = "jane_tokens",
atlas = "janetokens", atlas = "janetokens",
loc_txt = { loc_txt = {
name = v[2] .. " Token", name = v[2] .. " Token",
text = { text = {
"Use to create a", "Use to create a",
"{C:attention}" .. v[2] .. " Tag", "{C:attention}" .. v[2] .. " Tag",
}, },
}, },
pos = {x = v[3], y = v[4]}, pos = {x = v[3], y = v[4]},
cost = v[5], cost = v[5],
can_stack = true, can_stack = true,
can_divide = true, can_divide = true,
can_use = Jane.canuse, can_use = Jane.canuse,
in_pool = function (_, _) in_pool = function (_, _)
return G.GAME.used_vouchers.v_jane_token_voucher return G.GAME.used_vouchers.v_jane_token_voucher
end, end,
use = function(_, _, _, _) use = function(_, _, _, _)
play_sound("jane_e_gilded", 1.25, 0.4) play_sound("jane_e_gilded", 1.25, 0.4)
add_tag(Tag(v[1])) add_tag(Tag(v[1]))
end, end,
bulk_use = function(_, _, _, _, number) bulk_use = function(_, _, _, _, number)
play_sound("jane_e_gilded", 1.25, 0.4) play_sound("jane_e_gilded", 1.25, 0.4)
for _ = 1, number do for _ = 1, number do
add_tag(Tag(v[1])) add_tag(Tag(v[1]))
end end
end end
} }
end end
end end

View file

@ -1,23 +1,23 @@
SMODS.Atlas { SMODS.Atlas {
key = "janetokenvoucher", key = "janetokenvoucher",
px = 71, px = 71,
py = 95, py = 95,
path = Jane.config.texture_pack .. "/v_jane_token_voucher.png" path = Jane.config.texture_pack .. "/v_jane_token_voucher.png"
} }
SMODS.Voucher { SMODS.Voucher {
key = "token_voucher", key = "token_voucher",
atlas = "janetokenvoucher", atlas = "janetokenvoucher",
loc_txt = { loc_txt = {
name = "Token Voucher", name = "Token Voucher",
text = { text = {
"{C:attention}Tokens {}can appear", "{C:attention}Tokens {}can appear",
"in the shop", "in the shop",
} }
}, },
pos = {x = 0, y = 0}, pos = {x = 0, y = 0},
cost = 15, cost = 15,
redeem = function (_, _) redeem = function (_, _)
G.GAME['jane_tokens_rate'] = 1.5 G.GAME['jane_tokens_rate'] = 1.5
end end
} }