Skip to content

Commit 9c43364

Browse files
committed
Added CCD compat to Ritual
1 parent 10096c4 commit 9c43364

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

items/spectral.lua

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -713,16 +713,15 @@ local ritual = {
713713
atlas = "atlasnotjokers",
714714
pos = { x = 5, y = 1 },
715715
can_use = function(self, card)
716-
--TODO: CCD card compat
717-
if #G.hand.highlighted > card.ability.max_highlighted then
718-
return false
719-
end
720-
for _, v in ipairs(G.hand.highlighted) do
721-
if v.edition then
722-
return false
716+
if card.area ~= G.hand then
717+
return G.hand and (#G.hand.highlighted == 1) and G.hand.highlighted[1] and (not G.hand.highlighted[1].edition)
718+
else
719+
local idx = 1
720+
if G.hand.highlighted[1] == card then
721+
idx = 2
723722
end
723+
return (#G.hand.highlighted == 2) and (not G.hand.highlighted[idx].edition)
724724
end
725-
return true
726725
end,
727726
use = function(self, card, area, copier)
728727
local used_consumable = copier or card

0 commit comments

Comments
 (0)