Commit 8776c02f authored by 未闻皂名's avatar 未闻皂名

2025/4/21 bug修复

parent 48d46059
Pipeline #35370 passed with stages
in 12 minutes and 59 seconds
......@@ -15,15 +15,20 @@ function cm.initial_effect(c)
c:RegisterEffect(e1)
end
--Activate
function cm.matfilter1(c,e,tp)
return c:IsFaceup() and RD.IsLegendCode(c,list[2]) and c:IsCanBeFusionMaterial()
and not c:IsImmuneToEffect(e) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_FMATERIAL)
end
function cm.matfilter2(c,e,tp)
return c:IsFaceup() and c:IsCode(list[3]) and c:IsCanBeFusionMaterial()
and not c:IsImmuneToEffect(e) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_FMATERIAL)
end
function cm.matfilter(c,e,tp)
return (RD.IsLegendCode(c,list[1]) or c:IsCode(list[2]))
and c:IsFaceup() and c:IsCanBeFusionMaterial()
and not tc:IsImmuneToEffect(e)
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_FMATERIAL)
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
return (cm.matfilter1(c,e,tp) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,list[2]))
or (cm.matfilter2(c,e,tp) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,list[3]))
end
function cm.spfilter(c,e,tp,tc)
return c:IsType(TYPE_FUSION) and aux.IsMaterialListCode(c,tc:GetCode())
function cm.spfilter(c,e,tp,tc,code)
return c:IsType(TYPE_FUSION) and aux.IsMaterialListCode(c,code)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0
end
......@@ -34,14 +39,14 @@ end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local mat=Duel.GetMatchingGroup(cm.matfilter,tp,LOCATION_MZONE,0,nil,e,tp)
if mat:GetCount()==0 then return end
local mat1=mat:Filter(RD.IsLegendCode,nil,list[1])
local mat2=mat:Filter(RD.IsCode,nil,list[2])
local mat1=mat:Filter(RD.IsLegendCode,nil,list[2])
local mat2=mat:Filter(Card.IsCode,nil,list[3])
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local code=aux.SelectFromOptions(tp,
{mat1:GetCount()>0,aux.Stringid(m,1),list[1]},
{mat2:GetCount()>1,aux.Stringid(m,2),list[2]}
{mat1:GetCount()>0,aux.Stringid(m,1),list[2]},
{mat2:GetCount()>0,aux.Stringid(m,2),list[3]}
)
if code==list[1] then
if code==list[2] then
mat=mat1
else
mat=mat2
......@@ -49,7 +54,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local tc=mat:Select(tp,1,1,nil):GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc)
local sg=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,code)
local sc=sg:GetFirst()
if sc then
sc:SetMaterial(Group.FromCards(tc))
......
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