Commit 3f3aa080 authored by Chen Bill's avatar Chen Bill

fix: REASON_TEMPORARY remove

 remove card before iteration
parent 9d4adbd6
...@@ -51,13 +51,12 @@ function c37192109.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,13 +51,12 @@ function c37192109.rmop(e,tp,eg,ep,ev,re,r,rp)
local rct=1 local rct=1
if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_STANDBY then rct=2 end if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_STANDBY then rct=2 end
local og=Duel.GetOperatedGroup() local og=Duel.GetOperatedGroup()
if c:GetOriginalCode()~=id then
og:RemoveCard(c)
end
local oc=og:GetFirst() local oc=og:GetFirst()
while oc do while oc do
if oc==c and oc:GetOriginalCode()~=id then oc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,rct,fid)
og:RemoveCard(oc)
else
oc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,rct,fid)
end
oc=og:GetNext() oc=og:GetNext()
end end
og:KeepAlive() og:KeepAlive()
......
...@@ -59,13 +59,12 @@ function c74586817.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,13 +59,12 @@ function c74586817.rmop(e,tp,eg,ep,ev,re,r,rp)
if Duel.Remove(rg,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)~=0 then if Duel.Remove(rg,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)~=0 then
local fid=c:GetFieldID() local fid=c:GetFieldID()
local og=Duel.GetOperatedGroup() local og=Duel.GetOperatedGroup()
if c:GetOriginalCode()~=id then
og:RemoveCard(c)
end
local oc=og:GetFirst() local oc=og:GetFirst()
while oc do while oc do
if oc==c and oc:GetOriginalCode()~=id then oc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1,fid)
og:RemoveCard(oc)
else
oc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1,fid)
end
oc=og:GetNext() oc=og:GetNext()
end end
og:KeepAlive() og:KeepAlive()
......
...@@ -58,12 +58,11 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,12 +58,11 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Group.FromCards(tc,c) local g=Group.FromCards(tc,c)
if Duel.Remove(g,0,REASON_EFFECT+REASON_TEMPORARY)~=0 and g:IsExists(Card.IsLocation,1,nil,LOCATION_REMOVED) then if Duel.Remove(g,0,REASON_EFFECT+REASON_TEMPORARY)~=0 and g:IsExists(Card.IsLocation,1,nil,LOCATION_REMOVED) then
local og=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_REMOVED) local og=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_REMOVED)
if c:GetOriginalCode()~=id then
og:RemoveCard(c)
end
for oc in aux.Next(og) do for oc in aux.Next(og) do
if oc==c and oc:GetOriginalCode()~=id then oc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
og:RemoveCard(oc)
else
oc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
end end
og:KeepAlive() og:KeepAlive()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -71,13 +71,12 @@ function c80335817.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -71,13 +71,12 @@ function c80335817.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Group.FromCards(c,tc) local g=Group.FromCards(c,tc)
if Duel.Remove(g,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then if Duel.Remove(g,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then
local og=Duel.GetOperatedGroup() local og=Duel.GetOperatedGroup()
if c:GetOriginalCode()~=id then
og:RemoveCard(c)
end
local oc=og:GetFirst() local oc=og:GetFirst()
while oc do while oc do
if oc==c and oc:GetOriginalCode()~=id then oc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1)
og:RemoveCard(oc)
else
oc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1)
end
oc=og:GetNext() oc=og:GetNext()
end end
og:KeepAlive() og:KeepAlive()
......
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