Skip to content

Commit

Permalink
destroying context passed to decks
Browse files Browse the repository at this point in the history
  • Loading branch information
Eremel committed Feb 21, 2025
1 parent 465928f commit 13731ce
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1664,6 +1664,12 @@ function SMODS.calculate_destroying_cards(context, cards_destroyed, scoring_hand
SMODS.trigger_effects({post}, card)
if self_destroy then destroyed = true end

local deck_effect = G.GAME.selected_back:trigger_effect(context)
if deck_effect then
self_destroy = SMODS.calculate_effect(deck_effect, G.deck.cards[1] or G.deck)
if self_destroy then destroyed = true end
end

-- TARGET: card destroyed

if destroyed then
Expand Down
2 changes: 1 addition & 1 deletion version.lua
Original file line number Diff line number Diff line change
@@ -1 +1 @@
return "1.0.0~ALPHA-1420a-STEAMODDED"
return "1.0.0~ALPHA-1421a-STEAMODDED"

0 comments on commit 13731ce

Please sign in to comment.