From 780814fece2892725d0db3f257a49a87b0d22a27 Mon Sep 17 00:00:00 2001 From: Emik Date: Sun, 13 Apr 2025 03:33:26 +0200 Subject: [PATCH] Make moire only trigger when scored --- manifest.json | 2 +- src/edition.lua | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/manifest.json b/manifest.json index 8f2d2d6..a2458a7 100644 --- a/manifest.json +++ b/manifest.json @@ -17,5 +17,5 @@ "conflicts": [ "Jen" ], - "version": "1.1.5" + "version": "1.1.6" } \ No newline at end of file diff --git a/src/edition.lua b/src/edition.lua index 4601a3c..63707d1 100644 --- a/src/edition.lua +++ b/src/edition.lua @@ -4,10 +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 get_weight(self) - return G.GAME.edition_rate * self.weight -end - local function allow_moire() if Cryptid then return true @@ -22,6 +18,10 @@ local function allow_moire() return false end +local function get_weight(self) + return G.GAME.edition_rate * self.weight * (allow_moire() and 1 or 0) +end + SMODS.Edition({ key = "polygloss", loc_txt = { @@ -191,7 +191,7 @@ SMODS.Edition({ return {vars = {self.config.e_chips, self.config.e_mult}} end, calculate = function(self, _, context) - if context.post_joker or context.main_scoring then + 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,