Commit e9e5361f authored by nanahira's avatar nanahira
parents dc407208 bc45a8b2
......@@ -2,7 +2,7 @@
function c1000813.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x6204),3,true)
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x5204),3,true)
--to grave
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
......
......@@ -2,7 +2,7 @@
function c1000819.initial_effect(c)
--FUSION
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,51105)
......@@ -10,28 +10,33 @@ function c1000819.initial_effect(c)
e1:SetOperation(c1000819.op)
c:RegisterEffect(e1)
end
function c1000819.filter3(c)
return c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
function c1000819.filter0(c)
return c:IsOnField() and c:IsAbleToRemove()
end
function c1000819.filter4(c,e)
return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
function c1000819.filter1(c,e)
return c:IsOnField() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
end
function c1000819.filter5(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x3204) and (not f or f(c))
function c1000819.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x5204) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c1000819.filter3(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
end
function c1000819.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=Duel.GetMZoneCount(tp)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c1000819.filter3,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,nil)
local res=Duel.IsExistingMatchingCard(c1000819.filter5,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c1000819.filter0,nil)
local mg2=Duel.GetMatchingGroup(c1000819.filter3,tp,LOCATION_GRAVE+LOCATION_HAND,0,nil)
mg1:Merge(mg2)
local res=Duel.IsExistingMatchingCard(c1000819.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c1000819.filter5,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
res=Duel.IsExistingMatchingCard(c1000819.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
return res
......@@ -39,17 +44,19 @@ function c1000819.tg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c1000819.op(e,tp,eg,ep,ev,re,r,rp)
local chkf=Duel.GetMZoneCount(tp)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c1000819.filter4,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,nil,e)
local sg1=Duel.GetMatchingGroup(c1000819.filter5,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c1000819.filter1,nil,e)
local mg2=Duel.GetMatchingGroup(c1000819.filter3,tp,LOCATION_GRAVE+LOCATION_HAND,0,nil)
mg1:Merge(mg2)
local sg1=Duel.GetMatchingGroup(c1000819.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c1000819.filter5,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
sg2=Duel.GetMatchingGroup(c1000819.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
......@@ -64,7 +71,7 @@ function c1000819.op(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
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