Commit 9dc36ddd authored by Fluorohydride's avatar Fluorohydride

Merge pull request #510 from sidschingis/master

fix
parents 2e79f68d b75c4471
......@@ -4,7 +4,7 @@ function c8323633.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c8323633.target)
e1:SetOperation(c8323633.target)
c:RegisterEffect(e1)
end
function c8323633.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -76,23 +76,18 @@ end
function c83438826.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) or not tc:IsRelateToEffect(e) or tc:IsFaceup() then return end
if c:GetFlagEffect(83438826)==0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-500)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
c:RegisterFlagEffect(83438826,RESET_EVENT+0x1fe0000,0,0)
e:SetLabelObject(e1)
e:SetLabel(2)
else
local pe=e:GetLabelObject()
local ct=e:GetLabel()
e:SetLabel(ct+1)
pe:SetValue(ct*-500)
end
local eq=c:GetEquipTarget()
if not c:IsRelateToEffect(e) or not tc:IsRelateToEffect(e) or tc:IsFaceup() or
not eq:IsAttackAbove(500)
then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-500)
e1:SetReset(RESET_EVENT+0x1fe0000)
eq:RegisterEffect(e1)
Duel.Destroy(tc,REASON_EFFECT)
end
function c83438826.eqcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -41,6 +41,12 @@ function c83746708.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c83746708.filter(c)
return c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)
end
function c83746708.value(e,c)
return Duel.GetFieldGroupCount(e:GetHandler():GetControler(),LOCATION_SZONE,0)*500
local g=Duel.GetMatchingGroup(c83746708.filter,tp,LOCATION_ONFIELD,0,nil)
return g:GetCount()*500
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