Commit 199fff12 authored by 聖園ミカ's avatar 聖園ミカ 🐟

byd

parent bd304a20
...@@ -21,9 +21,9 @@ function cm.initial_effect(c) ...@@ -21,9 +21,9 @@ function cm.initial_effect(c)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetCountLimit(1,m+900) e2:SetCountLimit(1,m+900)
e2:SetCondition(cm.spcon) e2:SetCondition(cm.fuscon)
e2:SetTarget(cm.sptg) e2:SetTarget(cm.fustg)
e2:SetOperation(cm.spop) e2:SetOperation(cm.fusop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function cm.cfilter(c,ft) function cm.cfilter(c,ft)
...@@ -49,42 +49,43 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,42 +49,43 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp) function cm.fuscon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2 return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end end
function cm.spfilter1(c,e) function cm.filter1(c,e)
return not c:IsImmuneToEffect(e) return not c:IsImmuneToEffect(e)
end end
function cm.spfilter2(c,e,tp,m,f,gc,chkf) function cm.filter2(c,e,tp,m,f,gc,chkf)
return c:IsType(TYPE_FUSION) and c:IsAttack(1550) and c:IsDefense(1050) and (not f or f(c)) return c:IsType(TYPE_FUSION) and c:IsAttack(1550) and c:IsDefense(1050) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,gc,chkf) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,gc,chkf)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.fustg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then if chk==0 then
local chkf=tp local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsOnField,nil) local mg1=Duel.GetFusionMaterial(tp)
local res=Duel.IsExistingMatchingCard(cm.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,c,chkf) local res=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,c,chkf)
if not res then if not res then
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce~=nil then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp) local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue() local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(cm.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,c,chkf) res=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,c,chkf)
end end
end end
return res return res
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.fusop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local chkf=tp local chkf=tp
if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end
local mg1=Duel.GetFusionMaterial(tp):Filter(cm.spfilter1,nil,e) local mg1=Duel.GetFusionMaterial(tp):Filter(cm.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(cm.spfilter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,c,chkf) local sg1=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,c,chkf)
local mg2=nil local mg2=nil
local sg2=nil local sg2=nil
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
...@@ -92,7 +93,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -92,7 +93,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp) mg2=fgroup(ce,e,tp)
local mf=ce:GetValue() local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(cm.spfilter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,c,chkf) sg2=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,c,chkf)
end end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone() local sg=sg1:Clone()
......
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