From 2b78455ff84204bb0111092678881103859862dc Mon Sep 17 00:00:00 2001 From: Emik Date: Sun, 21 Jun 2026 00:06:48 +0200 Subject: [PATCH] Buff voucher --- localization/en-us.lua | 4 ++-- manifest.json | 2 +- src/blind.lua | 12 +++++------- src/voucher.lua | 12 +++++++++--- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/localization/en-us.lua b/localization/en-us.lua index 9d97f08..850e8a6 100644 --- a/localization/en-us.lua +++ b/localization/en-us.lua @@ -500,14 +500,14 @@ return { name = "Ceres", text = { "Level up {C:attention}Flush House", - "when it is played", + "by {C:attention}#1# {}when it is played", }, }, v_Roland_neptune = { name = "Neptune", text = { "Level up {C:attention}Straight Flush", - "when it is played", + "by {C:attention}#1# {}when it is played", }, }, }, diff --git a/manifest.json b/manifest.json index ba99af0..091cf04 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,7 @@ "id": "Roland", "name": "Roland", "prefix": "Roland", - "version": "2.9.20", + "version": "2.9.21", "badge_colour": "8BE9FD", "display_name": "Roland", "main_file": "src/main.lua", diff --git a/src/blind.lua b/src/blind.lua index 11d50f1..3151793 100644 --- a/src/blind.lua +++ b/src/blind.lua @@ -354,13 +354,11 @@ function SMODS.current_mod:calculate(context) f {"v_Roland_ceres", "v_Roland_neptune"} :where(f.index_into(G.GAME.used_vouchers)) :map(f.index_into(G.P_CENTERS)) - :where("config.hand_type", context.scoring_name) - :any() and - SMODS.calculate_effect { - level_up = true, - message = localize "k_level_up_ex", - card = G.play.cards[math.ceil(#G.play.cards / 2)] or G.deck.cards[#G.deck.cards] or {}, - } + :where("config.extra.hand_type", context.scoring_name) + :pun "SMODS.Voucher" + :each(function(v, _) + SMODS.smart_level_up_hand(nil, v.config.extra.hand_type, nil, v.config.extra.amount) + end) local improbable, orig = G.GAME.modifiers.Roland_improbable, G.GAME.probabilities diff --git a/src/voucher.lua b/src/voucher.lua index 6f21589..bdb9017 100644 --- a/src/voucher.lua +++ b/src/voucher.lua @@ -22,10 +22,13 @@ SMODS.Atlas { voucher { key = "ceres", pronouns = "it_its", - config = {hand_type = "Flush House"}, + config = {extra = {amount = 1, hand_type = "Flush House"}}, attributes = {"planet", "passive", "hand_type", "space"}, + loc_vars = function(_, _, card) + return {vars = {card.ability.extra.amount}} + end, in_pool = function(self) - return G.GAME.hands[self.config.hand_type].visible + return G.GAME.hands[self.config.extra.hand_type].visible end, } @@ -33,6 +36,9 @@ voucher { key = "neptune", pronouns = "it_its", requires = {"v_Roland_ceres"}, - config = {hand_type = "Straight Flush"}, + config = {extra = {amount = 2, hand_type = "Straight Flush"}}, attributes = {"planet", "passive", "hand_type", "space"}, + loc_vars = function(_, _, card) + return {vars = {card.ability.extra.amount}} + end, }