Commit 9853d626 authored by mercury233's avatar mercury233 Committed by GitHub

fix "banish both" (#2964)

parent 024ce996
......@@ -54,12 +54,12 @@ function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g1,g1:GetCount(),0,0)
end
function s.rmopfilter(c,e)
return c:IsType(TYPE_MONSTER) and c:IsRelateToEffect(e)
function s.rmopfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(aux.NecroValleyFilter(s.rmopfilter),nil,e)
local g=Duel.GetTargetsRelateToChain()
local tg=g:Filter(aux.NecroValleyFilter(s.rmopfilter),nil)
if tg:GetCount()==2 then
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
end
......
......@@ -83,7 +83,7 @@ function s.drmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,2,0,0)
end
function s.drmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetTargetsRelateToChain():Filter(Card.IsAbleToRemove,nil,tp,POS_FACEUP,REASON_EFFECT)
local g=Duel.GetTargetsRelateToChain():Filter(Card.IsAbleToRemove,nil)
if #g~=2 or Duel.Remove(g,0,REASON_EFFECT+REASON_TEMPORARY)==0
or not g:IsExists(Card.IsLocation,1,nil,LOCATION_REMOVED) then return end
local og=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_REMOVED)
......
......@@ -63,7 +63,8 @@ end
function c3657444.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsControler(tp) and tc:IsFaceup() and c:IsRelateToEffect(e) then
if tc:IsRelateToEffect(e) and tc:IsControler(tp) and tc:IsFaceup() and c:IsRelateToEffect(e)
and c:IsAbleToRemove() and tc:IsAbleToRemove() then
local sg=Group.FromCards(c,tc)
if Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)~=2 then return end
Duel.BreakEffect()
......
......@@ -49,7 +49,7 @@ function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g1,2,0,0)
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local g=Duel.GetTargetsRelateToChain():Filter(Card.IsAbleToRemove,nil)
if #g==2 and Duel.Remove(g,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then
local resetv=1
if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()<=PHASE_STANDBY then
......
......@@ -48,7 +48,7 @@ function c73898890.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,2,0,0)
end
function c73898890.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetTargetsRelateToChain()
local g=Duel.GetTargetsRelateToChain():Filter(Card.IsAbleToDeck,nil)
if #g==2 then
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
......
......@@ -70,7 +70,7 @@ function c85216896.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g1,2,0,0)
end
function c85216896.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local g=Duel.GetTargetsRelateToChain():Filter(Card.IsAbleToRemove,nil)
if g:GetCount()~=2 then return end
if Duel.Remove(g,0,REASON_EFFECT+REASON_TEMPORARY)~=0 and g:IsExists(Card.IsLocation,1,nil,LOCATION_REMOVED) then
local og=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_REMOVED)
......
......@@ -92,9 +92,10 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local res1,tg1=Duel.GetOperationInfo(0,CATEGORY_REMOVE)
local res2,tg2=Duel.GetOperationInfo(0,CATEGORY_SPECIAL_SUMMON)
local c,rc,sc=e:GetHandler(),tg1:GetFirst(),tg2:GetFirst()
if rc:IsRelateToEffect(e) and rc:IsControler(1-tp) and rc:IsType(TYPE_MONSTER) and c:IsOnField()
and Duel.Remove(c,POS_FACEUP,REASON_EFFECT)*Duel.Remove(tg1,POS_FACEUP,REASON_EFFECT)>0 then
if sc:IsRelateToEffect(e) and sc:IsRace(RACE_FISH) then
if rc:IsRelateToEffect(e) and rc:IsControler(1-tp) and rc:IsType(TYPE_MONSTER) and c:IsRelateToEffect(e)
and c:IsAbleToRemove() and rc:IsAbleToRemove() then
local rg=Group.FromCards(c,rc)
if Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)==2 and sc:IsRelateToEffect(e) then
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
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