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