Commit f404ed84 authored by DailyShana's avatar DailyShana

fix

parent 67dab4de
...@@ -10,18 +10,35 @@ function c60866277.initial_effect(c) ...@@ -10,18 +10,35 @@ function c60866277.initial_effect(c)
e1:SetOperation(c60866277.operation) e1:SetOperation(c60866277.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c60866277.filter(c)
return c:IsFaceup()
end
function c60866277.desfilter(c,att) function c60866277.desfilter(c,att)
return c:IsFaceup() and c:IsAttribute(att) return c:IsFaceup() and c:IsAttribute(att)
end end
function c60866277.target(e,tp,eg,ep,ev,re,r,rp,chk) function c60866277.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60866277.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if chk==0 then
if g:GetCount()==0 then return false end
local tc=g:GetFirst()
local att=0
while tc do
att=bit.bor(att,tc:GetAttribute())
tc=g:GetNext()
end
return bit.band(att,att-1)~=0
end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c60866277.operation(e,tp,eg,ep,ev,re,r,rp) function c60866277.operation(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if sg:GetCount()==0 then return false end
local tc=sg:GetFirst()
local att=0
while tc do
att=bit.bor(att,tc:GetAttribute())
tc=sg:GetNext()
end
if bit.band(att,att-1)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,562) Duel.Hint(HINT_SELECTMSG,tp,562)
local att1=Duel.AnnounceAttribute(tp,2,0xff) local att1=Duel.AnnounceAttribute(tp,2,att)
Duel.Hint(HINT_SELECTMSG,1-tp,562) Duel.Hint(HINT_SELECTMSG,1-tp,562)
local att2=Duel.AnnounceAttribute(1-tp,1,att1) local att2=Duel.AnnounceAttribute(1-tp,1,att1)
local g=Duel.GetMatchingGroup(c60866277.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,att2) local g=Duel.GetMatchingGroup(c60866277.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,att2)
......
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