Commit 19e5be54 authored by Chrono-Genex's avatar Chrono-Genex Committed by GitHub

update for neos fusion (#1851)

parent 2e535eb9
...@@ -23,7 +23,6 @@ function c11502550.initial_effect(c) ...@@ -23,7 +23,6 @@ function c11502550.initial_effect(c)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
c11502550.material_setcode=0x8 c11502550.material_setcode=0x8
c11502550.neos_fusion=true
function c11502550.splimit(e,se,sp,st) function c11502550.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end end
......
...@@ -34,7 +34,8 @@ function c14088859.filter1(c,e) ...@@ -34,7 +34,8 @@ function c14088859.filter1(c,e)
return c:IsAbleToGrave() and not c:IsImmuneToEffect(e) return c:IsAbleToGrave() and not c:IsImmuneToEffect(e)
end end
function c14088859.filter2(c,e,tp,m,chkf) function c14088859.filter2(c,e,tp,m,chkf)
return c.neos_fusion and aux.IsMaterialListCode(c,89943723) local min,max=aux.GetMaterialListCount(c)
return min==2 and max==2 and aux.IsMaterialListCode(c,89943723)
and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and c:CheckFusionMaterial(m,nil,chkf,true) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and c:CheckFusionMaterial(m,nil,chkf,true)
end end
function c14088859.target(e,tp,eg,ep,ev,re,r,rp,chk) function c14088859.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -26,7 +26,6 @@ function c28677304.initial_effect(c) ...@@ -26,7 +26,6 @@ function c28677304.initial_effect(c)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
c28677304.material_setcode=0x8 c28677304.material_setcode=0x8
c28677304.neos_fusion=true
function c28677304.splimit(e,se,sp,st) function c28677304.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end end
......
...@@ -26,7 +26,6 @@ function c48996569.initial_effect(c) ...@@ -26,7 +26,6 @@ function c48996569.initial_effect(c)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
c48996569.material_setcode=0x8 c48996569.material_setcode=0x8
c48996569.neos_fusion=true
function c48996569.splimit(e,se,sp,st) function c48996569.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end end
......
...@@ -23,7 +23,6 @@ function c5128859.initial_effect(c) ...@@ -23,7 +23,6 @@ function c5128859.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
c5128859.material_setcode=0x8 c5128859.material_setcode=0x8
c5128859.neos_fusion=true
function c5128859.splimit(e,se,sp,st) function c5128859.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end end
......
...@@ -26,7 +26,6 @@ function c55171412.initial_effect(c) ...@@ -26,7 +26,6 @@ function c55171412.initial_effect(c)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
c55171412.material_setcode=0x8 c55171412.material_setcode=0x8
c55171412.neos_fusion=true
function c55171412.splimit(e,se,sp,st) function c55171412.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end end
......
...@@ -30,7 +30,6 @@ function c64655485.initial_effect(c) ...@@ -30,7 +30,6 @@ function c64655485.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
c64655485.material_setcode=0x8 c64655485.material_setcode=0x8
c64655485.neos_fusion=true
function c64655485.ffilter(c) function c64655485.ffilter(c)
return c:IsLevelBelow(4) and c:IsFusionType(TYPE_EFFECT) return c:IsLevelBelow(4) and c:IsFusionType(TYPE_EFFECT)
end end
......
...@@ -36,7 +36,6 @@ function c72926163.initial_effect(c) ...@@ -36,7 +36,6 @@ function c72926163.initial_effect(c)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
c72926163.material_setcode=0x8 c72926163.material_setcode=0x8
c72926163.neos_fusion=true
function c72926163.valcheck(e,c) function c72926163.valcheck(e,c)
local g=c:GetMaterial() local g=c:GetMaterial()
local atk=0 local atk=0
......
...@@ -23,7 +23,6 @@ function c81566151.initial_effect(c) ...@@ -23,7 +23,6 @@ function c81566151.initial_effect(c)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
c81566151.material_setcode=0x8 c81566151.material_setcode=0x8
c81566151.neos_fusion=true
function c81566151.splimit(e,se,sp,st) function c81566151.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end end
......
...@@ -27,7 +27,6 @@ function c85507811.initial_effect(c) ...@@ -27,7 +27,6 @@ function c85507811.initial_effect(c)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
c85507811.material_setcode=0x8 c85507811.material_setcode=0x8
c85507811.neos_fusion=true
function c85507811.splimit(e,se,sp,st) function c85507811.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end end
......
...@@ -43,7 +43,6 @@ function c86346643.initial_effect(c) ...@@ -43,7 +43,6 @@ function c86346643.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
c86346643.material_setcode=0x8 c86346643.material_setcode=0x8
c86346643.neos_fusion=true
function c86346643.cfilter1(c) function c86346643.cfilter1(c)
return c:IsAbleToGraveAsCost() return c:IsAbleToGraveAsCost()
end end
......
...@@ -33,7 +33,6 @@ function c90307498.initial_effect(c) ...@@ -33,7 +33,6 @@ function c90307498.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c90307498.material_setcode=0x8 c90307498.material_setcode=0x8
c90307498.neos_fusion=true
function c90307498.damcon(e,tp,eg,ep,ev,re,r,rp) function c90307498.damcon(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetHandler():GetBattleTarget() local bc=e:GetHandler():GetBattleTarget()
return bc and bc:IsControler(1-tp) return bc and bc:IsControler(1-tp)
......
...@@ -1126,10 +1126,13 @@ function Auxiliary.AddFusionProcMix(c,sub,insf,...) ...@@ -1126,10 +1126,13 @@ function Auxiliary.AddFusionProcMix(c,sub,insf,...)
mat[val[i]]=true mat[val[i]]=true
end end
end end
if c.material==nil then local mt=getmetatable(c)
local mt=getmetatable(c) if mt.material==nil then
mt.material=mat mt.material=mat
end end
if mt.material_count==nil then
mt.material_count={#fun,#fun}
end
for index,_ in pairs(mat) do for index,_ in pairs(mat) do
Auxiliary.AddCodeList(c,index) Auxiliary.AddCodeList(c,index)
end end
...@@ -1242,10 +1245,13 @@ function Auxiliary.AddFusionProcMixRep(c,sub,insf,fun1,minc,maxc,...) ...@@ -1242,10 +1245,13 @@ function Auxiliary.AddFusionProcMixRep(c,sub,insf,fun1,minc,maxc,...)
mat[val[i]]=true mat[val[i]]=true
end end
end end
if c.material==nil then local mt=getmetatable(c)
local mt=getmetatable(c) if mt.material==nil then
mt.material=mat mt.material=mat
end end
if mt.material_count==nil then
mt.material_count={#fun+minc-1,#fun+maxc-1}
end
for index,_ in pairs(mat) do for index,_ in pairs(mat) do
Auxiliary.AddCodeList(c,index) Auxiliary.AddCodeList(c,index)
end end
...@@ -2144,6 +2150,10 @@ end ...@@ -2144,6 +2150,10 @@ end
function Auxiliary.IsMaterialListType(c,type) function Auxiliary.IsMaterialListType(c,type)
return c.material_type and type&c.material_type==type return c.material_type and type&c.material_type==type
end end
function Auxiliary.GetMaterialListCount(c)
if not c.material_count then return 0,0 end
return c.material_count[1],c.material_count[2]
end
function Auxiliary.AddCodeList(c,...) function Auxiliary.AddCodeList(c,...)
if c:IsStatus(STATUS_COPYING_EFFECT) then return end if c:IsStatus(STATUS_COPYING_EFFECT) then return end
if c.card_code_list==nil then if c.card_code_list==nil then
......
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