Commit 8e4c97b6 authored by Tachibana's avatar Tachibana

eme

parent 8cbc4c2c
Pipeline #6344 passed with stages
in 31 minutes and 56 seconds
......@@ -36,7 +36,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
--cannot be target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
......@@ -46,22 +46,42 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e2:SetTarget(cm.eftg)
e2:SetValue(cm.indval)
c:RegisterEffect(e2)
--cannot material
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e3:SetTarget(cm.eftg)
e3:SetValue(1)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
c:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e5)
local e6=e3:Clone()
e6:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e6)
end
end
function cm.eftg(e,c)
local seq=c:GetSequence()
local tp=e:GetHandler():GetControler()
local mg=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
local sg=Duel.GetFieldGroup(tp,LOCATION_SZONE,0)
local t1=mg:IsContains(e:GetHandler()) and mg:IsContains(c)
local t2=sg:IsContains(e:GetHandler()) and sg:IsContains(c)
return e:GetHandler():GetColumnGroup():IsContains(c) or (seq<5 and math.abs(e:GetHandler():GetSequence()-seq)<=1 and (t1 or t2))
local seq1=c:GetSequence()
local seq2=e:GetHandler():GetSequence()
local t1=e:GetHandler():GetColumnGroup():IsContains(c)
local t2=seq1<5 and seq2<5 and mg:IsContains(c) and math.abs(seq1-seq2)<=1
return t1 or t2 or e:GetHandler()==c
end
function cm.indval(e,re,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return true 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