Commit 22d4dcc0 authored by Crescent/毛虫's avatar Crescent/毛虫

Fix 亜空間物質回送装置

parent d3ea9136
...@@ -38,6 +38,7 @@ function s.initial_effect(c) ...@@ -38,6 +38,7 @@ function s.initial_effect(c)
e5:SetRange(LOCATION_SZONE) e5:SetRange(LOCATION_SZONE)
e5:SetCode(EVENT_CHAIN_SOLVING) e5:SetCode(EVENT_CHAIN_SOLVING)
e5:SetCountLimit(1,id+o*2) e5:SetCountLimit(1,id+o*2)
e5:SetCondition(s.rmcon3)
e5:SetOperation(s.rmop3) e5:SetOperation(s.rmop3)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
...@@ -78,24 +79,27 @@ function s.rmop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -78,24 +79,27 @@ function s.rmop2(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(tc) Duel.ReturnToField(tc)
end end
end end
function s.rmop3(e,tp,eg,ep,ev,re,r,rp) function s.rmcon3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:GetFlagEffect(FLAG_ID_CHAINING)==0 then return end if c:GetFlagEffect(FLAG_ID_CHAINING)==0 then return false end
if ep==tp then return end if ep==tp then return false end
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if g and g:IsContains(c) then if not g or not g:IsContains(c)then return false end
if c:IsAbleToRemove() and Duel.Remove(c,0,REASON_EFFECT+REASON_TEMPORARY)~=0 and c:GetOriginalCode()==id then return true
local e1=Effect.CreateEffect(c) end
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) function s.rmop3(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EVENT_PHASE+PHASE_END) local c=e:GetHandler()
e1:SetReset(RESET_PHASE+PHASE_END,2) if c:IsAbleToRemove() and Duel.Remove(c,0,REASON_EFFECT+REASON_TEMPORARY)~=0 and c:GetOriginalCode()==id then
e1:SetLabel(Duel.GetTurnCount()) local e1=Effect.CreateEffect(c)
e1:SetLabelObject(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCountLimit(1) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetOperation(s.retop) e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp) e1:SetLabel(Duel.GetTurnCount())
end e1:SetLabelObject(c)
e1:SetCountLimit(1)
e1:SetOperation(s.retop)
Duel.RegisterEffect(e1,tp)
end end
end end
function s.retop(e,tp,eg,ep,ev,re,r,rp) function s.retop(e,tp,eg,ep,ev,re,r,rp)
......
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