Commit c57996d9 authored by nanahira's avatar nanahira

fix

parent ff5b4c71
......@@ -19,21 +19,21 @@ function cm.initial_effect(c)
e1:SetRange(LOCATION_SZONE)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and eg:IsExists(function(c)
return not c:IsReason(REASON_DRAW)
return eg:IsExists(function(c)
return not c:IsReason(REASON_DRAW) and c:GetReasonPlayer()==tp
end,1,nil)
end)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=eg:Filter(function(c)
return c:IsAbleToRemove() and not c:IsReason(REASON_DRAW)
return c:IsAbleToRemove() and not c:IsReason(REASON_DRAW) and c:GetReasonPlayer()==tp
end,nil)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0)
end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(function(c)
return c:IsAbleToRemove() and not c:IsReason(REASON_DRAW) and c:IsRelateToEffect(e)
return c:IsAbleToRemove() and not c:IsReason(REASON_DRAW) and c:IsRelateToEffect(e) and c:GetReasonPlayer()==tp
end,nil)
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
end)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment