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