Commit c322eeb0 authored by Grajade's avatar Grajade

Update c1110000.lua

parent 62037d9e
......@@ -2,29 +2,62 @@ muxu=muxu or {}
local cm=muxu
--scripts
function cm.AddSpsummonSelf(c,fcon,fop,limit,code)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
if limit then e1:SetCountLimit(limit,code+EFFECT_COUNT_CODE_OATH) end
e1:SetCondition(cm.AddSpsummonSelfFcon(fcon))
e1:SetOperation(cm.AddSpsummonSelfFop(fop))
e1:SetValue(SUMMON_VALUE_SELF)
c:RegisterEffect(e1)
return e1
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
if limit then e1:SetCountLimit(limit,code+EFFECT_COUNT_CODE_OATH) end
e1:SetCondition(cm.AddSpsummonSelfFcon(fcon)) end
e1:SetOperation(cm.AddSpsummonSelfFop(fop)) end
e1:SetValue(SUMMON_VALUE_SELF)
c:RegisterEffect(e1)
return e1
end
function cm.AddSpsummonSelfFcon(fcon)
return
function(e,c)
if c==nil then return true end
return fcon(e,c)
end
return
function(e,c)
if c==nil then return true end
if fcon then return fcon(e,c) end
return true
end
end
function cm.AddSpsummonSelfFop(fop)
return
function(e,tp,eg,ep,ev,re,r,rp,c)
if fop then fop(e,tp,eg,ep,ev,re,r,rp,c) end
end
return
function(e,tp,eg,ep,ev,re,r,rp,c)
if fop then fop(e,tp,eg,ep,ev,re,r,rp,c) 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