Commit 8caa8e24 authored by mercury233's avatar mercury233 Committed by GitHub

fix Infernity Break (#2943)

parent 58ccc3dc
...@@ -24,20 +24,18 @@ function c51717541.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -24,20 +24,18 @@ function c51717541.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
and Duel.IsExistingTarget(c51717541.filter,tp,LOCATION_GRAVE,0,1,nil) end and Duel.IsExistingTarget(c51717541.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectTarget(tp,c51717541.filter,tp,LOCATION_GRAVE,0,1,1,nil) local g1=Duel.SelectTarget(tp,c51717541.filter,tp,LOCATION_GRAVE,0,1,1,nil)
local rm=g1:GetFirst()
Duel.SetOperationInfo(0,CATEGORY_REMOVE,rm,1,tp,LOCATION_GRAVE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil) local g2=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
local ds=g2:GetFirst() Duel.SetOperationInfo(0,CATEGORY_REMOVE,g1,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,ds,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g2,1,0,0)
end end
function c51717541.activate(e,tp,eg,ep,ev,re,r,rp) function c51717541.activate(e,tp,eg,ep,ev,re,r,rp)
local ex1,g1=Duel.GetOperationInfo(0,CATEGORY_REMOVE) local g=Duel.GetTargetsRelateToChain()
local rm=g1:GetFirst() local rm=g:Filter(Card.IsLocation,nil,LOCATION_GRAVE):GetFirst()
if not rm:IsRelateToEffect(e) then return end if rm and Duel.Remove(rm,POS_FACEUP,REASON_EFFECT)>0 then
if Duel.Remove(rm,POS_FACEUP,REASON_EFFECT)==0 then return end local ds=g:Filter(Card.IsLocation,nil,LOCATION_ONFIELD):GetFirst()
local ex2,g2=Duel.GetOperationInfo(0,CATEGORY_DESTROY) if ds then
local ds=g2:GetFirst() Duel.Destroy(ds,REASON_EFFECT)
if not ds:IsRelateToEffect(e) then return end end
Duel.Destroy(ds,REASON_EFFECT) 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