Commit 201be757 authored by mercury233's avatar mercury233 Committed by nekrozar

update fusion spells (#1244)

* update fusion spells

* update

* update
parent 0cd7447e
......@@ -28,20 +28,21 @@ function c36484016.filter1(c,e)
end
function c36484016.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and aux.IsMaterialListType(c,TYPE_SYNCHRO) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and m:IsExists(c36484016.filter3,1,nil,c,m,chkf)
end
function c36484016.filter3(c,fusc,m,chkf)
return c:IsType(TYPE_SYNCHRO) and fusc:CheckFusionMaterial(m,c,chkf)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c36484016.filter4(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
end
function c36484016.fcheck(tp,sg,fc)
return sg:IsExists(Card.IsFusionType,1,nil,TYPE_SYNCHRO)
end
function c36484016.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c36484016.filter0,nil)
local mg2=Duel.GetMatchingGroup(c36484016.filter4,tp,LOCATION_GRAVE,0,nil)
mg1:Merge(mg2)
aux.FCheckAdditional=c36484016.fcheck
local res=Duel.IsExistingMatchingCard(c36484016.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
......@@ -52,6 +53,7 @@ function c36484016.target(e,tp,eg,ep,ev,re,r,rp,chk)
res=Duel.IsExistingMatchingCard(c36484016.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
aux.FCheckAdditional=nil
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
......@@ -62,6 +64,7 @@ function c36484016.activate(e,tp,eg,ep,ev,re,r,rp)
local mg1=Duel.GetFusionMaterial(tp):Filter(c36484016.filter1,nil,e)
local mg2=Duel.GetMatchingGroup(c36484016.filter4,tp,LOCATION_GRAVE,0,nil)
mg1:Merge(mg2)
aux.FCheckAdditional=c36484016.fcheck
local sg1=Duel.GetMatchingGroup(c36484016.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil
local sg2=nil
......@@ -79,24 +82,19 @@ function c36484016.activate(e,tp,eg,ep,ev,re,r,rp)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local gc=mg1:FilterSelect(tp,c36484016.filter3,1,1,nil,tc,mg1,chkf):GetFirst()
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,gc,chkf)
mat1:AddCard(gc)
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.Remove(mat1,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local gc=mg3:FilterSelect(tp,c36484016.filter3,1,1,nil,tc,mg3,chkf):GetFirst()
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,gc,chkf)
mat2:AddCard(gc)
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
aux.FCheckAdditional=nil
end
function c36484016.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -29,14 +29,14 @@ function c41940225.filter1(c,e)
return c:IsFaceup() and c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
end
function c41940225.filter2(c,e,tp,m,f,chkf)
return c41940225.spfilter(c) and (not f or f(c))
return c:IsType(TYPE_FUSION) and aux.IsMaterialListCode(c,78193831) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c41940225.filter3(c,e)
return not c:IsImmuneToEffect(e)
end
function c41940225.spfilter(c)
return aux.IsMaterialListCode(c,78193831)
function c41940225.fcheck(tp,sg,fc)
return sg:IsExists(Card.IsFusionCode,1,nil,78193831)
end
function c41940225.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
......@@ -44,6 +44,7 @@ function c41940225.target(e,tp,eg,ep,ev,re,r,rp,chk)
local mg1=Duel.GetFusionMaterial(tp)
local mg2=Duel.GetMatchingGroup(c41940225.filter0,tp,0,LOCATION_MZONE,nil)
mg1:Merge(mg2)
aux.FCheckAdditional=c41940225.fcheck
local res=Duel.IsExistingMatchingCard(c41940225.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
......@@ -54,6 +55,7 @@ function c41940225.target(e,tp,eg,ep,ev,re,r,rp,chk)
res=Duel.IsExistingMatchingCard(c41940225.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
aux.FCheckAdditional=nil
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
......@@ -63,6 +65,7 @@ function c41940225.activate(e,tp,eg,ep,ev,re,r,rp)
local mg1=Duel.GetFusionMaterial(tp):Filter(c41940225.filter3,nil,e)
local mg2=Duel.GetMatchingGroup(c41940225.filter1,tp,0,LOCATION_MZONE,nil,e)
mg1:Merge(mg2)
aux.FCheckAdditional=c41940225.fcheck
local sg1=Duel.GetMatchingGroup(c41940225.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil
local sg2=nil
......@@ -92,6 +95,7 @@ function c41940225.activate(e,tp,eg,ep,ev,re,r,rp)
end
tc:CompleteProcedure()
end
aux.FCheckAdditional=nil
end
function c41940225.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end
......
......@@ -17,15 +17,19 @@ function c52947044.filter1(c,e)
return not c:IsImmuneToEffect(e) and c:IsLocation(LOCATION_HAND)
end
function c52947044.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (aux.IsMaterialListSetCard(c,0xc008) or c:IsCode(30757127,76263644,90579153,93657021)) and (not f or f(c))
return c:IsType(TYPE_FUSION) and aux.IsMaterialListSetCard(c,0xc008) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c52947044.fcheck(tp,sg,fc)
return sg:IsExists(Card.IsFusionSetCard,1,nil,0xc008)
end
function c52947044.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsLocation,nil,LOCATION_HAND)
local mg2=Duel.GetMatchingGroup(c52947044.filter0,tp,LOCATION_DECK,0,nil)
mg1:Merge(mg2)
aux.FCheckAdditional=c52947044.fcheck
local res=Duel.IsExistingMatchingCard(c52947044.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
......@@ -36,6 +40,7 @@ function c52947044.target(e,tp,eg,ep,ev,re,r,rp,chk)
res=Duel.IsExistingMatchingCard(c52947044.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
aux.FCheckAdditional=nil
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
......@@ -46,6 +51,7 @@ function c52947044.activate(e,tp,eg,ep,ev,re,r,rp)
local mg1=Duel.GetFusionMaterial(tp):Filter(c52947044.filter1,nil,e)
local mg2=Duel.GetMatchingGroup(c52947044.filter0,tp,LOCATION_DECK,0,nil)
mg1:Merge(mg2)
aux.FCheckAdditional=c52947044.fcheck
local sg1=Duel.GetMatchingGroup(c52947044.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil
local sg2=nil
......@@ -87,6 +93,7 @@ function c52947044.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetLabelObject(tc)
Duel.RegisterEffect(e1,tp)
end
aux.FCheckAdditional=nil
if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
......
......@@ -23,10 +23,14 @@ end
function c55704856.filter3(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck()
end
function c55704856.fcheck(tp,sg,fc)
return sg:IsExists(Card.IsFusionSetCard,1,nil,0x1093)
end
function c55704856.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg=Duel.GetMatchingGroup(c55704856.filter0,tp,LOCATION_MZONE+LOCATION_REMOVED,0,nil)
aux.FCheckAdditional=c55704856.fcheck
local res=Duel.IsExistingMatchingCard(c55704856.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
......@@ -37,6 +41,7 @@ function c55704856.target(e,tp,eg,ep,ev,re,r,rp,chk)
res=Duel.IsExistingMatchingCard(c55704856.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
aux.FCheckAdditional=nil
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
......@@ -44,6 +49,7 @@ end
function c55704856.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg=Duel.GetMatchingGroup(c55704856.filter1,tp,LOCATION_MZONE+LOCATION_REMOVED,0,nil,e)
aux.FCheckAdditional=c55704856.fcheck
local sg1=Duel.GetMatchingGroup(c55704856.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg,nil,chkf)
local mg3=nil
local sg2=nil
......@@ -86,6 +92,7 @@ function c55704856.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
aux.FCheckAdditional=nil
end
function c55704856.ftarget(e,c)
return e:GetLabel()~=c:GetFieldID()
......
......@@ -39,12 +39,16 @@ function c6172122.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and aux.IsMaterialListSetCard(c,0x3b) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c6172122.fcheck(tp,sg,fc)
return sg:IsExists(Card.IsFusionSetCard,1,nil,0x3b)
end
function c6172122.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
local mg2=Duel.GetMatchingGroup(c6172122.filter0,tp,LOCATION_DECK,0,nil)
mg1:Merge(mg2)
aux.FCheckAdditional=c6172122.fcheck
local res=Duel.IsExistingMatchingCard(c6172122.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
......@@ -55,6 +59,7 @@ function c6172122.target(e,tp,eg,ep,ev,re,r,rp,chk)
res=Duel.IsExistingMatchingCard(c6172122.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
aux.FCheckAdditional=nil
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
......@@ -64,6 +69,7 @@ function c6172122.activate(e,tp,eg,ep,ev,re,r,rp)
local mg1=Duel.GetFusionMaterial(tp):Filter(c6172122.filter1,nil,e)
local mg2=Duel.GetMatchingGroup(c6172122.filter0,tp,LOCATION_DECK,0,nil)
mg1:Merge(mg2)
aux.FCheckAdditional=c6172122.fcheck
local sg1=Duel.GetMatchingGroup(c6172122.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil
local sg2=nil
......@@ -100,4 +106,5 @@ function c6172122.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
aux.FCheckAdditional=nil
end
......@@ -10,7 +10,7 @@ function c64061284.initial_effect(c)
e1:SetOperation(c64061284.activate)
c:RegisterEffect(e1)
end
function c64061284.fcheck(tp,sg,fc,mg)
function c64061284.fcheck(tp,sg,fc)
if sg:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then
return sg:IsExists(c64061284.filterchk,1,nil) end
return true
......
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