Commit 3aec8474 authored by Huangnan's avatar Huangnan

fix

parent b8f80cdf
Pipeline #29965 passed with stages
in 37 minutes and 27 seconds
...@@ -22,6 +22,7 @@ function c33332306.initial_effect(c) ...@@ -22,6 +22,7 @@ function c33332306.initial_effect(c)
--tohand --tohand
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) e4:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCategory(CATEGORY_TOHAND) e4:SetCategory(CATEGORY_TOHAND)
e4:SetCode(EVENT_SUMMON_SUCCESS) e4:SetCode(EVENT_SUMMON_SUCCESS)
e4:SetCountLimit(1,id+o) e4:SetCountLimit(1,id+o)
......
...@@ -58,12 +58,12 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,12 +58,12 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp)
local ctype=bit.band(g:GetFirst():GetType(),TYPE_RITUAL+TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK) local ctype=bit.band(g:GetFirst():GetType(),TYPE_RITUAL+TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)
local dg=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil,e,tp,ctype,tgc) local dg=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e,tp,ctype,g:GetFirst())
Duel.HintSelection(g) Duel.HintSelection(g)
local tc=dg:GetFirst() local tc=dg:GetFirst()
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 then if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
if tc and Duel.SpecialSummonStep(tc,nil,tp,tp,true,false,POS_FACEUP)~=0 then if Duel.SpecialSummonStep(tc,nil,tp,tp,true,false,POS_FACEUP)~=0 then
local ra=g:GetFirst():GetRace() local ra=g:GetFirst():GetRace()
local att=g:GetFirst():GetAttribute() local att=g:GetFirst():GetAttribute()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -27,8 +27,7 @@ function cm.cfilter1(c) ...@@ -27,8 +27,7 @@ function cm.cfilter1(c)
return c:GetType()==TYPE_SPELL and c:IsAbleToRemoveAsCost() and c:CheckActivateEffect(true,true,false)~=nil return c:GetType()==TYPE_SPELL and c:IsAbleToRemoveAsCost() and c:CheckActivateEffect(true,true,false)~=nil
end end
function cm.cfilter2(c) function cm.cfilter2(c)
return (c:GetType()==TYPE_SPELL or c:IsType(TYPE_QUICKPLAY)) return c:IsType(TYPE_QUICKPLAY) and c:IsAbleToRemoveAsCost() and c:CheckActivateEffect(true,true,false)~=nil
and c:IsAbleToRemoveAsCost() and c:CheckActivateEffect(true,true,false)~=nil
end end
function cm.cfilterz(c) function cm.cfilterz(c)
return c:IsFaceup() and cm.Spiritualist(c) return c:IsFaceup() and cm.Spiritualist(c)
...@@ -38,13 +37,15 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -38,13 +37,15 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if not Duel.IsExistingMatchingCard(cm.cfilterz,tp,4,0,1,nil) then return end if not Duel.IsExistingMatchingCard(cm.cfilterz,tp,4,0,1,nil) then return end
cm_copy = false cm_copy = false
local g = {} local g = {}
local x = 0
if Duel.IsPlayerAffectedByEffect(tp,40011471) then if Duel.IsPlayerAffectedByEffect(tp,40011471) then
g=Duel.GetMatchingGroup(cm.cfilter2,tp,LOCATION_GRAVE,0,nil) g=Duel.GetMatchingGroup(cm.cfilter2,tp,LOCATION_GRAVE,0,nil)+Duel.GetMatchingGroup(cm.cfilter1,tp,LOCATION_GRAVE,0,nil)
x=1
else else
g=Duel.GetMatchingGroup(cm.cfilter1,tp,LOCATION_GRAVE,0,nil) g=Duel.GetMatchingGroup(cm.cfilter1,tp,LOCATION_GRAVE,0,nil)
end end
if #g<=0 then return end if #g<=0 then return end
if Duel.SelectYesNo(tp,aux.Stringid(m,1)) then if Duel.SelectYesNo(tp,aux.Stringid(m,1+x)) then
Duel.Hint(3,tp,HINTMSG_REMOVE) Duel.Hint(3,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.Remove(sg,POS_FACEUP,REASON_COST) Duel.Remove(sg,POS_FACEUP,REASON_COST)
...@@ -55,7 +56,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -55,7 +56,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end
te:SetLabelObject(e:GetLabelObject()) te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te) e:SetLabelObject(te)
Duel.ClearOperationInfo(0) Duel.ClearOperationInfo(0)
end end
end end
function cm.filter(c) function cm.filter(c)
......
...@@ -27,25 +27,26 @@ function cm.cfilter1(c) ...@@ -27,25 +27,26 @@ function cm.cfilter1(c)
return c:GetType()==TYPE_SPELL and c:IsAbleToRemoveAsCost() and c:CheckActivateEffect(true,true,false)~=nil return c:GetType()==TYPE_SPELL and c:IsAbleToRemoveAsCost() and c:CheckActivateEffect(true,true,false)~=nil
end end
function cm.cfilter2(c) function cm.cfilter2(c)
return (c:GetType()==TYPE_SPELL or c:IsType(TYPE_QUICKPLAY)) return c:IsType(TYPE_QUICKPLAY) and c:IsAbleToRemoveAsCost() and c:CheckActivateEffect(true,true,false)~=nil
and c:IsAbleToRemoveAsCost() and c:CheckActivateEffect(true,true,false)~=nil
end end
function cm.cfilterz(c) function cm.cfilterz(c)
return c:IsFaceup() and cm.Spiritualist(c) return c:IsFaceup() and cm.Spiritualist(c)
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
if not Duel.IsExistingMatchingCard(cm.cfilterz,tp,4,0,1,nil) then return end if not Duel.IsExistingMatchingCard(cm.cfilterz,tp,LOCATION_MZONE,0,1,nil) then return end
cm_copy = false cm_copy = false
local g = {} local g = {}
local x = 0
if Duel.IsPlayerAffectedByEffect(tp,40011471) then if Duel.IsPlayerAffectedByEffect(tp,40011471) then
g=Duel.GetMatchingGroup(cm.cfilter2,tp,LOCATION_GRAVE,0,nil) g=Duel.GetMatchingGroup(cm.cfilter2,tp,LOCATION_GRAVE,0,nil)+Duel.GetMatchingGroup(cm.cfilter1,tp,LOCATION_GRAVE,0,nil)
x=1
else else
g=Duel.GetMatchingGroup(cm.cfilter1,tp,LOCATION_GRAVE,0,nil) g=Duel.GetMatchingGroup(cm.cfilter1,tp,LOCATION_GRAVE,0,nil)
end end
if #g<=0 then return end if #g<=0 then return end
if Duel.SelectYesNo(tp,aux.Stringid(m,1)) then if Duel.SelectYesNo(tp,aux.Stringid(m,1+x)) then
Duel.Hint(3,tp,HINTMSG_REMOVE) Duel.Hint(3,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.Remove(sg,POS_FACEUP,REASON_COST) Duel.Remove(sg,POS_FACEUP,REASON_COST)
cm_copy = true cm_copy = true
...@@ -55,7 +56,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -55,7 +56,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end
te:SetLabelObject(e:GetLabelObject()) te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te) e:SetLabelObject(te)
Duel.ClearOperationInfo(0) Duel.ClearOperationInfo(0)
end end
end end
function cm.filter(c) function cm.filter(c)
......
...@@ -27,25 +27,26 @@ function cm.cfilter1(c) ...@@ -27,25 +27,26 @@ function cm.cfilter1(c)
return c:GetType()==TYPE_SPELL and c:IsAbleToRemoveAsCost() and c:CheckActivateEffect(true,true,false)~=nil return c:GetType()==TYPE_SPELL and c:IsAbleToRemoveAsCost() and c:CheckActivateEffect(true,true,false)~=nil
end end
function cm.cfilter2(c) function cm.cfilter2(c)
return (c:GetType()==TYPE_SPELL or c:IsType(TYPE_QUICKPLAY)) return c:IsType(TYPE_QUICKPLAY) and c:IsAbleToRemoveAsCost() and c:CheckActivateEffect(true,true,false)~=nil
and c:IsAbleToRemoveAsCost() and c:CheckActivateEffect(true,true,false)~=nil
end end
function cm.cfilterz(c) function cm.cfilterz(c)
return c:IsFaceup() and cm.Spiritualist(c) return c:IsFaceup() and cm.Spiritualist(c)
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
if not Duel.IsExistingMatchingCard(cm.cfilterz,tp,4,0,1,nil) then return end if not Duel.IsExistingMatchingCard(cm.cfilterz,tp,LOCATION_MZONE,0,1,nil) then return end
cm_copy = false cm_copy = false
local g = {} local g = {}
local x = 0
if Duel.IsPlayerAffectedByEffect(tp,40011471) then if Duel.IsPlayerAffectedByEffect(tp,40011471) then
g=Duel.GetMatchingGroup(cm.cfilter2,tp,LOCATION_GRAVE,0,nil) g=Duel.GetMatchingGroup(cm.cfilter2,tp,LOCATION_GRAVE,0,nil)+Duel.GetMatchingGroup(cm.cfilter1,tp,LOCATION_GRAVE,0,nil)
x=1
else else
g=Duel.GetMatchingGroup(cm.cfilter1,tp,LOCATION_GRAVE,0,nil) g=Duel.GetMatchingGroup(cm.cfilter1,tp,LOCATION_GRAVE,0,nil)
end end
if #g<=0 then return end if #g<=0 then return end
if Duel.SelectYesNo(tp,aux.Stringid(m,1)) then if Duel.SelectYesNo(tp,aux.Stringid(m,1+x)) then
Duel.Hint(3,tp,HINTMSG_REMOVE) Duel.Hint(3,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.Remove(sg,POS_FACEUP,REASON_COST) Duel.Remove(sg,POS_FACEUP,REASON_COST)
cm_copy = true cm_copy = true
...@@ -55,7 +56,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -55,7 +56,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end
te:SetLabelObject(e:GetLabelObject()) te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te) e:SetLabelObject(te)
Duel.ClearOperationInfo(0) Duel.ClearOperationInfo(0)
end end
end end
function cm.filter(c,e,tp) function cm.filter(c,e,tp)
......
...@@ -38,25 +38,26 @@ function cm.cfilter1(c) ...@@ -38,25 +38,26 @@ function cm.cfilter1(c)
return c:GetType()==TYPE_SPELL and c:IsAbleToRemoveAsCost() and c:CheckActivateEffect(true,true,false)~=nil return c:GetType()==TYPE_SPELL and c:IsAbleToRemoveAsCost() and c:CheckActivateEffect(true,true,false)~=nil
end end
function cm.cfilter2(c) function cm.cfilter2(c)
return (c:GetType()==TYPE_SPELL or c:IsType(TYPE_QUICKPLAY)) return c:IsType(TYPE_QUICKPLAY) and c:IsAbleToRemoveAsCost() and c:CheckActivateEffect(true,true,false)~=nil
and c:IsAbleToRemoveAsCost() and c:CheckActivateEffect(true,true,false)~=nil
end end
function cm.cfilterz(c) function cm.cfilterz(c)
return c:IsFaceup() and cm.Spiritualist(c) return c:IsFaceup() and cm.Spiritualist(c)
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
if not Duel.IsExistingMatchingCard(cm.cfilterz,tp,4,0,1,nil) then return end if not Duel.IsExistingMatchingCard(cm.cfilterz,tp,LOCATION_MZONE,0,1,nil) then return end
cm_copy = false cm_copy = false
local g = {} local g = {}
local x = 0
if Duel.IsPlayerAffectedByEffect(tp,40011471) then if Duel.IsPlayerAffectedByEffect(tp,40011471) then
g=Duel.GetMatchingGroup(cm.cfilter2,tp,LOCATION_GRAVE,0,nil) g=Duel.GetMatchingGroup(cm.cfilter2,tp,LOCATION_GRAVE,0,nil)+Duel.GetMatchingGroup(cm.cfilter1,tp,LOCATION_GRAVE,0,nil)
x=1
else else
g=Duel.GetMatchingGroup(cm.cfilter1,tp,LOCATION_GRAVE,0,nil) g=Duel.GetMatchingGroup(cm.cfilter1,tp,LOCATION_GRAVE,0,nil)
end end
if #g<=0 then return end if #g<=0 then return end
if Duel.SelectYesNo(tp,aux.Stringid(m,1)) then if Duel.SelectYesNo(tp,aux.Stringid(m,1+x)) then
Duel.Hint(3,tp,HINTMSG_REMOVE) Duel.Hint(3,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.Remove(sg,POS_FACEUP,REASON_COST) Duel.Remove(sg,POS_FACEUP,REASON_COST)
cm_copy = true cm_copy = true
...@@ -66,7 +67,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -66,7 +67,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end
te:SetLabelObject(e:GetLabelObject()) te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te) e:SetLabelObject(te)
Duel.ClearOperationInfo(0) Duel.ClearOperationInfo(0)
end end
end end
function cm.filter(c) function cm.filter(c)
......
...@@ -98,12 +98,12 @@ function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -98,12 +98,12 @@ function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function cm.spfilter(c,e,tp,ctype) function cm.spfilter(c,e,tp,ctype,tgc)
return c:IsType(ctype) and c:IsCanBeSpecialSummoned(e,nil,tp,true,true) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and cm.MagicCombineDemon(c) return c:IsType(ctype) and c:IsCanBeSpecialSummoned(e,nil,tp,true,true) and Duel.GetLocationCountFromEx(tp,tp,tgc,c)>0 and cm.MagicCombineDemon(c)
end end
function cm.tgfilter(c,e,tp) function cm.tgfilter(c,e,tp)
local ctype=bit.band(c:GetType(),TYPE_RITUAL+TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK) local ctype=bit.band(c:GetType(),TYPE_RITUAL+TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)
return c:IsFaceup() and ctype~=0 and c:IsAbleToGrave() and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp,ctype) return c:IsFaceup() and ctype~=0 and c:IsAbleToGrave() and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp,ctype,c)
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.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) end
...@@ -115,7 +115,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -115,7 +115,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp)
local ctype=bit.band(g:GetFirst():GetType(),TYPE_RITUAL+TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK) local ctype=bit.band(g:GetFirst():GetType(),TYPE_RITUAL+TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)
local dg=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil,e,tp,ctype) local dg=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e,tp,ctype,g:GetFirst())
Duel.HintSelection(g) Duel.HintSelection(g)
local tc=dg:GetFirst() local tc=dg:GetFirst()
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 then if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 then
......
...@@ -30,17 +30,19 @@ function cm.cfilterz(c) ...@@ -30,17 +30,19 @@ function cm.cfilterz(c)
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
if not Duel.IsExistingMatchingCard(cm.cfilterz,tp,4,0,1,nil) then return end if not Duel.IsExistingMatchingCard(cm.cfilterz,tp,LOCATION_MZONE,0,1,nil) then return end
cm_copy = false cm_copy = false
local g = {} local g = {}
local x = 0
if Duel.IsPlayerAffectedByEffect(tp,40011471) then if Duel.IsPlayerAffectedByEffect(tp,40011471) then
g=Duel.GetMatchingGroup(cm.cfilter2,tp,LOCATION_GRAVE,0,nil) g=Duel.GetMatchingGroup(cm.cfilter2,tp,LOCATION_GRAVE,0,nil)+Duel.GetMatchingGroup(cm.cfilter1,tp,LOCATION_GRAVE,0,nil)
x=1
else else
g=Duel.GetMatchingGroup(cm.cfilter1,tp,LOCATION_GRAVE,0,nil) g=Duel.GetMatchingGroup(cm.cfilter1,tp,LOCATION_GRAVE,0,nil)
end end
if #g<=0 then return end if #g<=0 then return end
if Duel.SelectYesNo(tp,aux.Stringid(m,1)) then if Duel.SelectYesNo(tp,aux.Stringid(m,1+x)) then
Duel.Hint(3,tp,HINTMSG_REMOVE) Duel.Hint(3,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.Remove(sg,POS_FACEUP,REASON_COST) Duel.Remove(sg,POS_FACEUP,REASON_COST)
cm_copy = true cm_copy = true
...@@ -50,7 +52,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -50,7 +52,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end
te:SetLabelObject(e:GetLabelObject()) te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te) e:SetLabelObject(te)
Duel.ClearOperationInfo(0) Duel.ClearOperationInfo(0)
end end
end end
function cm.filter(c) function cm.filter(c)
...@@ -73,6 +75,15 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,6 +75,15 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
if cm_copy then
cm_copy = false
local te=e:GetLabelObject()
if te then
e:SetLabelObject(te:GetLabelObject())
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
end
end
else else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
...@@ -80,6 +91,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -80,6 +91,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
Duel.BreakEffect() Duel.BreakEffect()
end
if cm_copy then if cm_copy then
cm_copy = false cm_copy = false
local te=e:GetLabelObject() local te=e:GetLabelObject()
...@@ -89,6 +101,5 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -89,6 +101,5 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if op then op(e,tp,eg,ep,ev,re,r,rp) end if op then op(e,tp,eg,ep,ev,re,r,rp) end
end end
end end
end
end end
end end
\ No newline at end of file
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