Commit ed120ae8 authored by GuGu's avatar GuGu

Update c999510.lua

parent 54eacd14
Pipeline #29290 passed with stage
in 18 seconds
...@@ -42,6 +42,9 @@ end ...@@ -42,6 +42,9 @@ end
function M.synfilter(c, syncard, tuner, f) function M.synfilter(c, syncard, tuner, f)
return c:IsFaceup() and c:IsNotTuner(syncard) and c:IsCanBeSynchroMaterial(syncard, tuner) and (f==nil or f(c)) return c:IsFaceup() and c:IsNotTuner(syncard) and c:IsCanBeSynchroMaterial(syncard, tuner) and (f==nil or f(c))
end end
function M.synfilter2(c, syncard, tuner, f)
return c:IsNotTuner(syncard) and c:IsCanBeSynchroMaterial(syncard, tuner) and (f==nil or f(c))
end
function M.matfilter(c, mg, tp, lv, sync, addlv,flag) function M.matfilter(c, mg, tp, lv, sync, addlv,flag)
if flag and Duel.GetLocationCountFromEx(tp, tp, c, TYPE_SYNCHRO) < 1 then return false end if flag and Duel.GetLocationCountFromEx(tp, tp, c, TYPE_SYNCHRO) < 1 then return false end
...@@ -62,7 +65,14 @@ function M.syntg(e, syncard, f, minc, maxc) ...@@ -62,7 +65,14 @@ function M.syntg(e, syncard, f, minc, maxc)
if lv <= 0 then return false end if lv <= 0 then return false end
local tp = c:GetControler() local tp = c:GetControler()
local flag = Duel.GetLocationCountFromEx(tp, tp, c, TYPE_SYNCHRO) < 1 local flag = Duel.GetLocationCountFromEx(tp, tp, c, TYPE_SYNCHRO) < 1
local mg = Duel.GetMatchingGroup(M.synfilter, syncard:GetControler(), LOCATION_MZONE, LOCATION_MZONE, c, syncard, c, f)
--local mg = Duel.GetMatchingGroup(M.synfilter, syncard:GetControler(), LOCATION_MZONE, LOCATION_MZONE, c, syncard, c, f)
local mg=Duel.GetSynchroMaterial(syncard:GetControler()):Filter(M.synfilter,c,syncard,c,f)
if mg:IsExists(Card.GetHandSynchro,1,nil) then
local mg2=Duel.GetMatchingGroup(M.synfilter2,tp,LOCATION_HAND,0,c,syncard,c,f)
if mg2:GetCount()>0 then mg:Merge(mg2) end
end
local addlv = c:GetLevel() local addlv = c:GetLevel()
return mg:IsExists(M.matfilter, 1, c, mg, tp, lv, syncard, addlv, flag) return mg:IsExists(M.matfilter, 1, c, mg, tp, lv, syncard, addlv, flag)
end end
...@@ -70,7 +80,13 @@ end ...@@ -70,7 +80,13 @@ end
function M.synop(e,tp,eg,ep,ev,re,r,rp,syncard,f,minc,maxc) function M.synop(e,tp,eg,ep,ev,re,r,rp,syncard,f,minc,maxc)
local c = e:GetHandler() local c = e:GetHandler()
local tp = c:GetControler() local tp = c:GetControler()
local g = Duel.GetMatchingGroup(M.synfilter, syncard:GetControler(), LOCATION_MZONE, LOCATION_MZONE, c, syncard, c, f)
--local g = Duel.GetMatchingGroup(M.synfilter, syncard:GetControler(), LOCATION_MZONE, LOCATION_MZONE, c, syncard, c, f)
local g=Duel.GetSynchroMaterial(syncard:GetControler()):Filter(M.synfilter,c,syncard,c,f)
if g:IsExists(Card.GetHandSynchro,1,nil) then
local g2=Duel.GetMatchingGroup(M.synfilter2,tp,LOCATION_HAND,0,c,syncard,c,f)
if g2:GetCount()>0 then g:Merge(g2) end
end
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SMATERIAL) Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SMATERIAL)
local lv = syncard:GetLevel()-c:GetSynchroLevel(syncard) local lv = syncard:GetLevel()-c:GetSynchroLevel(syncard)
......
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