Commit 1db5c33e authored by DailyShana's avatar DailyShana

fix

parent 0edf06b4
...@@ -13,9 +13,16 @@ function c77778835.initial_effect(c) ...@@ -13,9 +13,16 @@ function c77778835.initial_effect(c)
--Destroy --Destroy
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_LEAVE_FIELD) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetOperation(c77778835.desop) e2:SetCode(EVENT_LEAVE_FIELD_P)
e2:SetOperation(c77778835.checkop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetOperation(c77778835.desop)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
end end
function c77778835.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c77778835.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
...@@ -49,7 +56,13 @@ end ...@@ -49,7 +56,13 @@ end
function c77778835.desfilter(c,rc) function c77778835.desfilter(c,rc)
return rc:IsHasCardTarget(c) return rc:IsHasCardTarget(c)
end end
function c77778835.checkop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsDisabled() then
e:SetLabel(1)
else e:SetLabel(0) end
end
function c77778835.desop(e,tp,eg,ep,ev,re,r,rp) function c77778835.desop(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabelObject():GetLabel()~=0 then return end
local g=Duel.GetMatchingGroup(c77778835.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e:GetHandler()) local g=Duel.GetMatchingGroup(c77778835.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e:GetHandler())
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
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