Commit 2fb15976 authored by Fluorohydride's avatar Fluorohydride

Merge pull request #506 from woodee/patch-16

fix
parents f1542bbf b8de2b76
......@@ -17,17 +17,17 @@ function c60530944.condition(e,tp,eg,ep,ev,re,r,rp)
and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
and not Duel.IsExistingMatchingCard(Card.IsFacedown,tp,0,LOCATION_MZONE,1,nil)
end
function c60530944.getrace(g)
local arc=0
function c60530944.getattr(g)
local aat=0
local tc=g:GetFirst()
while tc do
arc=bit.bor(arc,tc:GetRace())
aat=bit.bor(aat,tc:GetAttribute())
tc=g:GetNext()
end
return arc
return aat
end
function c60530944.rmfilter(c,rc)
return not c:IsRace(0xffffff-rc)
function c60530944.rmfilter(c,at)
return not c:IsAttribute(0xff-at)
end
function c60530944.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
......@@ -38,10 +38,10 @@ function c60530944.operation(e,tp,eg,ep,ev,re,r,rp)
local g2=Duel.GetFieldGroup(tp,0,LOCATION_MZONE)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60530944,0))
local r1=Duel.AnnounceRace(tp,1,c60530944.getrace(g1))
local r1=Duel.AnnounceAttribute(tp,1,c60530944.getattr(g1))
g1:Remove(c60530944.rmfilter,nil,r1)
Duel.Hint(HINT_SELECTMSG,1-tp,aux.Stringid(60530944,0))
local r2=Duel.AnnounceRace(1-tp,1,c60530944.getrace(g2))
local r2=Duel.AnnounceAttribute(1-tp,1,c60530944.getattr(g2))
g2:Remove(c60530944.rmfilter,nil,r2)
g1:Merge(g2)
Duel.SendtoGrave(g1,REASON_EFFECT)
......
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