Commit d2e80698 authored by POLYMER's avatar POLYMER

fix

parent 2b81782a
...@@ -48,7 +48,6 @@ end ...@@ -48,7 +48,6 @@ end
function cm.pspcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.pspcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then if chk==0 then
if Duel.GetCurrentChain()<1 then return false end
if c:GetFlagEffect(m+1)>0 then return false end if c:GetFlagEffect(m+1)>0 then return false end
for i=1,Duel.GetCurrentChain() do for i=1,Duel.GetCurrentChain() do
local te,tep,loc,pos=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_POSITION) local te,tep,loc,pos=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_POSITION)
...@@ -94,6 +93,11 @@ function cm.psptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -94,6 +93,11 @@ function cm.psptg(e,tp,eg,ep,ev,re,r,rp,chk)
local lpz=Duel.GetFieldCard(tp,LOCATION_PZONE,0) local lpz=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
local rpz=Duel.GetFieldCard(tp,LOCATION_PZONE,1) local rpz=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
if chk==0 then if chk==0 then
if Duel.GetFlagEffect(tp,m)==0 then
Duel.Hint(HINT_OPSELECTED,tp,aux.Stringid(m,5))
Duel.RegisterFlagEffect(tp,m,RESET_CHAIN,0,1)
end
if Duel.GetCurrentChain()<1 then return false end
if c:GetFlagEffect(m+1)>0 then return false end if c:GetFlagEffect(m+1)>0 then return false end
local loc=0 local loc=0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 then loc=loc+LOCATION_HAND end if Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 then loc=loc+LOCATION_HAND end
......
...@@ -58,7 +58,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,7 +58,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,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
......
...@@ -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
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--xyz summon --xyz summon
aux.AddXyzProcedureLevelFree(c,aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON),nil,2,2,s.ovfilter,aux.Stringid(id,0),s.xyzop) aux.AddXyzProcedureLevelFree(c,s.mfilter,nil,2,2,s.ovfilter,aux.Stringid(id,0),s.xyzop)
c:EnableReviveLimit() c:EnableReviveLimit()
--pendulum summon --pendulum summon
aux.EnablePendulumAttribute(c,false) aux.EnablePendulumAttribute(c,false)
--pzone specialsummon --pzone specialsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,3)) e1:SetDescription(aux.Stringid(id,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
...@@ -21,7 +21,8 @@ function s.initial_effect(c) ...@@ -21,7 +21,8 @@ function s.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--remove --remove
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,4)) e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
...@@ -32,7 +33,7 @@ function s.initial_effect(c) ...@@ -32,7 +33,7 @@ function s.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--pendulum move --pendulum move
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,5)) e3:SetDescription(aux.Stringid(id,0))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END) e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
...@@ -43,6 +44,9 @@ function s.initial_effect(c) ...@@ -43,6 +44,9 @@ function s.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
s.pendulum_level=7 s.pendulum_level=7
function s.mfilter(c)
return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsXyzLevel(7)
end
function s.ovfilter(c) function s.ovfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_XYZ)
end end
...@@ -73,7 +77,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,7 +77,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
local mg=Group.FromCards(c) local mg=Group.FromCards(c)
local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp,c) local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp,c)
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=g:Select(tp,1,1,nil):GetFirst() local tc=g:Select(tp,1,1,nil):GetFirst()
if tc then if tc then
Duel.BreakEffect() Duel.BreakEffect()
...@@ -100,8 +104,10 @@ function s.pcop(e,tp,eg,ep,ev,re,r,rp) ...@@ -100,8 +104,10 @@ function s.pcop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,s.pcfilter,tp,LOCATION_EXTRA,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,s.pcfilter,tp,LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 and Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true) and c:IsOnField() and c:IsRelateToEffect(e) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true) local rg=c:GetColumnGroup()
rg:AddCard(c)
Duel.Remove(rg:Select(tp,1,1,nil),POS_FACEUP,REASON_EFFECT)
end end
end end
function s.filter(c) function s.filter(c)
......
...@@ -57,7 +57,6 @@ function c71400001.filter(c) ...@@ -57,7 +57,6 @@ function c71400001.filter(c)
end end
end end
--global part --global part
table=require("table")
function yume.AddYumeSummonLimit(c,ssm) function yume.AddYumeSummonLimit(c,ssm)
--1=special summon monster, 0=non special summon monster --1=special summon monster, 0=non special summon monster
ssm=ssm or 0 ssm=ssm or 0
......
--刚炼装勇士·银金后宫王 --刚炼装勇士·银金后宫王
function c79029517.initial_effect(c) function c79029517.initial_effect(c)
--extra material --extra material
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(79029517,0)) e1:SetDescription(aux.Stringid(79029517,0))
...@@ -63,7 +63,7 @@ function c79029517.initial_effect(c) ...@@ -63,7 +63,7 @@ function c79029517.initial_effect(c)
c:RegisterEffect(e6) c:RegisterEffect(e6)
end end
function c79029517.sprfilter(c,tp,g,sc) function c79029517.sprfilter(c,tp,g,sc)
return c:IsType(TYPE_PENDULUM) return c:IsType(TYPE_PENDULUM) and c:IsFaceup()
end end
function c79029517.linkcon(e,c) function c79029517.linkcon(e,c)
return Duel.IsExistingMatchingCard(c79029517.sprfilter,tp,LOCATION_MZONE+LOCATION_PZONE,0,4,nil) return Duel.IsExistingMatchingCard(c79029517.sprfilter,tp,LOCATION_MZONE+LOCATION_PZONE,0,4,nil)
......
...@@ -20,7 +20,7 @@ function c79029557.initial_effect(c) ...@@ -20,7 +20,7 @@ function c79029557.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_END_PHASE) e2:SetHintTiming(0,TIMING_END_PHASE+TIMINGS_CHECK_MONSTER)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,19029557) e2:SetCountLimit(1,19029557)
e2:SetCost(c79029557.ttcost) e2:SetCost(c79029557.ttcost)
...@@ -77,35 +77,35 @@ end ...@@ -77,35 +77,35 @@ end
function c79029557.ttop(e,tp,eg,ep,ev,re,r,rp) function c79029557.ttop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c79029557.ttfil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler(),Duel.GetTurnCount()) local g=Duel.GetMatchingGroup(c79029557.ttfil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler(),Duel.GetTurnCount())
if g:GetCount()>0 then if g:GetCount()<=0 then return end
local sg=g:Select(tp,1,99,nil) local sg=g:Select(tp,1,99,nil)
local tc=sg:GetFirst() local tc=sg:GetFirst()
while tc do while tc do
local loc=tc:GetPreviousLocation() local loc=tc:GetPreviousLocation()
local p=tc:GetPreviousControler() local p=tc:GetPreviousControler()
if bit.band(loc,LOCATION_HAND)~=0 then if bit.band(loc,LOCATION_HAND)~=0 then
Duel.SendtoHand(tc,p,REASON_EFFECT+REASON_RULE) Duel.SendtoHand(tc,p,REASON_EFFECT+REASON_RULE)
elseif bit.band(loc,LOCATION_DECK)~=0 then elseif bit.band(loc,LOCATION_DECK)~=0 then
Duel.SendtoDeck(tc,p,2,REASON_EFFECT+REASON_RULE) Duel.SendtoDeck(tc,p,2,REASON_EFFECT+REASON_RULE)
elseif bit.band(loc,LOCATION_EXTRA)~=0 then elseif bit.band(loc,LOCATION_EXTRA)~=0 then
if tc:IsPreviousPosition(POS_FACEUP) then if tc:IsPreviousPosition(POS_FACEUP) then
Duel.SendtoExtraP(tc,p,REASON_EFFECT+REASON_RULE) Duel.SendtoExtraP(tc,p,REASON_EFFECT+REASON_RULE)
else else
Duel.SendtoDeck(tc,p,2,REASON_EFFECT+REASON_RULE) Duel.SendtoDeck(tc,p,2,REASON_EFFECT+REASON_RULE)
end end
elseif bit.band(loc,LOCATION_GRAVE)~=0 then elseif bit.band(loc,LOCATION_GRAVE)~=0 then
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_RULE) Duel.SendtoGrave(tc,REASON_EFFECT+REASON_RULE)
elseif bit.band(loc,LOCATION_REMOVED)~=0 then elseif bit.band(loc,LOCATION_REMOVED)~=0 then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_RULE) Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_RULE)
else else
Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT+REASON_RULE) Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT+REASON_RULE)
end end
tc=sg:GetNext() tc=sg:GetNext()
end end
if Duel.IsExistingMatchingCard(Card.IsCanBeBattleTarget,tp,0,LOCATION_MZONE,1,nil,c) and Duel.SelectYesNo(tp,aux.Stringid(79029557,1)) then if Duel.IsExistingMatchingCard(Card.IsCanBeBattleTarget,tp,0,LOCATION_MZONE,1,nil,c) and Duel.SelectYesNo(tp,aux.Stringid(79029557,1)) then
local bc=Duel.SelectMatchingCard(tp,Card.IsCanBeBattleTarget,tp,0,LOCATION_MZONE,1,1,nil,c):GetFirst() Duel.BreakEffect()
Duel.CalculateDamage(c,bc) local bc=Duel.SelectMatchingCard(tp,Card.IsCanBeBattleTarget,tp,0,LOCATION_MZONE,1,1,nil,c):GetFirst()
end Duel.CalculateDamage(c,bc)
end end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
......
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