Commit 13372a73 authored by TanakaKotoha's avatar TanakaKotoha

fix

parent 34202027
...@@ -36,7 +36,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -36,7 +36,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(500) e1:SetValue(500)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
......
...@@ -38,19 +38,19 @@ end ...@@ -38,19 +38,19 @@ end
function cm.target(e,c) function cm.target(e,c)
return c:IsFaceup() and cm.IsMillion_Arthur(c) and c:IsSummonType(SUMMON_TYPE_PENDULUM) return c:IsFaceup() and cm.IsMillion_Arthur(c) and c:IsSummonType(SUMMON_TYPE_PENDULUM)
end end
function cm.filter(c) function cm.resfilter(c)
return c:IsType(TYPE_PENDULUM) and c:IsReleasable() return c:IsType(TYPE_PENDULUM) and c:IsReleasable()
end end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_ONFIELD,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.resfilter,tp,LOCATION_ONFIELD,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler()) local g=Duel.SelectMatchingCard(tp,cm.resfilter,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler())
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function cm.filter(c) function cm.tgfilter(c)
return cm.IsMillion_Arthur(c) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() return cm.IsMillion_Arthur(c) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,e:GetHandler()) if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,e:GetHandler())
and Duel.GetMZoneCount(tp)>-1 and Duel.GetMZoneCount(tp)>-1
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
...@@ -59,7 +59,7 @@ end ...@@ -59,7 +59,7 @@ end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,c) local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,c)
local tc=g:GetFirst() local tc=g:GetFirst()
if Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) and c:IsRelateToEffect(e) then if Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) and c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
......
...@@ -56,11 +56,10 @@ function cm.PD(c) ...@@ -56,11 +56,10 @@ function cm.PD(c)
return c:IsSetCard(0xa83) and c:IsType(TYPE_MONSTER) return c:IsSetCard(0xa83) and c:IsType(TYPE_MONSTER)
end end
--e4 --e4
--e4
function cm.filter1(c) function cm.filter1(c)
return c:IsFaceup() and c:IsSetCard(0xa83) and c:IsType(TYPE_SYNCHRO) return c:IsFaceup() and c:IsSetCard(0xa83) and c:IsType(TYPE_SYNCHRO)
end end
function cm.spcon(e,c) function cm.spcon(e,tp)
if c==nil then return true end return Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and end
Duel.IsExistingMatchingCard(cm.filter1,c:GetControler(),LOCATION_MZONE,0,1,nil) \ No newline at end of file
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