Commit 6d90fdb8 authored by Amiya's avatar Amiya

修复

parent 97b6e96b
Pipeline #42539 passed with stages
in 1 minute and 44 seconds
No preview for this file type
...@@ -41,23 +41,30 @@ function s.filter(c) ...@@ -41,23 +41,30 @@ function s.filter(c)
or c:IsType(TYPE_LINK)) or c:IsType(TYPE_LINK))
and c:IsLocation(LOCATION_EXTRA) and c:IsLocation(LOCATION_EXTRA)
end end
function s.gcheck(g,tp,eft) function s.filter2(c)
return g:FilterCount(s.filter,nil)<=eft return c:IsLocation(LOCATION_EXTRA)
end
function s.filter3(c)
return not c:IsLocation(LOCATION_EXTRA)
end
function s.gcheck(g,tp,ft,eft,ect)
return g:FilterCount(s.filter,nil)<=eft and g:FilterCount(s.filter2,nil)<=ect
and g:FilterCount(s.filter3,nil)<=ect
end end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local eft=Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_PENDULUM) local eft=Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_PENDULUM)
if ft>0 then if ft>0 then
if ft>=2 then ft=2 end if ft>=2 then ft=2 end
if Duel.IsPlayerAffectedByEffect(tp,59822133) and ft>1 then ft=1 end local ct=2
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
local ect=(c29724053 and Duel.IsPlayerAffectedByEffect(tp,29724053) and c29724053[tp]) or ft local ect=(c29724053 and Duel.IsPlayerAffectedByEffect(tp,29724053) and c29724053[tp]) or ft
local loc=LOCATION_DECK local loc=LOCATION_DECK
if ect>0 then loc=loc+LOCATION_EXTRA end if ect>0 then loc=loc+LOCATION_EXTRA end
if ect<eft then eft=ect end
local g=Duel.GetMatchingGroup(s.spfilter,tp,loc,0,nil,e,tp) local g=Duel.GetMatchingGroup(s.spfilter,tp,loc,0,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,s.gcheck,false,1,ft,tp,eft) local sg=g:SelectSubGroup(tp,s.gcheck,false,1,ct,tp,ft,eft,ect)
if sg:GetCount()>0 then if sg:GetCount()>0 then
local exg=sg:Filter(s.filter,nil) local exg=sg:Filter(s.filter,nil)
sg:Sub(exg) sg:Sub(exg)
...@@ -66,6 +73,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,6 +73,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP) Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP)
end end
end end
local exg2=sg:Filter(s.filter2,nil)
sg:Sub(exg2)
if exg2:GetCount()>0 then
for tc in aux.Next(exg2) do
Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP)
end
end
if sg:GetCount()>0 then if sg:GetCount()>0 then
for tc in aux.Next(sg) do for tc in aux.Next(sg) do
Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP) Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP)
......
...@@ -67,8 +67,15 @@ function s.filter(c) ...@@ -67,8 +67,15 @@ function s.filter(c)
or c:IsType(TYPE_LINK)) or c:IsType(TYPE_LINK))
and c:IsLocation(LOCATION_EXTRA) and c:IsLocation(LOCATION_EXTRA)
end end
function s.gcheck(g,tp,eft) function s.filter2(c)
return g:FilterCount(s.filter,nil)<=eft return c:IsLocation(LOCATION_EXTRA)
end
function s.filter3(c)
return not c:IsLocation(LOCATION_EXTRA)
end
function s.gcheck(g,tp,ft,eft,ect)
return g:FilterCount(s.filter,nil)<=eft and g:FilterCount(s.filter2,nil)<=ect
and g:FilterCount(s.filter3,nil)<=ect
end end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==1 then if e:GetLabel()==1 then
...@@ -76,15 +83,15 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -76,15 +83,15 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
local eft=Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_PENDULUM) local eft=Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_PENDULUM)
if ft>0 then if ft>0 then
if ft>=2 then ft=2 end if ft>=2 then ft=2 end
if Duel.IsPlayerAffectedByEffect(tp,59822133) and ft>1 then ft=1 end local ct=2
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
local ect=(c29724053 and Duel.IsPlayerAffectedByEffect(tp,29724053) and c29724053[tp]) or ft local ect=(c29724053 and Duel.IsPlayerAffectedByEffect(tp,29724053) and c29724053[tp]) or ft
local loc=LOCATION_DECK local loc=LOCATION_DECK
if ect>0 then loc=loc+LOCATION_EXTRA end if ect>0 then loc=loc+LOCATION_EXTRA end
if ect<eft then eft=ect end
local g=Duel.GetMatchingGroup(s.spfilter,tp,loc,0,nil,e,tp) local g=Duel.GetMatchingGroup(s.spfilter,tp,loc,0,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,s.gcheck,false,1,ft,tp,eft) local sg=g:SelectSubGroup(tp,s.gcheck,false,1,ct,tp,ft,eft,ect)
if sg:GetCount()>0 then if sg:GetCount()>0 then
local exg=sg:Filter(s.filter,nil) local exg=sg:Filter(s.filter,nil)
sg:Sub(exg) sg:Sub(exg)
...@@ -93,6 +100,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -93,6 +100,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP) Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP)
end end
end end
local exg2=sg:Filter(s.filter2,nil)
sg:Sub(exg2)
if exg2:GetCount()>0 then
for tc in aux.Next(exg2) do
Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP)
end
end
if sg:GetCount()>0 then if sg:GetCount()>0 then
for tc in aux.Next(sg) do for tc in aux.Next(sg) do
Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP) Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP)
......
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