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