Commit 0277753f authored by salix5's avatar salix5

update add fusion proc

extra parameter: function, number, table of function/number
parent 292e5836
...@@ -823,16 +823,16 @@ function Auxiliary.AddFusionProcMix(fcard,sub,insf,...) ...@@ -823,16 +823,16 @@ function Auxiliary.AddFusionProcMix(fcard,sub,insf,...)
for _,fcode in ipairs(val[i]) do for _,fcode in ipairs(val[i]) do
if type(fcode)=='function' then if type(fcode)=='function' then
if fcode(c,fc,subm,mg,sg) and not c:IsHasEffect(6205579) then return true end if fcode(c,fc,subm,mg,sg) and not c:IsHasEffect(6205579) then return true end
else elseif type(fcode)=='number' then
if c:IsFusionCode(fcode) or (subm and c:CheckFusionSubstitute(fc)) then return true end if c:IsFusionCode(fcode) or (subm and c:CheckFusionSubstitute(fc)) then return true end
end end
end end
return false return false
end end
for _,fcode in ipairs(val[i]) do for _,fcode in ipairs(val[i]) do
if type(fcode)~='function' then mat[fcode]=true end if type(fcode)=='number' then mat[fcode]=true end
end end
else elseif type(val[i])=='number' then
fun[i]=function(c,fc,subm) return c:IsFusionCode(val[i]) or (subm and c:CheckFusionSubstitute(fc)) end fun[i]=function(c,fc,subm) return c:IsFusionCode(val[i]) or (subm and c:CheckFusionSubstitute(fc)) end
mat[val[i]]=true mat[val[i]]=true
end end
...@@ -940,16 +940,16 @@ function Auxiliary.AddFusionProcMixRep(fcard,sub,insf,fun1,minc,maxc,...) ...@@ -940,16 +940,16 @@ function Auxiliary.AddFusionProcMixRep(fcard,sub,insf,fun1,minc,maxc,...)
for _,fcode in ipairs(val[i]) do for _,fcode in ipairs(val[i]) do
if type(fcode)=='function' then if type(fcode)=='function' then
if fcode(c,fc,subm) and not c:IsHasEffect(6205579) then return true end if fcode(c,fc,subm) and not c:IsHasEffect(6205579) then return true end
else elseif type(fcode)=='number' then
if c:IsFusionCode(fcode) or (subm and c:CheckFusionSubstitute(fc)) then return true end if c:IsFusionCode(fcode) or (subm and c:CheckFusionSubstitute(fc)) then return true end
end end
end end
return false return false
end end
for _,fcode in ipairs(val[i]) do for _,fcode in ipairs(val[i]) do
if type(fcode)~='function' then mat[fcode]=true end if type(fcode)=='number' then mat[fcode]=true end
end end
else elseif type(val[i])=='number' then
fun[i]=function(c,fc,subm) return c:IsFusionCode(val[i]) or (subm and c:CheckFusionSubstitute(fc)) end fun[i]=function(c,fc,subm) return c:IsFusionCode(val[i]) or (subm and c:CheckFusionSubstitute(fc)) end
mat[val[i]]=true mat[val[i]]=true
end 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