Commit d5787c21 authored by GuGu's avatar GuGu

Update c4031201.lua

parent cb59d685
Pipeline #33281 passed with stage
in 7 seconds
......@@ -15,28 +15,29 @@ function c4031201.filter(c)
return c:IsSetCard(0x403) and c:IsAbleToDeckAsCost() and c:IsType(TYPE_MONSTER)
end
function c4031201.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c4031201.filter,tp,LOCATION_REMOVED,0,5,nil)
and Duel.GetLocationCountFromEx(tp)>0 end
if chk==0 then return Duel.IsExistingMatchingCard(c4031201.filter,tp,LOCATION_REMOVED,0,5,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c4031201.filter,tp,LOCATION_REMOVED,0,5,5,nil)
Duel.SendtoDeck(g,nil,5,REASON_COST)
end
function c4031201.filter2(c,e,tp)
return c:IsLevelBelow(10) and c:IsType(TYPE_SYNCHRO)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c4031201.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c4031201.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
if chk==0 then return Duel.IsExistingMatchingCard(c4031201.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c4031201.scop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if not Duel.IsExistingMatchingCard(c4031201.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c4031201.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)
tc:CompleteProcedure()
tc:SetMaterial(nil)
if Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then
tc:CompleteProcedure()
end
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