Commit 4d17b129 authored by wyykak's avatar wyykak

Merge branch 'patch-3' into 'master'

Update c21061.lua

See merge request !24
parents 06666da2 c1bcba22
Pipeline #15373 passed with stage
in 14 seconds
...@@ -26,7 +26,7 @@ function c21061.initial_effect(c) ...@@ -26,7 +26,7 @@ function c21061.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c21061.tg(e,tp,eg,ep,ev,re,r,rp,chk) function c21061.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return true end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
local g1=g:GetMinGroup(Card.GetAttack) local g1=g:GetMinGroup(Card.GetAttack)
...@@ -80,10 +80,12 @@ function c21061.desfilter(c) ...@@ -80,10 +80,12 @@ function c21061.desfilter(c)
end end
function c21061.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c21061.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c21061.desfilter(chkc) end if chkc then return chkc:IsOnField() and c21061.desfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c21061.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) if Duel.IsExistingTarget(c21061.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) then
local g=Duel.SelectTarget(tp,c21061.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) local g=Duel.SelectTarget(tp,c21061.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
end end
function c21061.desop(e,tp,eg,ep,ev,re,r,rp) function c21061.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
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