From 74b49855da172d1c81cd0e80034a875612f6d3b8 Mon Sep 17 00:00:00 2001 From: Emik Date: Mon, 6 Jul 2026 19:30:26 +0200 Subject: [PATCH] Buff Moire --- manifest.json | 2 +- src/edition.lua | 37 +++++++++++++++++++------------------ 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/manifest.json b/manifest.json index 6813d10..ad6e99a 100644 --- a/manifest.json +++ b/manifest.json @@ -18,5 +18,5 @@ "conflicts": [ "Jen" ], - "version": "1.11.5" + "version": "1.11.6" } \ No newline at end of file diff --git a/src/edition.lua b/src/edition.lua index 6cd9df5..6d6658e 100644 --- a/src/edition.lua +++ b/src/edition.lua @@ -4,16 +4,6 @@ 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 @@ -214,22 +204,33 @@ SMODS.Edition({ "{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}, + 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 = function(self) - return G.GAME.edition_rate * self.weight * (allow_moire() and 20 or 2) - end, + get_weight = get_weight, 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 + 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, })