Commit 533ab500 authored by Amiya's avatar Amiya

修复

parent 6d90fdb8
Pipeline #42540 passed with stages
in 2 minutes and 5 seconds
...@@ -44,15 +44,11 @@ end ...@@ -44,15 +44,11 @@ end
function s.filter2(c) function s.filter2(c)
return c:IsLocation(LOCATION_EXTRA) return c:IsLocation(LOCATION_EXTRA)
end end
function s.filter3(c) function s.gcheck(g,tp,eft,ect)
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 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.GetUsableMZoneCount(tp)
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
...@@ -64,7 +60,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,7 +60,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
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,ct,tp,ft,eft,ect) local sg=g:SelectSubGroup(tp,s.gcheck,false,1,ct,tp,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)
......
...@@ -70,16 +70,12 @@ end ...@@ -70,16 +70,12 @@ end
function s.filter2(c) function s.filter2(c)
return c:IsLocation(LOCATION_EXTRA) return c:IsLocation(LOCATION_EXTRA)
end end
function s.filter3(c) function s.gcheck(g,tp,eft,ect)
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 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
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetUsableMZoneCount(tp)
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
...@@ -91,7 +87,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -91,7 +87,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
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,ct,tp,ft,eft,ect) local sg=g:SelectSubGroup(tp,s.gcheck,false,1,ct,tp,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)
......
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