Buff Misfortune Cookie

This commit is contained in:
Emik 2026-07-08 17:27:45 +02:00
parent a50c7f4e41
commit d63333d242
Signed by: emik
GPG key ID: 6B0CD72A5E503BDF
5 changed files with 31 additions and 8 deletions

View file

@ -278,9 +278,8 @@ return {
j_Roland_misfortune = { j_Roland_misfortune = {
name = "Misfortune Cookie", name = "Misfortune Cookie",
text = { text = {
"{C:tarot}Tarot{} cards created", "Cards created by",
"by {C:tarot}Purple Seals", "{C:attention}Seals {}become {C:dark_edition}Negative",
"become {C:dark_edition}Negative",
}, },
}, },
j_Roland_monomino = { j_Roland_monomino = {

View file

@ -86,6 +86,28 @@ payload = """if next(SMODS.find_card "j_Roland_misfortune") then
end""" end"""
match_indent = true match_indent = true
[[patches]]
[patches.pattern]
target = "card.lua"
pattern = "if self.seal == 'Blue' and #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit and not self.ability.extra_enhancement then"
position = "at"
payload = """if self.seal == 'Blue' and
(next(SMODS.find_card "j_Roland_misfortune") or
#G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit and
not self.ability.extra_enhancement) then
"""
match_indent = true
[[patches]]
[patches.pattern]
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"
end"""
match_indent = true
[[patches]] [[patches]]
[patches.pattern] [patches.pattern]
target = "card.lua" target = "card.lua"

View file

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

View file

@ -575,7 +575,7 @@ joker {
key = "misfortune", key = "misfortune",
pronouns = "she_they", pronouns = "she_they",
artist = "char", artist = "char",
attributes = {"discard", "generation", "seals"}, attributes = {"discard", "passive", "tarot", "planet", "generation", "seals"},
cost = 6, cost = 6,
rarity = 2, rarity = 2,
eternal_compat = true, eternal_compat = true,
@ -583,12 +583,11 @@ joker {
perishable_compat = true, perishable_compat = true,
loc_vars = function(_, info_queue) loc_vars = function(_, info_queue)
table.insert(info_queue, G.P_SEALS.Purple) table.insert(info_queue, G.P_SEALS.Purple)
table.insert(info_queue, G.P_SEALS.Blue)
table.insert(info_queue, negative) table.insert(info_queue, negative)
end, end,
in_pool = function() in_pool = function()
return f(G.playing_cards):any(function(v) return not not f(G.playing_cards):map "seal":any(f.index_into {Blue = true, Purple = true})
return v.seal == "Purple"
end)
end, end,
} }

View file

@ -34,6 +34,9 @@ create_card_for_shop = create_card_for_shop
--- @type boolean|table --- @type boolean|table
G.Bakery_charm_area.cards[1].ability.extra = G.Bakery_charm_area.cards[1].ability.extra G.Bakery_charm_area.cards[1].ability.extra = G.Bakery_charm_area.cards[1].ability.extra
---@type Card[]
G.playing_cards = G.playing_cards
SMODS.Mods.Roland.config = require "config" SMODS.Mods.Roland.config = require "config"
---@type userdata|{getWidth: fun(self: self): number} ---@type userdata|{getWidth: fun(self: self): number}