Commit 467fe79b authored by salix5's avatar salix5

fix

parent d197dc57
...@@ -18,16 +18,19 @@ end ...@@ -18,16 +18,19 @@ end
function c18752707.activate(e,tp,eg,ep,ev,re,r,rp) function c18752707.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
local val1=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil):GetSum(Card.GetLevel)*100
local val2=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil):GetSum(Card.GetLevel)*100
while tc do while tc do
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(c18752707.atkval) if tc:IsControler(tp) then
e1:SetValue(val1)
else
e1:SetValue(val2)
end
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
tc=g:GetNext() tc=g:GetNext()
end end
end end
function c18752707.atkval(e,c)
return Duel.GetMatchingGroup(Card.IsFaceup,c:GetControler(),LOCATION_MZONE,0,nil):GetSum(Card.GetLevel)*100
end
...@@ -15,8 +15,7 @@ function c89086566.cfilter(c) ...@@ -15,8 +15,7 @@ function c89086566.cfilter(c)
return c:IsFaceup() and (code==40640057 or code==40703223) and c:IsDestructable() return c:IsFaceup() and (code==40640057 or code==40703223) and c:IsDestructable()
end end
function c89086566.target(e,tp,eg,ep,ev,re,r,rp,chk) function c89086566.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c89086566.cfilter,tp,LOCATION_MZONE,0,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(c89086566.cfilter,tp,LOCATION_MZONE,0,1,nil) end
and Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c89086566.cfilter,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(c89086566.cfilter,tp,LOCATION_MZONE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
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