Commit 6104bd93 authored by nekrozar's avatar nekrozar Committed by GitHub

fix Duel.ChangeChainOperation (#1219)

parent 50aeaa40
...@@ -62,10 +62,6 @@ function c42921475.chop(e,tp,eg,ep,ev,re,r,rp) ...@@ -62,10 +62,6 @@ function c42921475.chop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeChainOperation(ev,c42921475.repop) Duel.ChangeChainOperation(ev,c42921475.repop)
end end
function c42921475.repop(e,tp,eg,ep,ev,re,r,rp) function c42921475.repop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetType()==TYPE_SPELL or c:GetType()==TYPE_TRAP then
c:CancelToGrave(false)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,c42921475.filter,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectMatchingCard(tp,c42921475.filter,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -58,10 +58,6 @@ function c53199020.chop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,10 +58,6 @@ function c53199020.chop2(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeChainOperation(ev,c53199020.rep_op) Duel.ChangeChainOperation(ev,c53199020.rep_op)
end end
function c53199020.rep_op(e,tp,eg,ep,ev,re,r,rp) function c53199020.rep_op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetType()==TYPE_SPELL or c:GetType()==TYPE_TRAP then
c:CancelToGrave(false)
end
Duel.Hint(HINT_CARD,0,53199020) Duel.Hint(HINT_CARD,0,53199020)
Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD) Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD)
end end
...@@ -10,7 +10,6 @@ function c65824822.initial_effect(c) ...@@ -10,7 +10,6 @@ function c65824822.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c65824822.repop(e,tp,eg,ep,ev,re,r,rp) function c65824822.repop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():CancelToGrave(false)
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
if g:GetCount()>0 then if g:GetCount()>0 then
local sg=g:RandomSelect(1-tp,1,nil) local sg=g:RandomSelect(1-tp,1,nil)
......
...@@ -50,10 +50,6 @@ function c69840739.filter(c) ...@@ -50,10 +50,6 @@ function c69840739.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsType(TYPE_SPELL+TYPE_TRAP)
end end
function c69840739.repop(e,tp,eg,ep,ev,re,r,rp) function c69840739.repop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetType()==TYPE_SPELL or c:GetType()==TYPE_TRAP then
c:CancelToGrave(false)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,c69840739.filter,tp,0,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectMatchingCard(tp,c69840739.filter,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -57,8 +57,7 @@ end ...@@ -57,8 +57,7 @@ end
function c84442536.repop(e,tp,eg,ep,ev,re,r,rp) function c84442536.repop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 if tc:IsRelateToEffect(e) then
and c:IsType(TYPE_SPELL+TYPE_TRAP) then Duel.Destroy(tc,REASON_EFFECT)
c:CancelToGrave(false)
end end
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