Commit f24eb499 authored by DailyShana's avatar DailyShana

fix

for Duel.NegateEffect
parent c96a7604
...@@ -29,9 +29,10 @@ end ...@@ -29,9 +29,10 @@ end
function c11067666.operation(e,tp,eg,ep,ev,re,r,rp) function c11067666.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(11067666,0)) then if Duel.SelectYesNo(tp,aux.Stringid(11067666,0)) then
e:GetHandler():RegisterFlagEffect(11067666,RESET_EVENT+0x1fe0000,0,1) e:GetHandler():RegisterFlagEffect(11067666,RESET_EVENT+0x1fe0000,0,1)
Duel.NegateEffect(ev) if Duel.NegateEffect(ev) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Destroy(e:GetHandler(),REASON_EFFECT) Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
end end
end end
function c11067666.rmcon(e,tp,eg,ep,ev,re,r,rp) function c11067666.rmcon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -25,8 +25,7 @@ function c13166204.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -25,8 +25,7 @@ function c13166204.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
end end
function c13166204.activate(e,tp,eg,ep,ev,re,r,rp) function c13166204.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev) if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(re:GetHandler(),REASON_EFFECT)~=0 then
if re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(re:GetHandler(),REASON_EFFECT)~=0 then
Duel.BreakEffect() Duel.BreakEffect()
local a=re:GetHandler():GetAttack() local a=re:GetHandler():GetAttack()
local b=re:GetHandler():GetDefense() local b=re:GetHandler():GetDefense()
......
...@@ -56,8 +56,7 @@ function c15155568.distg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -56,8 +56,7 @@ function c15155568.distg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
end end
function c15155568.disop(e,tp,eg,ep,ev,re,r,rp) function c15155568.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev) if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT) Duel.Destroy(eg,REASON_EFFECT)
end end
end end
...@@ -41,7 +41,7 @@ end ...@@ -41,7 +41,7 @@ end
function c19302550.disop(e,tp,eg,ep,ev,re,r,rp) function c19302550.disop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.SelectYesNo(tp,aux.Stringid(19302550,1)) then return end if not Duel.SelectYesNo(tp,aux.Stringid(19302550,1)) then return end
e:GetHandler():RegisterFlagEffect(19302550,RESET_EVENT+0x1fe0000,0,1) e:GetHandler():RegisterFlagEffect(19302550,RESET_EVENT+0x1fe0000,0,1)
Duel.NegateEffect(ev) if not Duel.NegateEffect(ev) then return end
Duel.BreakEffect() Duel.BreakEffect()
Duel.Destroy(e:GetHandler(),REASON_EFFECT) Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end end
......
...@@ -50,8 +50,7 @@ function c1953925.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,8 +50,7 @@ function c1953925.disop(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if g and g:IsContains(e:GetHandler()) then if g and g:IsContains(e:GetHandler()) then
Duel.NegateEffect(ev) if Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) then
if rc:IsRelateToEffect(re) then
Duel.Destroy(rc,REASON_EFFECT) Duel.Destroy(rc,REASON_EFFECT)
end end
end end
......
...@@ -55,6 +55,7 @@ function c19596712.negcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,6 +55,7 @@ function c19596712.negcon(e,tp,eg,ep,ev,re,r,rp)
and re:IsActiveType(TYPE_TRAP) and Duel.IsChainDisablable(ev) and re:IsActiveType(TYPE_TRAP) and Duel.IsChainDisablable(ev)
end end
function c19596712.negop(e,tp,eg,ep,ev,re,r,rp) function c19596712.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev) if Duel.NegateEffect(ev) then
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)
end
end end
...@@ -89,8 +89,7 @@ function c24696097.distg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -89,8 +89,7 @@ function c24696097.distg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
end end
function c24696097.disop(e,tp,eg,ep,ev,re,r,rp) function c24696097.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev) if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT) Duel.Destroy(eg,REASON_EFFECT)
end end
end end
......
...@@ -58,7 +58,7 @@ function c26268488.distg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -58,7 +58,7 @@ function c26268488.distg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c26268488.disop(e,tp,eg,ep,ev,re,r,rp) function c26268488.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev) if not Duel.NegateEffect(ev) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -59,8 +59,7 @@ end ...@@ -59,8 +59,7 @@ end
function c26964762.disop(e,tp,eg,ep,ev,re,r,rp) function c26964762.disop(e,tp,eg,ep,ev,re,r,rp)
if rp==tp and re:IsActiveType(TYPE_SPELL) then if rp==tp and re:IsActiveType(TYPE_SPELL) then
local rc=re:GetHandler() local rc=re:GetHandler()
Duel.NegateEffect(ev) if Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) then
if rc:IsRelateToEffect(re) then
Duel.Destroy(rc,REASON_EFFECT) Duel.Destroy(rc,REASON_EFFECT)
end end
end end
......
...@@ -41,8 +41,7 @@ end ...@@ -41,8 +41,7 @@ end
function c29616929.activate(e,tp,eg,ep,ev,re,r,rp) function c29616929.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler() local tc=re:GetHandler()
if not tc:IsDisabled() then if not tc:IsDisabled() then
Duel.NegateEffect(ev) if Duel.NegateEffect(ev) and tc:IsRelateToEffect(re) then
if tc:IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT) Duel.Destroy(eg,REASON_EFFECT)
end end
end end
......
...@@ -33,8 +33,9 @@ end ...@@ -33,8 +33,9 @@ end
function c32134638.negop(e,tp,eg,ep,ev,re,r,rp) function c32134638.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(32134638,1)) then if Duel.SelectYesNo(tp,aux.Stringid(32134638,1)) then
e:GetHandler():RegisterFlagEffect(32134638,RESET_EVENT+0x1fe0000,0,1) e:GetHandler():RegisterFlagEffect(32134638,RESET_EVENT+0x1fe0000,0,1)
Duel.NegateEffect(ev) if Duel.NegateEffect(ev) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Destroy(e:GetHandler(),REASON_EFFECT) Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
end end
end end
...@@ -19,6 +19,7 @@ function c33784505.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -19,6 +19,7 @@ function c33784505.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function c33784505.activate(e,tp,eg,ep,ev,re,r,rp) function c33784505.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev) if Duel.NegateEffect(ev) then
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
end
end end
...@@ -39,8 +39,7 @@ function c35798491.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,8 +39,7 @@ function c35798491.disop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
local dc=Duel.TossDice(tp,1) local dc=Duel.TossDice(tp,1)
if dc==1 or dc==3 or dc==6 then if dc==1 or dc==3 or dc==6 then
Duel.NegateEffect(ev) if Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) then
if rc:IsRelateToEffect(re) then
Duel.Destroy(rc,REASON_EFFECT) Duel.Destroy(rc,REASON_EFFECT)
end end
end end
......
...@@ -58,8 +58,7 @@ function c35975813.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,8 +58,7 @@ function c35975813.disop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
local dc=Duel.TossDice(tp,1) local dc=Duel.TossDice(tp,1)
if dc~=2 and dc~=5 then return end if dc~=2 and dc~=5 then return end
Duel.NegateEffect(ev) if Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) then
if rc:IsRelateToEffect(re) then
Duel.Destroy(rc,REASON_EFFECT) Duel.Destroy(rc,REASON_EFFECT)
end end
end end
......
...@@ -31,9 +31,10 @@ end ...@@ -31,9 +31,10 @@ end
function c368382.negop(e,tp,eg,ep,ev,re,r,rp) function c368382.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(368382,0)) then if Duel.SelectYesNo(tp,aux.Stringid(368382,0)) then
e:GetHandler():RegisterFlagEffect(368382,RESET_EVENT+0x1fe0000,0,1) e:GetHandler():RegisterFlagEffect(368382,RESET_EVENT+0x1fe0000,0,1)
Duel.NegateEffect(ev) if Duel.NegateEffect(ev) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Destroy(e:GetHandler(),REASON_EFFECT) Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
end end
end end
function c368382.cfilter(c) function c368382.cfilter(c)
......
...@@ -36,8 +36,7 @@ function c38742075.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -36,8 +36,7 @@ function c38742075.disop(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if not g or not g:IsExists(c38742075.cfilter,1,nil,tp) then return end if not g or not g:IsExists(c38742075.cfilter,1,nil,tp) then return end
Duel.NegateEffect(ev) if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(re:GetHandler(),REASON_EFFECT) Duel.Destroy(re:GetHandler(),REASON_EFFECT)
end end
end end
...@@ -34,9 +34,10 @@ end ...@@ -34,9 +34,10 @@ end
function c38988538.negop(e,tp,eg,ep,ev,re,r,rp) function c38988538.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(38988538,0)) then if Duel.SelectYesNo(tp,aux.Stringid(38988538,0)) then
e:GetHandler():RegisterFlagEffect(38988538,RESET_EVENT+0x1fe0000,0,1) e:GetHandler():RegisterFlagEffect(38988538,RESET_EVENT+0x1fe0000,0,1)
Duel.NegateEffect(ev) if Duel.NegateEffect(ev) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Destroy(e:GetHandler(),REASON_EFFECT) Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
end end
end end
function c38988538.cfilter(c) function c38988538.cfilter(c)
......
...@@ -16,11 +16,12 @@ end ...@@ -16,11 +16,12 @@ end
function c42364257.target(e,tp,eg,ep,ev,re,r,rp,chk) function c42364257.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil) local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c42364257.activate(e,tp,eg,ep,ev,re,r,rp) function c42364257.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev) if Duel.NegateEffect(ev) then
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil) local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end
end end
...@@ -14,8 +14,7 @@ end ...@@ -14,8 +14,7 @@ end
function c44155002.disop(e,tp,eg,ep,ev,re,r,rp) function c44155002.disop(e,tp,eg,ep,ev,re,r,rp)
if ep==tp or Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)~=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND) then return end if ep==tp or Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)~=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND) then return end
local rc=re:GetHandler() local rc=re:GetHandler()
Duel.NegateEffect(ev) if Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) then
if rc:IsRelateToEffect(re) then
Duel.Destroy(rc,REASON_EFFECT) Duel.Destroy(rc,REASON_EFFECT)
end end
end end
...@@ -43,7 +43,7 @@ end ...@@ -43,7 +43,7 @@ end
function c46796664.disop(e,tp,eg,ep,ev,re,r,rp) function c46796664.disop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.SelectYesNo(tp,aux.Stringid(46796664,1)) then return end if not Duel.SelectYesNo(tp,aux.Stringid(46796664,1)) then return end
e:GetHandler():RegisterFlagEffect(46796664,RESET_EVENT+0x1fe0000,0,1) e:GetHandler():RegisterFlagEffect(46796664,RESET_EVENT+0x1fe0000,0,1)
Duel.NegateEffect(ev) if not Duel.NegateEffect(ev) then return end
Duel.BreakEffect() Duel.BreakEffect()
Duel.Destroy(e:GetHandler(),REASON_EFFECT) Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end end
......
...@@ -45,8 +45,7 @@ function c49681811.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,8 +45,7 @@ function c49681811.disop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if not g or g:GetCount()==0 then return end if not g or g:GetCount()==0 then return end
if g:IsContains(e:GetHandler()) then if g:IsContains(e:GetHandler()) then
Duel.NegateEffect(ev) if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(re:GetHandler(),REASON_EFFECT) Duel.Destroy(re:GetHandler(),REASON_EFFECT)
end end
end end
......
...@@ -59,8 +59,7 @@ function c49868263.disop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,8 +59,7 @@ function c49868263.disop2(e,tp,eg,ep,ev,re,r,rp)
if re:IsActiveType(TYPE_SPELL) and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then if re:IsActiveType(TYPE_SPELL) and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if g and g:IsContains(e:GetHandler()) then if g and g:IsContains(e:GetHandler()) then
Duel.NegateEffect(ev) if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(re:GetHandler(),REASON_EFFECT) Duel.Destroy(re:GetHandler(),REASON_EFFECT)
end end
end end
......
...@@ -23,7 +23,8 @@ function c55608151.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -23,7 +23,8 @@ function c55608151.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c55608151.activate(e,tp,eg,ep,ev,re,r,rp) function c55608151.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev) if Duel.NegateEffect(ev) then
local g=Duel.GetMatchingGroup(c55608151.filter,tp,0,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(c55608151.filter,tp,0,LOCATION_ONFIELD,nil)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end
end end
...@@ -31,8 +31,7 @@ end ...@@ -31,8 +31,7 @@ end
function c58120309.activate(e,tp,eg,ep,ev,re,r,rp) function c58120309.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler() local tc=re:GetHandler()
if not tc:IsDisabled() then if not tc:IsDisabled() then
Duel.NegateEffect(ev) if Duel.NegateEffect(ev) and tc:IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)~=0 then
if tc:IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)~=0 then
local sc=Duel.GetFirstMatchingCard(c58120309.sfilter,tp,LOCATION_EXTRA,0,nil,e,tp) local sc=Duel.GetFirstMatchingCard(c58120309.sfilter,tp,LOCATION_EXTRA,0,nil,e,tp)
if sc and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(58120309,0)) then if sc and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(58120309,0)) then
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -36,8 +36,7 @@ function c61370518.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -36,8 +36,7 @@ function c61370518.disop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
local dc=Duel.TossDice(tp,1) local dc=Duel.TossDice(tp,1)
if dc==1 or dc==3 or dc==6 then if dc==1 or dc==3 or dc==6 then
Duel.NegateEffect(ev) if Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) then
if rc:IsRelateToEffect(re) then
Duel.Destroy(rc,REASON_EFFECT) Duel.Destroy(rc,REASON_EFFECT)
end end
end end
......
...@@ -88,8 +88,7 @@ function c62892347.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -88,8 +88,7 @@ function c62892347.disop(e,tp,eg,ep,ev,re,r,rp)
if (val==1 and rp~=ec:GetControler()) or (val==0 and rp==ec:GetControler()) then return end if (val==1 and rp~=ec:GetControler()) or (val==0 and rp==ec:GetControler()) then return end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if not g or not g:IsContains(ec) then return end if not g or not g:IsContains(ec) then return end
Duel.NegateEffect(ev) if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(re:GetHandler(),REASON_EFFECT) Duel.Destroy(re:GetHandler(),REASON_EFFECT)
end end
end end
...@@ -34,9 +34,10 @@ end ...@@ -34,9 +34,10 @@ end
function c63251695.negop(e,tp,eg,ep,ev,re,r,rp) function c63251695.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(63251695,1)) then if Duel.SelectYesNo(tp,aux.Stringid(63251695,1)) then
e:GetHandler():RegisterFlagEffect(63251695,RESET_EVENT+0x1fe0000,0,1) e:GetHandler():RegisterFlagEffect(63251695,RESET_EVENT+0x1fe0000,0,1)
Duel.NegateEffect(ev) if Duel.NegateEffect(ev) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Destroy(e:GetHandler(),REASON_EFFECT) Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
end end
end end
function c63251695.effcon(e,tp,eg,ep,ev,re,r,rp) function c63251695.effcon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -48,10 +48,9 @@ function c63767246.distg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -48,10 +48,9 @@ function c63767246.distg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end end
function c63767246.disop(e,tp,eg,ep,ev,re,r,rp) function c63767246.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
local c=e:GetHandler() local c=e:GetHandler()
local rc=re:GetHandler() local rc=re:GetHandler()
if c:IsRelateToEffect(e) and rc:IsRelateToEffect(re) and c:IsType(TYPE_XYZ) then if Duel.NegateEffect(ev) and c:IsRelateToEffect(e) and rc:IsRelateToEffect(re) and c:IsType(TYPE_XYZ) then
rc:CancelToGrave() rc:CancelToGrave()
Duel.Overlay(c,Group.FromCards(rc)) Duel.Overlay(c,Group.FromCards(rc))
end end
......
...@@ -54,8 +54,7 @@ function c70676581.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -54,8 +54,7 @@ function c70676581.disop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if not g or g:GetCount()==0 then return end if not g or g:GetCount()==0 then return end
if g:IsExists(c70676581.disfilter,1,nil,tp) then if g:IsExists(c70676581.disfilter,1,nil,tp) then
Duel.NegateEffect(ev) if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(re:GetHandler(),REASON_EFFECT) Duel.Destroy(re:GetHandler(),REASON_EFFECT)
end end
end end
......
...@@ -48,8 +48,7 @@ function c72192100.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,8 +48,7 @@ function c72192100.disop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
local dc=Duel.TossDice(tp,1) local dc=Duel.TossDice(tp,1)
if dc~=3 then return end if dc~=3 then return end
Duel.NegateEffect(ev) if Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) then
if rc:IsRelateToEffect(re) then
Duel.Destroy(rc,REASON_EFFECT) Duel.Destroy(rc,REASON_EFFECT)
end end
end end
......
...@@ -55,6 +55,7 @@ function c72932673.negcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,6 +55,7 @@ function c72932673.negcon(e,tp,eg,ep,ev,re,r,rp)
and re:IsActiveType(TYPE_SPELL) and Duel.IsChainDisablable(ev) and re:IsActiveType(TYPE_SPELL) and Duel.IsChainDisablable(ev)
end end
function c72932673.negop(e,tp,eg,ep,ev,re,r,rp) function c72932673.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev) if Duel.NegateEffect(ev) then
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)
end
end end
...@@ -44,8 +44,7 @@ function c73219648.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,8 +44,7 @@ function c73219648.disop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
local dc=Duel.TossDice(tp,1) local dc=Duel.TossDice(tp,1)
if dc~=3 then return end if dc~=3 then return end
Duel.NegateEffect(ev) if Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) then
if rc:IsRelateToEffect(re) then
Duel.Destroy(rc,REASON_EFFECT) Duel.Destroy(rc,REASON_EFFECT)
end end
end end
......
...@@ -47,8 +47,7 @@ function c8581705.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,8 +47,7 @@ function c8581705.disop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
local dc=Duel.TossDice(tp,1) local dc=Duel.TossDice(tp,1)
if dc~=2 and dc~=5 then return end if dc~=2 and dc~=5 then return end
Duel.NegateEffect(ev) if Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) then
if rc:IsRelateToEffect(re) then
Duel.Destroy(rc,REASON_EFFECT) Duel.Destroy(rc,REASON_EFFECT)
end end
end end
......
...@@ -55,6 +55,7 @@ function c8719957.negcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,6 +55,7 @@ function c8719957.negcon(e,tp,eg,ep,ev,re,r,rp)
and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev) and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev)
end end
function c8719957.negop(e,tp,eg,ep,ev,re,r,rp) function c8719957.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev) if Duel.NegateEffect(ev) then
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)
end
end end
...@@ -58,8 +58,7 @@ function c92408984.operation1(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,8 +58,7 @@ function c92408984.operation1(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local ct=Duel.GetChainInfo(0,CHAININFO_CHAIN_COUNT) local ct=Duel.GetChainInfo(0,CHAININFO_CHAIN_COUNT)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
Duel.NegateEffect(ct-1) if Duel.NegateEffect(ct-1) and tc and tc:IsRelateToEffect(e) then
if tc and tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
end end
...@@ -85,8 +84,7 @@ end ...@@ -85,8 +84,7 @@ end
function c92408984.operation2(e,tp,eg,ep,ev,re,r,rp) function c92408984.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
Duel.NegateEffect(ev) if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT) Duel.Destroy(eg,REASON_EFFECT)
end end
end end
...@@ -75,8 +75,7 @@ function c93016201.activate1(e,tp,eg,ep,ev,re,r,rp) ...@@ -75,8 +75,7 @@ function c93016201.activate1(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetChainInfo(0,CHAININFO_CHAIN_COUNT) local ct=Duel.GetChainInfo(0,CHAININFO_CHAIN_COUNT)
local te=Duel.GetChainInfo(ct-1,CHAININFO_TRIGGERING_EFFECT) local te=Duel.GetChainInfo(ct-1,CHAININFO_TRIGGERING_EFFECT)
local tc=te:GetHandler() local tc=te:GetHandler()
Duel.NegateEffect(ct-1) if Duel.NegateEffect(ct-1) and tc:IsRelateToEffect(te) then
if tc:IsRelateToEffect(te) then
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
end end
...@@ -113,8 +112,7 @@ function c93016201.target3(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -113,8 +112,7 @@ function c93016201.target3(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c93016201.activate3(e,tp,eg,ep,ev,re,r,rp) function c93016201.activate3(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.NegateEffect(ev) if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT) Duel.Destroy(eg,REASON_EFFECT)
end end
end end
...@@ -51,8 +51,7 @@ function c94568601.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,8 +51,7 @@ function c94568601.disop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if not g or g:GetCount()==0 then return end if not g or g:GetCount()==0 then return end
if g:IsContains(e:GetHandler()) then if g:IsContains(e:GetHandler()) then
Duel.NegateEffect(ev) if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(re:GetHandler(),REASON_EFFECT) Duel.Destroy(re:GetHandler(),REASON_EFFECT)
end end
end end
......
...@@ -70,8 +70,7 @@ function c95515060.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -70,8 +70,7 @@ function c95515060.disop(e,tp,eg,ep,ev,re,r,rp)
if not ec:GetEquipTarget() or not re:IsActiveType(TYPE_SPELL) or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end if not ec:GetEquipTarget() or not re:IsActiveType(TYPE_SPELL) or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if not g or not g:IsContains(ec:GetEquipTarget()) then return end if not g or not g:IsContains(ec:GetEquipTarget()) then return end
Duel.NegateEffect(ev) if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(re:GetHandler(),REASON_EFFECT) Duel.Destroy(re:GetHandler(),REASON_EFFECT)
end end
end end
...@@ -44,8 +44,7 @@ function c9603356.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,8 +44,7 @@ function c9603356.disop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
local dc=Duel.TossDice(tp,1) local dc=Duel.TossDice(tp,1)
if dc~=3 then return end if dc~=3 then return end
Duel.NegateEffect(ev) if Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) then
if rc:IsRelateToEffect(re) then
Duel.Destroy(rc,REASON_EFFECT) Duel.Destroy(rc,REASON_EFFECT)
end end
end end
......
...@@ -34,7 +34,7 @@ function c983995.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -34,7 +34,7 @@ function c983995.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_ONFIELD+LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_ONFIELD+LOCATION_HAND)
end end
function c983995.operation(e,tp,eg,ep,ev,re,r,rp) function c983995.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev) if not Duel.NegateEffect(ev) then end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD+LOCATION_HAND,1,1,nil) local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD+LOCATION_HAND,1,1,nil)
if g:GetCount()~=0 then if g:GetCount()~=0 then
......
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