Commit d197dc57 authored by salix5's avatar salix5

Merge pull request #1106 from nekrozar/patch-1

fix Magical Star Illusion
parents 4d45b6c4 e4147dec
...@@ -16,19 +16,18 @@ function c18752707.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -16,19 +16,18 @@ function c18752707.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
end end
function c18752707.activate(e,tp,eg,ep,ev,re,r,rp) function c18752707.activate(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local val1=g1:GetSum(Card.GetLevel) local tc=g:GetFirst()
local g2=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) while tc do
local val2=g2:GetSum(Card.GetLevel)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0) e1:SetValue(c18752707.atkval)
e1:SetValue(val1*100) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+RESET_END) tc:RegisterEffect(e1)
Duel.RegisterEffect(e1,tp) tc=g:GetNext()
local e2=e1:Clone() end
e2:SetTargetRange(0,LOCATION_MZONE) end
e2:SetValue(val2*100) function c18752707.atkval(e,c)
Duel.RegisterEffect(e2,tp) return Duel.GetMatchingGroup(Card.IsFaceup,c:GetControler(),LOCATION_MZONE,0,nil):GetSum(Card.GetLevel)*100
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