236 lines
6.7 KiB
Lua
236 lines
6.7 KiB
Lua
SMODS.Shader({key = "moire", path = "moire.fs"})
|
|
SMODS.Shader({key = "polygloss", path = "polygloss.fs"})
|
|
SMODS.Sound({key = "e_jumbo", path = "e_jumbo.ogg"})
|
|
SMODS.Sound({key = "e_moire", path = "e_moire.ogg"})
|
|
SMODS.Sound({key = "e_polygloss", path = "e_polygloss.ogg"})
|
|
|
|
local function get_weight(self)
|
|
return G.GAME.edition_rate * self.weight
|
|
end
|
|
|
|
SMODS.Edition({
|
|
key = "polygloss",
|
|
loc_txt = {
|
|
name = "Polygloss",
|
|
label = "Polygloss",
|
|
text = Jane.cry and {
|
|
"{C:chips}+#1#{} Chips",
|
|
"{C:mult}+#2#{}, {X:mult,C:white}X#3#{}, & {X:mult,C:dark_edition}^#4#{} Mult",
|
|
"{C:money}$#5# {}when scored",
|
|
} or {
|
|
"{C:chips}+#1#{} Chips",
|
|
"{C:mult}+#2#{} & {X:mult,C:white}X#3#{} Mult",
|
|
"{C:money}$#4# {}when scored",
|
|
},
|
|
},
|
|
config = {
|
|
mult = 2,
|
|
chips = 12,
|
|
x_mult = 1.2,
|
|
p_dollars = 1,
|
|
e_mult = Jane.cry and 1.02 or nil,
|
|
},
|
|
sound = {sound = "jane_e_polygloss", per = 1.2, vol = 0.4},
|
|
weight = 10,
|
|
extra_cost = 2,
|
|
in_shop = true,
|
|
shader = "polygloss",
|
|
apply_to_float = false,
|
|
loc_vars = function(self, _, _)
|
|
local vars = {self.config.chips}
|
|
vars[#vars + 1] = self.config.mult
|
|
vars[#vars + 1] = self.config.x_mult
|
|
vars[#vars + 1] = self.config.e_mult
|
|
vars[#vars + 1] = self.config.p_dollars
|
|
return {vars = vars}
|
|
end,
|
|
calculate = function(_, card, context)
|
|
if context.pre_joker then
|
|
return {
|
|
mult = card.edition.mult,
|
|
chips = card.edition.chips,
|
|
}
|
|
elseif context.post_joker then
|
|
return {
|
|
e_mult = card.edition.e_mult,
|
|
x_mult = card.edition.x_mult,
|
|
p_dollars = card.edition.p_dollars,
|
|
}
|
|
elseif context.main_scoring and context.cardarea == G.play then
|
|
return {
|
|
mult = card.edition.mult,
|
|
chips = card.edition.chips,
|
|
e_mult = card.edition.e_mult,
|
|
x_mult = card.edition.x_mult,
|
|
p_dollars = card.edition.p_dollars,
|
|
}
|
|
end
|
|
end,
|
|
get_weight = get_weight,
|
|
})
|
|
|
|
local orig_draw_shader = Sprite.draw_shader
|
|
|
|
function Sprite:draw_shader(_shader, ...)
|
|
if _shader ~= "jane_jumbo" then
|
|
return orig_draw_shader(self, _shader, ...)
|
|
end
|
|
end
|
|
|
|
local jumbo_modifier = Jane.cry and 100 or 2
|
|
|
|
local jumbo = SMODS.Edition({
|
|
key = "jumbo",
|
|
loc_txt = {
|
|
name = "Jumbo",
|
|
label = "Jumbo",
|
|
text = {
|
|
"All card values are",
|
|
"{C:attention}multiplied{} by {C:attention}up to " .. jumbo_modifier,
|
|
"{C:inactive}(If possible)",
|
|
"{C:inactive,E:1,s:0.75}Whoa, it's huge!!{}",
|
|
},
|
|
},
|
|
on_apply = function(card)
|
|
if card.Jane_jumbo then
|
|
return
|
|
end
|
|
|
|
card.Jane_jumbo = true
|
|
local obj = card:gc()
|
|
local modifier = (obj.set == "Booster" or obj.jumbo_mod) and (obj.jumbo_mod or 2) or jumbo_modifier
|
|
|
|
if card.added_to_deck then
|
|
card:remove_from_deck()
|
|
end
|
|
|
|
Jane.misprintize(card, {min = modifier, max = modifier}, nil, true)
|
|
|
|
if (card.ability or {}).bonus and (card.base or {}).nominal then
|
|
card.ability.bonus = card.ability.bonus + card.base.nominal
|
|
end
|
|
|
|
if card.added_to_deck then
|
|
card:add_to_deck()
|
|
end
|
|
|
|
if ({j_turtle_bean = true, j_mp_turtle_bean = true})[obj.key] then
|
|
G.hand:change_size(card.ability.extra.h_size)
|
|
card.ability.extra.h_mod = 1
|
|
end
|
|
|
|
Jane.resize(card, Jane.config.wee_sizemod)
|
|
end,
|
|
on_load = function(card)
|
|
Jane.resize(card, Jane.config.wee_sizemod)
|
|
end,
|
|
on_remove = function(card)
|
|
if not card.Jane_jumbo then
|
|
return
|
|
end
|
|
|
|
card.Jane_jumbo = nil
|
|
local was_added = card.added_to_deck
|
|
|
|
if was_added then
|
|
card:remove_from_deck()
|
|
end
|
|
|
|
Jane.misprintize(card, {min = 1 / jumbo_modifier, max = 1 / jumbo_modifier}, nil, true)
|
|
|
|
if (card.ability or {}).bonus and (card.base or {}).nominal then
|
|
card.ability.bonus = card.ability.bonus - card.base.nominal
|
|
end
|
|
|
|
if was_added then
|
|
card:add_to_deck()
|
|
end
|
|
|
|
if ({j_turtle_bean = true, j_mp_turtle_bean = true})[card.config.center.key] then
|
|
G.hand:change_size(-card.ability.extra.h_size)
|
|
card.ability.extra.h_mod = jumbo_modifier
|
|
end
|
|
|
|
Jane.resize(card)
|
|
end,
|
|
calculate = function(_, card, context)
|
|
if context.selling_self and ({j_turtle_bean = true, j_mp_turtle_bean = true})[card.config.center.key] then
|
|
G.hand:change_size(-card.ability.extra.h_size)
|
|
card.ability.extra.h_mod = jumbo_modifier
|
|
end
|
|
end,
|
|
sound = {sound = "jane_e_jumbo", per = 1, vol = 0.5},
|
|
weight = 5,
|
|
extra_cost = 2,
|
|
in_shop = true,
|
|
shader = false,
|
|
apply_to_float = false,
|
|
get_weight = get_weight,
|
|
})
|
|
|
|
local orig_set_ability = Card.set_ability
|
|
|
|
function Card:set_ability(...)
|
|
local is_jumbo = self.edition and self.edition.jane_jumbo
|
|
|
|
if is_jumbo then
|
|
if Jane.cry then
|
|
jumbo.on_remove(self)
|
|
else
|
|
Jane.resize(self)
|
|
end
|
|
end
|
|
|
|
local ret = orig_set_ability(self, ...)
|
|
|
|
if is_jumbo then
|
|
if Jane.cry then
|
|
jumbo.on_apply(self)
|
|
else
|
|
Jane.resize(self, Jane.config.wee_sizemod)
|
|
end
|
|
end
|
|
|
|
return ret
|
|
end
|
|
|
|
SMODS.Edition({
|
|
key = "moire",
|
|
loc_txt = {
|
|
name = "Moire",
|
|
label = "Moire",
|
|
text = {
|
|
"{X:chips,C:dark_edition}^#1#{C:chips} Chips",
|
|
"{X:mult,C:dark_edition}^#2#{C:mult} Mult",
|
|
},
|
|
},
|
|
config = {e_chips = 0.8, e_mult = 1.2},
|
|
sound = {sound = "jane_e_moire", per = 1, vol = 0.7},
|
|
weight = 1,
|
|
extra_cost = 10,
|
|
in_shop = true,
|
|
shader = "moire",
|
|
apply_to_float = false,
|
|
get_weight = get_weight,
|
|
loc_vars = function(self, _, _)
|
|
return {vars = {self.config.e_chips, self.config.e_mult}}
|
|
end,
|
|
calculate = function(self, card, context)
|
|
return (
|
|
context.post_joker or
|
|
context.main_scoring and
|
|
context.cardarea == G.play
|
|
) and {
|
|
extra = {
|
|
card = card,
|
|
colour = G.C.jane_RGB,
|
|
e_chips = self.config.e_chips,
|
|
extra = {
|
|
card = card,
|
|
colour = G.C.jane_RGB,
|
|
e_mult = self.config.e_mult,
|
|
},
|
|
},
|
|
} or nil
|
|
end,
|
|
})
|