Commit dba86a2b authored by Tachibana's avatar Tachibana

move

parents 1aa66a47 56f1e819
...@@ -8,8 +8,8 @@ function cm.AddSpsummonSelf(c,fcon,fop,limit,code) ...@@ -8,8 +8,8 @@ function cm.AddSpsummonSelf(c,fcon,fop,limit,code)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
if limit then e1:SetCountLimit(limit,code+EFFECT_COUNT_CODE_OATH) end if limit then e1:SetCountLimit(limit,code+EFFECT_COUNT_CODE_OATH) end
e1:SetCondition(cm.AddSpsummonSelfFcon(fcon)) e1:SetCondition(cm.AddSpsummonSelfFcon(fcon)) end
e1:SetOperation(cm.AddSpsummonSelfFop(fop)) e1:SetOperation(cm.AddSpsummonSelfFop(fop)) end
e1:SetValue(SUMMON_VALUE_SELF) e1:SetValue(SUMMON_VALUE_SELF)
c:RegisterEffect(e1) c:RegisterEffect(e1)
return e1 return e1
...@@ -18,7 +18,8 @@ function cm.AddSpsummonSelfFcon(fcon) ...@@ -18,7 +18,8 @@ function cm.AddSpsummonSelfFcon(fcon)
return return
function(e,c) function(e,c)
if c==nil then return true end if c==nil then return true end
return fcon(e,c) if fcon then return fcon(e,c) end
return true
end end
end end
function cm.AddSpsummonSelfFop(fop) function cm.AddSpsummonSelfFop(fop)
...@@ -28,3 +29,35 @@ function cm.AddSpsummonSelfFop(fop) ...@@ -28,3 +29,35 @@ function cm.AddSpsummonSelfFop(fop)
end end
end end
-- --
function cm.CardSingleUpdateAttack(c,tc,val,reset)
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_SET_ATTACK)
if aux.GetValueType(val)=="int" then
e1:SetValue(val)
elseif aux.GetValueType(val)=="function" then
e1:SetValue(cm.CardSingleUpdateAttackVal(val))
end
if reset then e1:SetReset(reset) end
c:RegisterEffect(e1)
end
function cm.CardSingleUpdateDefense(c,tc,val,reset)
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_SET_DEFENSE)
if aux.GetValueType(val)=="int" then
e1:SetValue(val)
elseif aux.GetValueType(val)=="function" then
e1:SetValue(cm.CardSingleUpdateAttackVal(val))
end
if reset then e1:SetReset(reset) end
c:RegisterEffect(e1)
end
function cm.CardSingleUpdateAttackVal(val)
return
function(e,c) return val(e,c) end
end
\ No newline at end of file
...@@ -36,7 +36,7 @@ function cm.filterd(c) ...@@ -36,7 +36,7 @@ function cm.filterd(c)
return c:IsFaceup() and c:IsSetCard(code) return c:IsFaceup() and c:IsSetCard(code)
end end
function cm.filter(c,tcode) function cm.filter(c,tcode)
return c:IsSetCard(code) and not c:IsCode(tcode) return c:IsSetCard(code) and not c:IsCode(tcode) and c:IsType(TYPE_MONSTER)
end end
function cm.handcon(e) function cm.handcon(e)
local tp=e:GetHandler():GetControler() local tp=e:GetHandler():GetControler()
......
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