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