Commit 73a54c50 authored by 森野さくら's avatar 森野さくら 🐟

Replace c50221215.lua

parent 7adc6659
......@@ -24,7 +24,8 @@ function c50221215.tdfilter(c,e,tp)
and Duel.IsExistingMatchingCard(c50221215.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode(),c:GetLevel())
end
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)
return c:IsSetCard(0xcb1) and not c:IsCode(code) and c:IsLevel(lv) and c:IsType(TYPE_MONSTER)
and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function c50221215.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c50221215.tdfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
......@@ -35,12 +36,16 @@ 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()
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,tc:GetCode(),tc:GetLevel())
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
if tc then
local code=tc:GetCode()
local lv=tc:GetLevel()
if 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)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
end
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