Commit be18f167 authored by VanillaSalt's avatar VanillaSalt

update

parent d8436e71
...@@ -30,7 +30,6 @@ function c98978921.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -30,7 +30,6 @@ function c98978921.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c98978921.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp,zone) local g=Duel.SelectMatchingCard(tp,c98978921.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp,zone)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummonStep(g:GetFirst(),0,tp,tp,false,false,POS_FACEUP,zone) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP,zone)
Duel.SpecialSummonComplete()
end end
end end
...@@ -1569,13 +1569,18 @@ function Auxiliary.PendCondition() ...@@ -1569,13 +1569,18 @@ function Auxiliary.PendCondition()
local lscale=c:GetLeftScale() local lscale=c:GetLeftScale()
local rscale=rpz:GetRightScale() local rscale=rpz:GetRightScale()
if lscale>rscale then lscale,rscale=rscale,lscale end if lscale>rscale then lscale,rscale=rscale,lscale end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft1,ft2=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return false end local loc=0
if ft1>0 then loc=loc+LOCATION_HAND end
if ft2>0 then loc=loc+LOCATION_EXTRA end
if loc==0 then return false end
local g=nil
if og then if og then
return og:IsExists(Auxiliary.PConditionFilter,1,nil,e,tp,lscale,rscale) g=og:Filter(Card.IsLocation,nil,loc)
else else
return Duel.IsExistingMatchingCard(Auxiliary.PConditionFilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,1,nil,e,tp,lscale,rscale) g=Duel.GetFieldGroup(tp,loc,0)
end end
return g:IsExists(Auxiliary.PConditionFilter,1,nil,e,tp,lscale,rscale)
end end
end end
function Auxiliary.PendOperation() function Auxiliary.PendOperation()
...@@ -1584,34 +1589,46 @@ function Auxiliary.PendOperation() ...@@ -1584,34 +1589,46 @@ function Auxiliary.PendOperation()
local lscale=c:GetLeftScale() local lscale=c:GetLeftScale()
local rscale=rpz:GetRightScale() local rscale=rpz:GetRightScale()
if lscale>rscale then lscale,rscale=rscale,lscale end if lscale>rscale then lscale,rscale=rscale,lscale end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft1,ft2,ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local loc=0
if ft1>0 then loc=loc+LOCATION_HAND end
if ft2>0 then loc=loc+LOCATION_EXTRA end
local tg=nil local tg=nil
if og then if og then
tg=og:Filter(Auxiliary.PConditionFilter,nil,e,tp,lscale,rscale) tg=og:Filter(Card.IsLocation,nil,loc):Filter(Auxiliary.PConditionFilter,nil,e,tp,lscale,rscale)
else else
tg=Duel.GetMatchingGroup(Auxiliary.PConditionFilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,nil,e,tp,lscale,rscale) tg=Duel.GetMatchingGroup(Auxiliary.PConditionFilter,tp,loc,0,nil,e,tp,lscale,rscale)
end end
ft1=math.min(ft1,tg:FilterCount(Card.IsLocation,nil,LOCATION_HAND))
ft2=math.min(ft2,tg:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA))
local ect=c29724053 and Duel.IsPlayerAffectedByEffect(tp,29724053) and c29724053[tp] local ect=c29724053 and Duel.IsPlayerAffectedByEffect(tp,29724053) and c29724053[tp]
if ect and (ect<=0 or ect>ft) then ect=nil end if ect and ect<ft2 then ft2=ect end
if ect==nil or tg:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA)<=ect then while true do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local ct=math.min(ft1,ft2,ft)
local g=tg:Select(tp,1,ft,nil) if ct<=0 then break end
sg:Merge(g) if sg:GetCount()>0 and not Duel.SelectYesNo(tp,210) then ft=0 break end
else
repeat
local ct=math.min(ft,ect)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=tg:Select(tp,1,ct,nil) local g=tg:Select(tp,1,ct,nil)
tg:Sub(g) tg:Sub(g)
sg:Merge(g) sg:Merge(g)
ft=ft-g:GetCount() ft=ft-g:GetCount()
ect=ect-g:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA) ft1=ft1-g:FilterCount(Card.IsLocation,nil,LOCATION_HAND)
until ft==0 or ect==0 or not Duel.SelectYesNo(tp,210) ft2=ft2-g:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA)
local hg=tg:Filter(Card.IsLocation,nil,LOCATION_HAND) end
if ft>0 and ect==0 and hg:GetCount()>0 and Duel.SelectYesNo(tp,210) then if ft>0 then
local tg1=tg:Filter(Card.IsLocation,nil,LOCATION_HAND)
local tg2=tg:Filter(Card.IsLocation,nil,LOCATION_EXTRA)
if ft1>0 and ft2==0 and tg1:GetCount()>0 and (sg:GetCount()==0 or Duel.SelectYesNo(tp,210)) then
local ct=math.min(ft1,ft)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=tg1:Select(tp,1,ct,nil)
sg:Merge(g)
end
if ft1==0 and ft2>0 and tg2:GetCount()>0 and (sg:GetCount()==0 or Duel.SelectYesNo(tp,210)) then
local ct=math.min(ft2,ft)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=hg:Select(tp,1,ft,nil) local g=tg2:Select(tp,1,ct,nil)
sg:Merge(g) sg:Merge(g)
end end
end end
......
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