Commit a8557956 authored by Tachibana's avatar Tachibana

eme

parent 95976f69
Pipeline #7667 passed with stages
in 24 minutes and 26 seconds
......@@ -49,11 +49,14 @@ end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsFaceup() and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated())
end
function cm.filter(c)
return c:IsFaceup() and not (c:IsAttack(0) and c:IsDefense(0))
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -25,8 +25,8 @@ function cm.initial_effect(c)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
function cm.e2tgfilter(c)
return c:IsFaceup() and c:GetFlagEffect(m)==0
function cm.e2tgfilter(c,e)
return c:IsFaceup() and c:GetFlagEffect(m)==0 and c:IsImmuneToEffect(e)
end
function cm.e2tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.e2tgfilter(chkc) 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