Commit c926d656 authored by Nemo Ma's avatar Nemo Ma

Update c33701394.lua

parent e52f3b23
...@@ -36,39 +36,38 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -36,39 +36,38 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
--cannot be target --cannot be target
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) 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:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD) e1:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e1:SetTarget(cm.eftg) e1:SetTarget(cm.eftg)
e1:SetValue(aux.tgoval) e1:SetValue(aux.tgoval)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--indes --indes
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD) e2:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e2:SetTarget(cm.eftg) e2:SetTarget(cm.eftg)
e2:SetValue(cm.indval) e2:SetValue(cm.indval)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2) c:RegisterEffect(e2)
-- --cannot material
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD) e3:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e3:SetTarget(cm.eftg) e3:SetTarget(cm.eftg)
e3:SetValue(1) e3:SetValue(1)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=e3:Clone() local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
c:RegisterEffect(e4) c:RegisterEffect(e4)
local e5=e3:Clone() local e5=e3:Clone()
e5:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL) e5:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e5) c:RegisterEffect(e5)
local e6=e3:Clone() local e6=e3:Clone()
e6:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL) e6:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
...@@ -76,13 +75,13 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -76,13 +75,13 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.eftg(e,c) function cm.eftg(e,c)
local seq=c:GetSequence()
local tp=e:GetHandler():GetControler() local tp=e:GetHandler():GetControler()
local mg=Duel.GetFieldGroup(tp,LOCATION_MZONE,0) local mg=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
local sg=Duel.GetFieldGroup(tp,LOCATION_SZONE,0) local seq1=c:GetSequence()
local t1=mg:IsContains(e:GetHandler()) and mg:IsContains(c) local seq2=e:GetHandler():GetSequence()
local t2=sg:IsContains(e:GetHandler()) and sg:IsContains(c) local t1=e:GetHandler():GetColumnGroup():IsContains(c)
return e:GetHandler():GetColumnGroup():IsContains(c) or (seq<5 and math.abs(e:GetHandler():GetSequence()-seq)<=1 and (t1 or t2)) 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 end
function cm.indval(e,re,rp) function cm.indval(e,re,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return true end 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