Commit afdc3306 authored by 聖園ミカ's avatar 聖園ミカ 🐟

Replace c50221215.lua

parent 89370287
Pipeline #31184 failed with stages
in 27 minutes
......@@ -27,26 +27,18 @@ function c50221215.spfilter(c,e,tp,code,lv)
return c:IsSetCard(0xcb1) and not c:IsCode(code) and c:IsLevel(lv) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function c50221215.target(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100,0,0)
local check,code,lv=e:GetLabel()
if chk==0 then
if check~=100 then return false end
e:SetLabel(0,0,0)
return Duel.IsExistingMatchingCard(c50221215.tdfilter,tp,LOCATION_MZONE,0,1,nil,e,tp)
end
if chk==0 then return Duel.IsExistingMatchingCard(c50221215.tdfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c50221215.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tc=Duel.SelectMatchingCard(tp,c50221215.tdfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp):GetFirst()
e:SetLabel(0,tc:GetCode(),tc:GetLevel())
local c=e:GetHandler()
local check,code,lv=e:GetLabel()
if Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA)
if tc and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c50221215.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,code,lv)
local g=Duel.SelectMatchingCard(tp,c50221215.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,tc:GetCode(),tc:GetLevel())
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
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