Commit ddfb6688 authored by TanakaKotoha's avatar TanakaKotoha

wdnmd

parent f79ebd89
......@@ -11,7 +11,6 @@ function syuy.tograve(c,code,count,tg,op,cate)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,code)
e4:SetCondition(syuy.spcon)
e4:SetTarget(syuy.sptg)
e4:SetOperation(syuy.spop)
tc:RegisterEffect(e4)
......@@ -20,22 +19,19 @@ end
function syuy.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x52c4)
end
function syuy.spcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(syuy.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function syuy.filter(c,e,sp)
return c:IsCode(75640050) and c:IsCanBeSpecialSummoned(e,0,sp,false,false)
end
function syuy.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(syuy.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetMatchingGroupCount(cm.cfilter,tp,LOCATION_MZONE,0,nil)==0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function syuy.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.GetMatchingGroupCount(syuy.cfilter,tp,LOCATION_MZONE,0,nil)>0 then return end
if Duel.GetMatchingGroupCount(cm.cfilter,tp,LOCATION_MZONE,0,nil)>0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(syuy.filter),tp,LOCATION_HAND,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
......
......@@ -35,7 +35,7 @@ function cm.initial_effect(c)
end
--e1
function cm.cfilter2(c,tp)
return c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(tp,c)>0 and c:IsSetCard(0x52c4)
return c:IsReleasable() and Duel.GetMZoneCount(tp,c)>0 and c:IsSetCard(0x52c4)
end
function cm.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter2,tp,LOCATION_ONFIELD,0,1,nil,tp) end
......@@ -63,7 +63,7 @@ function cm.spop2(e,tp,eg,ep,ev,re,r,rp)
e3:SetLabel(fid)
e3:SetLabelObject(c)
e3:SetCondition(cm.thcon)
e3:SetOperation(cm.thop)
e3:SetOperation(cm.thop0)
Duel.RegisterEffect(e3,tp)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
......@@ -73,14 +73,14 @@ function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return false
else return true end
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
function cm.thop0(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,cm.spfilter0,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.spfilter0(c,e,tp)
return c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCode(m)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCode(m)
end
--e2
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
......
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