Make negative copies silent

This commit is contained in:
Emik 2026-07-27 19:31:49 +02:00
parent f170f855a1
commit 322af20c35
Signed by: emik
GPG key ID: 6B0CD72A5E503BDF
4 changed files with 16 additions and 9 deletions

View file

@ -83,7 +83,7 @@ pattern = "local card = create_card('Tarot',G.consumeables, nil, nil, nil, nil,
position = "after"
times = 1
payload = """if next(SMODS.find_card "j_Roland_misfortune") then
card:set_edition "e_negative"
card:set_edition("e_negative", true, true)
end"""
match_indent = true
@ -105,7 +105,7 @@ target = "card.lua"
pattern = "local card = create_card(card_type,G.consumeables, nil, nil, nil, nil, _planet, 'blusl')"
position = "after"
payload = """if next(SMODS.find_card "j_Roland_misfortune") then
card:set_edition "e_negative"
card:set_edition("e_negative", true, true)
end"""
match_indent = true

View file

@ -3,7 +3,7 @@
"id": "Roland",
"name": "Roland",
"prefix": "Roland",
"version": "2.9.79",
"version": "2.9.80",
"badge_colour": "8BE9FD",
"display_name": "Roland",
"main_file": "src/main.lua",

View file

@ -218,8 +218,8 @@ joker {
SMODS.calculate_context {drawing_cards = true, draw = {G.deck.cards}}
SMODS.calculate_context {
hand_drawn = facing_blind and {G.deck.cards[1]} and true,
other_drawn = not facing_blind and {G.deck.cards[1]} and true,
hand_drawn = facing_blind and {G.deck.cards[1]} or true,
other_drawn = not facing_blind and {G.deck.cards[1]} or true,
first_hand_drawn = not current_round.any_hand_drawn and facing_blind or nil,
}
@ -274,7 +274,7 @@ joker {
delay = 1,
func = function()
play_sound "timpani"
SMODS.add_card {edition = "e_negative", key = v.config.center.key}
SMODS.add_card {edition = "e_negative", key = v.config.center.key, silent = true}
end,
}
end) or nil

View file

@ -28,6 +28,11 @@ CardSleeves.Sleeve = CardSleeves.Sleeve
--- @type {aliases: { [string]: [string] }}
Cryptid = Cryptid
---@return Card
function copy_card(...)
error(...)
end
--- @type fun(area: CardArea, ...: ...): Card
create_card_for_shop = create_card_for_shop
@ -43,9 +48,11 @@ G.playing_cards = G.playing_cards
---@type userdata|{getWidth: fun(self: self): number}
SMODS.Atlas.image_data = SMODS.Atlas.image_data
---@return Card
function copy_card(...)
error(...)
---@param context CalcContext|table|{hand_drawn: true, other_drawn: true}
---@param return_table? table
---@return table?
function SMODS.calculate_context(context, return_table)
error {context, return_table}
end
SMODS.Mods.Roland.config = require "config"