Commit 62e46f44 authored by nekrozar's avatar nekrozar Committed by DailyShana

fix Dark Zebra (#505)

parent 7362fd18
...@@ -15,7 +15,6 @@ function c59784896.initial_effect(c) ...@@ -15,7 +15,6 @@ function c59784896.initial_effect(c)
end end
function c59784896.condition(e,tp,eg,ep,ev,re,r,rp) function c59784896.condition(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==1 return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==1
and e:GetHandler():IsAttackPos()
end end
function c59784896.target(e,tp,eg,ep,ev,re,r,rp,chk) function c59784896.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
...@@ -23,13 +22,12 @@ function c59784896.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -23,13 +22,12 @@ function c59784896.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c59784896.operation(e,tp,eg,ep,ev,re,r,rp) function c59784896.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsPosition(POS_FACEUP_ATTACK) then if c:IsRelateToEffect(e) and c:IsPosition(POS_FACEUP_ATTACK) and Duel.ChangePosition(c,POS_FACEUP_DEFENSE)~=0 then
Duel.ChangePosition(c,POS_FACEUP_DEFENSE) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_COPY_INHERIT)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_COPY_INHERIT)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
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