Commit 1166b3da authored by GuGu's avatar GuGu

Update c22292101.lua

parent 959daee2
Pipeline #32832 passed with stage
in 7 seconds
...@@ -29,18 +29,18 @@ function c22292101.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -29,18 +29,18 @@ function c22292101.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2)) Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end end
end end
function c22292101.filter(c) function c22292101.filter(c,tp)
return c:GetType()==TYPE_TRAP and c22292101.IsSaihai(c) and c:IsAbleToGraveAsCost() and c:CheckActivateEffect(false,true,false)~=nil and Duel.IsExistingMatchingCard(c22292101.desfilter,tp,LOCATION_DECK,0,1,c) return c:GetType()==TYPE_TRAP and c22292101.IsSaihai(c) and c:IsAbleToGraveAsCost() and c:CheckActivateEffect(false,true,false)~=nil and Duel.IsExistingMatchingCard(c22292101.desfilter,tp,LOCATION_DECK,0,1,c)
end end
function c22292101.target(e,tp,eg,ep,ev,re,r,rp,chk) function c22292101.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
if e:GetLabel()==0 then return false end if e:GetLabel()==0 then return false end
e:SetLabel(0) e:SetLabel(0)
return Duel.IsExistingMatchingCard(c22292101.filter,tp,LOCATION_DECK,0,1,nil) return Duel.IsExistingMatchingCard(c22292101.filter,tp,LOCATION_DECK,0,1,nil,tp)
end end
e:SetLabel(0) e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c22292101.filter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c22292101.filter,tp,LOCATION_DECK,0,1,1,nil,tp)
local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(false,true,true) local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(false,true,true)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
e:SetProperty(te:GetProperty()) e:SetProperty(te:GetProperty())
......
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