Commit abcf53cc authored by GuGu's avatar GuGu

Update c21033.lua

parent 222a0782
Pipeline #34598 passed with stage
in 14 seconds
......@@ -18,19 +18,19 @@ function c21033.filter(c,e,tp)
return (c:IsCode(21024) or c:IsCode(20061)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c21033.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.CheckReleaseGroup(1-tp,c21033.costfilter,1,nil)
if chk==0 then return Duel.CheckReleaseGroup(1-tp,c21033.costfilter,1,nil)
and Duel.IsExistingMatchingCard(c21033.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c21033.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectReleaseGroup(1-tp,c21033.costfilter,1,1,nil)
if Duel.Release(g,REASON_EFFECT)==0 then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.GetLocationCountFromEx(tp)<=0 then return end
if not Duel.CheckReleaseGroup(1-tp,c21033.costfilter,1,nil) then return end
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_RELEASE)
local g1=Duel.SelectReleaseGroup(1-tp,c21033.costfilter,1,1,nil)
Duel.Release(g1,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c21033.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
local tc=g:GetFirst()
local g2=Duel.SelectMatchingCard(tp,c21033.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g2:GetCount()>0 then
local tc=g2:GetFirst()
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
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