Commit 592a5c4e authored by wind2009's avatar wind2009

Improve Deadly Zombie Breath

parent 85788c79
Pipeline #43032 passed with stages
in 5 minutes and 25 seconds
...@@ -106,5 +106,5 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -106,5 +106,5 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.fuslimit(e,c,sumtype) function s.fuslimit(e,c,sumtype)
return sumtype==SUMMON_TYPE_FUSION return sumtype==SUMMON_TYPE_FUSION
end end
...@@ -52,19 +52,23 @@ function s.condition2(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,19 +52,23 @@ function s.condition2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
return g:IsExists(Card.IsRace,1,nil,RACE_ZOMBIE) return g:IsExists(Card.IsRace,1,nil,RACE_ZOMBIE)
end end
function s.tgfilter(c) function s.tgfilter1(c,tp)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() and c:IsControler(tp)
end
function s.tgfilter2(c,tp)
return c:IsFaceup() and c:IsAbleToGrave() and c:IsControler(1-tp)
end
function s.gcheck(g,tp)
return aux.gffcheck(g,s.tgfilter1,tp,s.tgfilter2,tp)
end end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,0,1,nil) local g=Duel.GetMatchingGroup(aux.AND(Card.IsFaceup,Card.IsAbleToGrave,Card.IsCanBeEffectTarget),tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
and Duel.IsExistingTarget(aux.AND(Card.IsAbleToGrave,Card.IsFaceup),tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return g:CheckSubGroup(s.gcheck,2,2,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectTarget(tp,aux.AND(Card.IsAbleToGrave,Card.IsFaceup),tp,0,LOCATION_ONFIELD,1,1,nil) local tg=g:SelectSubGroup(tp,s.gcheck,false,2,2,tp)
g1:Merge(g2) Duel.SetTargetCard(tg)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g1,g1:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,tg,tg:GetCount(),0,0)
end end
function s.tgop(e,tp,eg,ep,ev,re,r,rp) function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetTargetsRelateToChain() local tg=Duel.GetTargetsRelateToChain()
......
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