Commit 10013348 authored by Nemo Ma's avatar Nemo Ma

fix

parent bbab154b
...@@ -38,24 +38,28 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -38,24 +38,28 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
return true return true
end end
local g=aux.SelectSimultaneousEventGroup(eg,id+100,1,e,id+200)
Duel.SetTargetCard(g)
local opinfochk=false local opinfochk=false
local g=Duel.GetDecktopGroup(1-tp,1) local g=aux.SelectSimultaneousEventGroup(eg,id+100,1,e,id+200)
if g and #g>0 then if not g or #g==0 then
local tc=g:GetFirst() Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,0,LOCATION_MZONE)
if tc:IsPublic() or Duel.IsPlayerAffectedByEffect(tp,EFFECT_REVERSE_DECK) then else
opinfochk=true Duel.SetTargetCard(g)
if tc:IsSetCard(ARCHE_SEPIALIFE) then local g=Duel.GetDecktopGroup(1-tp,1)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,0,0) if g and #g>0 then
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,2) local tc=g:GetFirst()
else if tc:IsPublic() or Duel.IsPlayerAffectedByEffect(tp,EFFECT_REVERSE_DECK) then
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) opinfochk=true
if tc:IsSetCard(ARCHE_SEPIALIFE) then
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,2)
else
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
end end
end end
end end
if opinfochk then return end if opinfochk then return end
Duel.SetPossibleOperationInfo(0,CATEGORY_TODECK,g,#g,0,0) Duel.SetPossibleOperationInfo(0,CATEGORY_TODECK,g and g or nil,g and #g or 0,0,0)
Duel.SetPossibleOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,2) Duel.SetPossibleOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,2)
Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end end
...@@ -67,7 +71,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -67,7 +71,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=top:GetFirst() local tc=top:GetFirst()
if tc:IsSetCard(ARCHE_SEPIALIFE) then if tc:IsSetCard(ARCHE_SEPIALIFE) then
local og=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local og=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if not og or #og==0 then return end
local g=og:Filter(Card.IsRelateToChain,nil) local g=og:Filter(Card.IsRelateToChain,nil)
if #g==0 then return end
g:AddCard(tc) g:AddCard(tc)
local tg=g:Filter(Card.IsAbleToDeck,nil) local tg=g:Filter(Card.IsAbleToDeck,nil)
if #tg==#og+1 and Duel.ShuffleIntoDeck(tg,tp,nil,SEQ_DECKTOP)>0 then if #tg==#og+1 and Duel.ShuffleIntoDeck(tg,tp,nil,SEQ_DECKTOP)>0 then
......
...@@ -4004,7 +4004,14 @@ function Auxiliary.SelectSimultaneousEventGroup(g,flag,ct,e,excflag) ...@@ -4004,7 +4004,14 @@ function Auxiliary.SelectSimultaneousEventGroup(g,flag,ct,e,excflag)
if excflag then if excflag then
g=g:Filter(aux.NOT(Card.HasFlagEffectLabel),nil,excflag,fid) g=g:Filter(aux.NOT(Card.HasFlagEffectLabel),nil,excflag,fid)
end end
if #g>1 then if #g==0 then return end
if #g==1 then
Duel.HintSelection(g)
if excflag then
g:GetFirst():RegisterFlagEffect(excflag,RESET_CHAIN,0,1,fid)
end
return g
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local tg=g:SelectSubGroup(tp,aux.SimultaneousEventGroupCheck,false,ct,#g,flag,g) local tg=g:SelectSubGroup(tp,aux.SimultaneousEventGroupCheck,false,ct,#g,flag,g)
Duel.HintSelection(tg) Duel.HintSelection(tg)
...@@ -4014,12 +4021,6 @@ function Auxiliary.SelectSimultaneousEventGroup(g,flag,ct,e,excflag) ...@@ -4014,12 +4021,6 @@ function Auxiliary.SelectSimultaneousEventGroup(g,flag,ct,e,excflag)
end end
end end
return tg return tg
else
Duel.HintSelection(g)
if excflag then
g:GetFirst():RegisterFlagEffect(excflag,RESET_CHAIN,0,1,fid)
end
return 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