Commit 3c7675c7 authored by GuGu's avatar GuGu

Update c28011.lua

parent 0681b280
Pipeline #42389 passed with stage
in 9 seconds
......@@ -58,18 +58,15 @@ end
function c28011.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
--c:CompleteProcedure()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c28011.cfilter(c)
function c28011.cfilter(c,tp)
local b1=c:IsSetCard(0x208) and Duel.IsExistingMatchingCard(c28011.filter2,tp,0,LOCATION_MZONE,1,nil)
local b2=not c:IsSetCard(0x208) and Duel.IsExistingMatchingCard(c28011.filter1,tp,0,LOCATION_MZONE,1,nil)
return not c:IsPublic() and (b1 or b2)
end
function c28011.jfilter(c)
return c28011.filter1(c) or c28011.filter2(c)
end
function c28011.filter1(c)
return c:IsSetCard(0x208) and c:IsAbleToRemove() and c:IsFaceup()
end
......@@ -77,13 +74,12 @@ function c28011.filter2(c)
return (not c:IsSetCard(0x208) and c:IsDestructable() and c:IsFaceup()) or c:IsFacedown()
end
function c28011.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c28011.cfilter,tp,LOCATION_HAND,0,1,nil)
and Duel.IsExistingMatchingCard(c28011.jfilter,tp,0,LOCATION_MZONE,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(c28011.cfilter,tp,LOCATION_HAND,0,1,nil,tp) end
end
function c28011.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c28011.cfilter,tp,LOCATION_HAND,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c28011.cfilter,tp,LOCATION_HAND,0,1,1,nil,tp)
if g:GetCount()>0 then
Duel.ConfirmCards(1-tp,g)
if g:GetFirst():IsSetCard(0x208) then
......
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