Commit c322eeb0 authored by Grajade's avatar Grajade

Update c1110000.lua

parent 62037d9e
...@@ -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
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