Commit 93800959 authored by Nemo Ma's avatar Nemo Ma

fix

parent 87cc50a2
...@@ -21,6 +21,7 @@ function cm.initial_effect(c) ...@@ -21,6 +21,7 @@ function cm.initial_effect(c)
e6:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) e6:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e6:SetProperty(EFFECT_FLAG_DELAY) e6:SetProperty(EFFECT_FLAG_DELAY)
e6:SetCountLimit(1,m)
e6:SetCode(EVENT_CHAINING) e6:SetCode(EVENT_CHAINING)
e6:SetRange(LOCATION_MZONE) e6:SetRange(LOCATION_MZONE)
e6:SetCondition(cm.spcon) e6:SetCondition(cm.spcon)
......
...@@ -49,7 +49,7 @@ function cm.efilter(e,te) ...@@ -49,7 +49,7 @@ function cm.efilter(e,te)
end end
function cm.atcon(e,tp,eg,ep,ev,re,r,rp) function cm.atcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return Duel.GetAttacker()==c and c:IsChainAttackable(0) return Duel.GetAttacker()==c and c:IsChainAttackable(0) and e:GetHandler():GetOverlayCount()>0
end end
function cm.atcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.atcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=e:GetHandler():GetOverlayGroup() local g=e:GetHandler():GetOverlayGroup()
......
...@@ -41,7 +41,7 @@ function cm.dfilter(c) ...@@ -41,7 +41,7 @@ function cm.dfilter(c)
end end
function cm.actcon(e,tp,eg,ep,ev,re,r,rp) function cm.actcon(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.GetFlagEffect(tp,40009560)>0 or Duel.IsExistingMatchingCard(cm.dfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.GetLocationCount(e:GetHandler():GetControler(),LOCATION_MZONE)>0 and Duel.GetFlagEffect(tp,40009560)>0 or Duel.IsExistingMatchingCard(cm.dfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function cm.cfilter(c) function cm.cfilter(c)
return c:IsRace(RACE_FIEND) and c:IsAbleToGraveAsCost() return c:IsRace(RACE_FIEND) and c:IsAbleToGraveAsCost()
......
...@@ -40,7 +40,7 @@ function cm.dfilter(c) ...@@ -40,7 +40,7 @@ function cm.dfilter(c)
end end
function cm.actcon(e,tp,eg,ep,ev,re,r,rp) function cm.actcon(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.GetFlagEffect(tp,40009560)>0 or Duel.IsExistingMatchingCard(cm.dfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.GetLocationCount(e:GetHandler():GetControler(),LOCATION_MZONE)>0 and Duel.GetFlagEffect(tp,40009560)>0 or Duel.IsExistingMatchingCard(cm.dfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function cm.cfilter(c) function cm.cfilter(c)
return c:IsRace(RACE_FIEND) and c:IsAbleToGraveAsCost() return c:IsRace(RACE_FIEND) and c:IsAbleToGraveAsCost()
......
...@@ -81,7 +81,7 @@ function c87490445.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -81,7 +81,7 @@ function c87490445.disop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterFlagEffect(87490445,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) c:RegisterFlagEffect(87490445,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) c:RemoveOverlayCard(tp,1,1,REASON_EFFECT)
Duel.NegateEffect(ev) Duel.NegateEffect(ev)
if c:IsRelateToEffect(e) then --if c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
...@@ -89,7 +89,7 @@ function c87490445.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -89,7 +89,7 @@ function c87490445.disop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(1) e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end --end
end end
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