Commit 4fdc75bd authored by POLYMER's avatar POLYMER

fix

parent d5e1cd0f
...@@ -47,7 +47,7 @@ function cm.reop(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,7 +47,7 @@ function cm.reop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel() local ct=e:GetLabel()
local rep=c:IsStatus(STATUS_EFFECT_REPLACED) local rep=c:IsStatus(STATUS_EFFECT_REPLACED)
if c:IsRelateToEffect(e) and Duel.Remove(c,nil,REASON_EFFECT+REASON_TEMPORARY)~=0 and c:IsLocation(LOCATION_REMOVED) and not c:IsReason(REASON_REDIRECT) then if c:IsRelateToEffect(e) and Duel.Remove(c,nil,REASON_EFFECT+REASON_TEMPORARY)~=0 and c:IsLocation(LOCATION_REMOVED) and not c:IsReason(REASON_REDIRECT) then
if rep then c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3)) end --if rep then c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3)) end
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_MOVE) e2:SetCode(EVENT_MOVE)
......
...@@ -48,7 +48,7 @@ function cm.reop(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,7 +48,7 @@ function cm.reop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel() local ct=e:GetLabel()
local rep=c:IsStatus(STATUS_EFFECT_REPLACED) local rep=c:IsStatus(STATUS_EFFECT_REPLACED)
if c:IsRelateToEffect(e) and Duel.Remove(c,nil,REASON_EFFECT+REASON_TEMPORARY)~=0 and c:IsLocation(LOCATION_REMOVED) and not c:IsReason(REASON_REDIRECT) then if c:IsRelateToEffect(e) and Duel.Remove(c,nil,REASON_EFFECT+REASON_TEMPORARY)~=0 and c:IsLocation(LOCATION_REMOVED) and not c:IsReason(REASON_REDIRECT) then
if rep then c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3)) end --if rep then c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3)) end
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_MOVE) e2:SetCode(EVENT_MOVE)
......
...@@ -46,7 +46,7 @@ function cm.reop(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,7 +46,7 @@ function cm.reop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel() local ct=e:GetLabel()
local rep=c:IsStatus(STATUS_EFFECT_REPLACED) local rep=c:IsStatus(STATUS_EFFECT_REPLACED)
if c:IsRelateToEffect(e) and Duel.Remove(c,nil,REASON_EFFECT+REASON_TEMPORARY)~=0 and c:IsLocation(LOCATION_REMOVED) and not c:IsReason(REASON_REDIRECT) then if c:IsRelateToEffect(e) and Duel.Remove(c,nil,REASON_EFFECT+REASON_TEMPORARY)~=0 and c:IsLocation(LOCATION_REMOVED) and not c:IsReason(REASON_REDIRECT) then
if rep then c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3)) end --if rep then c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3)) end
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_MOVE) e2:SetCode(EVENT_MOVE)
......
...@@ -48,7 +48,7 @@ function cm.reop(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,7 +48,7 @@ function cm.reop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel() local ct=e:GetLabel()
local rep=c:IsStatus(STATUS_EFFECT_REPLACED) local rep=c:IsStatus(STATUS_EFFECT_REPLACED)
if c:IsRelateToEffect(e) and Duel.Remove(c,nil,REASON_EFFECT+REASON_TEMPORARY)~=0 and c:IsLocation(LOCATION_REMOVED) and not c:IsReason(REASON_REDIRECT) then if c:IsRelateToEffect(e) and Duel.Remove(c,nil,REASON_EFFECT+REASON_TEMPORARY)~=0 and c:IsLocation(LOCATION_REMOVED) and not c:IsReason(REASON_REDIRECT) then
if rep then c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3)) end --if rep then c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3)) end
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_MOVE) e2:SetCode(EVENT_MOVE)
......
...@@ -48,7 +48,7 @@ function cm.reop(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,7 +48,7 @@ function cm.reop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel() local ct=e:GetLabel()
local rep=c:IsStatus(STATUS_EFFECT_REPLACED) local rep=c:IsStatus(STATUS_EFFECT_REPLACED)
if c:IsRelateToEffect(e) and Duel.Remove(c,nil,REASON_EFFECT+REASON_TEMPORARY)~=0 and c:IsLocation(LOCATION_REMOVED) and not c:IsReason(REASON_REDIRECT) then if c:IsRelateToEffect(e) and Duel.Remove(c,nil,REASON_EFFECT+REASON_TEMPORARY)~=0 and c:IsLocation(LOCATION_REMOVED) and not c:IsReason(REASON_REDIRECT) then
if rep then c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3)) end --if rep then c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3)) end
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_MOVE) e2:SetCode(EVENT_MOVE)
......
...@@ -60,7 +60,7 @@ function cm.reop(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,7 +60,7 @@ function cm.reop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel() local ct=e:GetLabel()
local rep=c:IsStatus(STATUS_EFFECT_REPLACED) local rep=c:IsStatus(STATUS_EFFECT_REPLACED)
if c:IsRelateToEffect(e) and Duel.Remove(c,nil,REASON_EFFECT+REASON_TEMPORARY)~=0 and c:IsLocation(LOCATION_REMOVED) and not c:IsReason(REASON_REDIRECT) then if c:IsRelateToEffect(e) and Duel.Remove(c,nil,REASON_EFFECT+REASON_TEMPORARY)~=0 and c:IsLocation(LOCATION_REMOVED) and not c:IsReason(REASON_REDIRECT) then
if rep then c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3)) end --if rep then c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3)) end
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_MOVE) e2:SetCode(EVENT_MOVE)
......
...@@ -89,33 +89,35 @@ end ...@@ -89,33 +89,35 @@ end
function cm.disop(e,tp,eg,ep,ev,re,r,rp) function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local lastc=(#cm.chainout[1-Duel.GetTurnPlayer()]==0 and cm.chainout[c:GetControler()][(#cm.chainout[c:GetControler()])]==c) or (c:GetControler()==1-Duel.GetTurnPlayer() and cm.chainout[c:GetControler()][(#cm.chainout[c:GetControler()])]==c) local lastc=(#cm.chainout[1-Duel.GetTurnPlayer()]==0 and cm.chainout[c:GetControler()][(#cm.chainout[c:GetControler()])]==c) or (c:GetControler()==1-Duel.GetTurnPlayer() and cm.chainout[c:GetControler()][(#cm.chainout[c:GetControler()])]==c)
if c:IsHasEffect(m) and not lastc and e:GetCode()==EVENT_CHAIN_SOLVING then return end if not c:IsHasEffect(m) or e:GetCode()~=EVENT_CHAIN_SOLVING then
if Duel.Remove(c,0,REASON_EFFECT+REASON_TEMPORARY)~=0 and c:IsLocation(LOCATION_REMOVED) and not c:IsReason(REASON_REDIRECT) then --and c:GetOriginalCode()==m then --if e:GetCode()~=EVENT_CHAIN_SOLVING then Debug.Message(c:GetSequence()) end
if Duel.GetCurrentPhase()==PHASE_STANDBY then if Duel.Remove(c,0,REASON_EFFECT+REASON_TEMPORARY)~=0 and c:IsLocation(LOCATION_REMOVED) and not c:IsReason(REASON_REDIRECT) then --and c:GetOriginalCode()==m then
local tid=Duel.GetTurnCount() if Duel.GetCurrentPhase()==PHASE_STANDBY then
local e1=Effect.CreateEffect(e:GetHandler()) local tid=Duel.GetTurnCount()
e1:SetDescription(aux.Stringid(m,1)) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetDescription(aux.Stringid(m,1))
e1:SetCode(EVENT_PHASE+PHASE_STANDBY) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetReset(RESET_PHASE+PHASE_STANDBY,2) e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetLabelObject(c) e1:SetReset(RESET_PHASE+PHASE_STANDBY,2)
e1:SetCountLimit(1) e1:SetLabelObject(c)
e1:SetCondition(function() return Duel.GetTurnCount()~=tid end) e1:SetCountLimit(1)
e1:SetOperation(cm.retop) e1:SetCondition(function() return Duel.GetTurnCount()~=tid end)
Duel.RegisterEffect(e1,tp) e1:SetOperation(cm.retop)
else Duel.RegisterEffect(e1,tp)
local e1=Effect.CreateEffect(e:GetHandler()) else
e1:SetDescription(aux.Stringid(m,1)) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetDescription(aux.Stringid(m,1))
e1:SetCode(EVENT_PHASE+PHASE_STANDBY) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetReset(RESET_PHASE+PHASE_STANDBY) e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetLabelObject(c) e1:SetReset(RESET_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1) e1:SetLabelObject(c)
e1:SetOperation(cm.retop) e1:SetCountLimit(1)
Duel.RegisterEffect(e1,tp) e1:SetOperation(cm.retop)
Duel.RegisterEffect(e1,tp)
end
end end
end end
if c~=e:GetLabelObject() and lastc then --and (c:IsControler(1-Duel.GetTurnPlayer()) or not Duel.IsExistingMatchingCard(function(c) return c:IsFaceup() and c:IsType(TYPE_EFFECT) and not c:IsDisabled() end,Duel.GetTurnPlayer(),0,LOCATION_MZONE,1,nil)) then if lastc then --c~=e:GetLabelObject() and --and (c:IsControler(1-Duel.GetTurnPlayer()) or not Duel.IsExistingMatchingCard(function(c) return c:IsFaceup() and c:IsType(TYPE_EFFECT) and not c:IsDisabled() end,Duel.GetTurnPlayer(),0,LOCATION_MZONE,1,nil)) then
--cm.disop(c[c],tp,eg,ep,ev,re,r,rp) --cm.disop(c[c],tp,eg,ep,ev,re,r,rp)
Duel.RaiseEvent(c,EVENT_CUSTOM+m,re,r,rp,ep,ev) Duel.RaiseEvent(c,EVENT_CUSTOM+m,re,r,rp,ep,ev)
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