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 allow_moire() for _, v in pairs(SMODS.find_card("j_jane_saint")) do if v.ability.extra.is_attuned then return true end end return false end 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() if obj.set == "Booster" or obj.jumbo_mod then jumbo_modifier = obj.jumbo_mod or 2 end if card.added_to_deck then card:remove_from_deck() end Jane.misprintize(card, {min = jumbo_modifier, max = jumbo_modifier}, nil, true) if card.added_to_deck then card:add_to_deck() end 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 was_added then card:add_to_deck() end Jane.resize(card) end, sound = {sound = "jane_e_jumbo", per = 1, vol = 0.5}, weight = 5, extra_cost = 5, 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 jumbo.on_remove(self) end local ret = orig_set_ability(self, ...) if is_jumbo then jumbo.on_apply(self) 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 = Jane.cry and 0.8 or 0.9, e_mult = Jane.cry and 1.2 or 1.1}, sound = {sound = "jane_e_moire", per = 1, vol = 0.7}, weight = 2, extra_cost = 10, in_shop = true, shader = "moire", in_pool = allow_moire, apply_to_float = false, get_weight = function(self) return G.GAME.edition_rate * self.weight * (allow_moire() and 1 or 0) end, loc_vars = function(self, _, _) return {vars = {self.config.e_chips, self.config.e_mult}} end, calculate = function(self, _, context) if context.post_joker or context.main_scoring and context.cardarea == G.play then return {e_chips = self.config.e_chips, e_mult = self.config.e_mult} end end, })