Commit dba86a2b authored by Tachibana's avatar Tachibana

move

parents 1aa66a47 56f1e819
...@@ -2,29 +2,62 @@ muxu=muxu or {} ...@@ -2,29 +2,62 @@ muxu=muxu or {}
local cm=muxu local cm=muxu
--scripts --scripts
function cm.AddSpsummonSelf(c,fcon,fop,limit,code) function cm.AddSpsummonSelf(c,fcon,fop,limit,code)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_PROC)
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
end end
function cm.AddSpsummonSelfFcon(fcon) 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
end return true
end
end end
function cm.AddSpsummonSelfFop(fop) function cm.AddSpsummonSelfFop(fop)
return return
function(e,tp,eg,ep,ev,re,r,rp,c) function(e,tp,eg,ep,ev,re,r,rp,c)
if fop then fop(e,tp,eg,ep,ev,re,r,rp,c) end if fop then fop(e,tp,eg,ep,ev,re,r,rp,c) end
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