Commit 5bf0e7b0 authored by sidschingis's avatar sidschingis

fix ATK loss incorrectly resetting

Fixed ATK loss from resetting when the Equip Card is destroyed
and still destroying even if ATK falls under 500 on resolution
parent 0c732cd2
...@@ -82,23 +82,18 @@ end ...@@ -82,23 +82,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)
......
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