diff --git a/lovely/better_calc.toml b/lovely/better_calc.toml index 96b49938..cd15760d 100644 --- a/lovely/better_calc.toml +++ b/lovely/better_calc.toml @@ -887,12 +887,12 @@ for i=1, #G.hand.cards do -- TARGET: card held destroyed when hand played if destroyed then -- - if SMODS.shatters(G.play.cards[i]) then - G.play.cards[i].shattered = true + if SMODS.shatters(G.hand.cards[i]) then + G.hand.cards[i].shattered = true else - G.play.cards[i].destroyed = true + G.hand.cards[i].destroyed = true end - cards_destroyed[#cards_destroyed+1] = G.play.cards[i] + cards_destroyed[#cards_destroyed+1] = G.hand.cards[i] end end @@ -907,15 +907,17 @@ SMODS.calculate_context({scoring_hand = scoring_hand, remove_playing_cards = tru # context.remove_playing_cards from discard [[patches]] -[patches.regex] +[patches.pattern] target = "functions/state_events.lua" pattern = ''' -(?[\t ]*)for i = 1, #G\.jokers\.cards do -[/t ]* G\.jokers\.cards\[i\]:calculate_joker\(\{remove_playing_cards = true, removed = destroyed_cards\}\) -[/t ]*end +if destroyed_cards[1] then + for j=1, #G.jokers.cards do + eval_card(G.jokers.cards[j], {cardarea = G.jokers, remove_playing_cards = true, removed = destroyed_cards}) + end +end ''' position = "at" -line_prepend = '$indent' +match_indent = true payload = ''' -- context.remove_playing_cards from discard SMODS.calculate_context({remove_playing_cards = true, removed = destroyed_cards}) diff --git a/version.lua b/version.lua index 64cb9416..d62aa66f 100644 --- a/version.lua +++ b/version.lua @@ -1 +1 @@ -return "1.0.0~ALPHA-1311f-STEAMODDED" +return "1.0.0~ALPHA-1311g-STEAMODDED"