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