Commit e2f466f5 authored by Huangnan's avatar Huangnan

fix

parent 97228cda
Pipeline #38715 failed with stages
in 85 minutes and 23 seconds
...@@ -52,15 +52,18 @@ end ...@@ -52,15 +52,18 @@ end
function s.mtfilter1(c) function s.mtfilter1(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() and c:IsCanBeFusionMaterial() return c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() and c:IsCanBeFusionMaterial()
end end
function s.mtfilter2(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() and c:IsCanBeFusionMaterial() and c:IsFaceup()
end
function s.spfilter2(c,e,tp,m,f,chkf) function s.spfilter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x5540) and (not f or f(c)) return c:IsType(TYPE_FUSION) and c:IsSetCard(0x5540) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end end
function s.fcheck(tp,sg,fc) function s.fcheck(tp,sg,fc)
return sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=1 return sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=1 and sg:FilterCount(Card.IsControler,nil,1-tp)<=1
end end
function s.gcheck(sg) function s.gcheck(sg)
return sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=1 return sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=1
end end
function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
...@@ -68,6 +71,10 @@ function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -68,6 +71,10 @@ function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
local mg1=Duel.GetFusionMaterial(tp):Filter(s.mtfilter1,nil) local mg1=Duel.GetFusionMaterial(tp):Filter(s.mtfilter1,nil)
local mg2=Duel.GetMatchingGroup(s.mtfilter1,tp,LOCATION_DECK,0,nil) local mg2=Duel.GetMatchingGroup(s.mtfilter1,tp,LOCATION_DECK,0,nil)
mg1:Merge(mg2) mg1:Merge(mg2)
if Duel.GetFlagEffect(tp,11600036)>0 then
local mg3=Duel.GetMatchingGroup(s.mtfilter2,tp,0,LOCATION_MZONE,nil)
mg1:Merge(mg3)
end
aux.FCheckAdditional=s.fcheck aux.FCheckAdditional=s.fcheck
aux.GCheckAdditional=s.gcheck aux.GCheckAdditional=s.gcheck
local res=Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) local res=Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
...@@ -91,9 +98,14 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -91,9 +98,14 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp)
local mg1=Duel.GetFusionMaterial(tp):Filter(s.spfilter1,nil,e) local mg1=Duel.GetFusionMaterial(tp):Filter(s.spfilter1,nil,e)
local mg2=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_DECK,0,nil,e) local mg2=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_DECK,0,nil,e)
mg1:Merge(mg2) mg1:Merge(mg2)
aux.FCheckAdditional=s.fcheck
aux.GCheckAdditional=s.gcheck
local sg1=Duel.GetMatchingGroup(s.spfilter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) local sg1=Duel.GetMatchingGroup(s.spfilter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=Duel.GetMatchingGroup(s.mtfilter2,tp,0,LOCATION_MZONE,nil)
if Duel.GetFlagEffect(tp,11600036)>0 then
mg3:Merge(mg1)
end
aux.FCheckAdditional=s.fcheck
aux.GCheckAdditional=s.gcheck
local sg3=Duel.GetMatchingGroup(s.spfilter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,nil,chkf)
aux.FCheckAdditional=nil aux.FCheckAdditional=nil
aux.GCheckAdditional=nil aux.GCheckAdditional=nil
local mg2=nil local mg2=nil
...@@ -103,7 +115,7 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -103,7 +115,7 @@ function s.spop2(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(s.spfilter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf) sg2=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,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()
...@@ -111,16 +123,22 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -111,16 +123,22 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil) local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst() local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
aux.FCheckAdditional=s.fcheck if Duel.GetFlagEffect(tp,11600036)>0 and tc:IsSetCard(0x5540) and sg3:GetCount()>0 then
aux.GCheckAdditional=s.gcheck aux.FCheckAdditional=s.fcheck
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) aux.GCheckAdditional=s.gcheck
aux.FCheckAdditional=nil local mat1=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
aux.GCheckAdditional=nil aux.FCheckAdditional=nil
tc:SetMaterial(mat1) aux.GCheckAdditional=nil
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) tc:SetMaterial(mat1)
Duel.BreakEffect() Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat2)
Duel.SendtoGrave(mat2,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
end
else else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf) local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation() local fop=ce:GetOperation()
...@@ -192,6 +210,16 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -192,6 +210,16 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local chkf=tp local chkf=tp
local mg1=Duel.GetFusionMaterial(tp) local mg1=Duel.GetFusionMaterial(tp)
local res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) local res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if res then return true end
if Duel.GetFlagEffect(tp,11600036)>0 and e:GetHandler():IsSetCard(0x5540) then
local mg3=Duel.GetMatchingGroup(s.mtfilter2,tp,0,LOCATION_MZONE,nil)
mg1:Merge(mg3)
end
aux.FCheckAdditional=s.fcheck
aux.GCheckAdditional=s.gcheck
local res=Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
aux.FCheckAdditional=nil
aux.GCheckAdditional=nil
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
...@@ -209,6 +237,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -209,6 +237,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(s.filter1,nil,e) local mg1=Duel.GetFusionMaterial(tp):Filter(s.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) local sg1=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=Duel.GetMatchingGroup(s.mtfilter2,tp,0,LOCATION_MZONE,nil)
mg3:Merge(mg1)
aux.FCheckAdditional=s.fcheck
aux.GCheckAdditional=s.gcheck
local sg=Duel.GetMatchingGroup(s.spfilter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,nil,chkf)
aux.FCheckAdditional=nil
aux.GCheckAdditional=nil
sg1:Merge(sg)
local mg2=nil local mg2=nil
local sg2=nil local sg2=nil
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
...@@ -225,11 +261,19 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -225,11 +261,19 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
local tg=sg:Select(tp,1,1,nil) local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst() local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) if tc:IsSetCard(0x5540) and e:GetHandler():IsSetCard(0x5540) and Duel.GetFlagEffect(tp,11600036)>0 then
tc:SetMaterial(mat1) local mat1=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) tc:SetMaterial(mat1)
Duel.BreakEffect() Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
end
else else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf) local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation() local fop=ce:GetOperation()
......
...@@ -33,6 +33,16 @@ end ...@@ -33,6 +33,16 @@ end
function s.cfilter(c) function s.cfilter(c)
return c:IsCode(11600016) and c:IsFaceup() return c:IsCode(11600016) and c:IsFaceup()
end end
function s.mtfilter2(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() and c:IsCanBeFusionMaterial() and c:IsFaceup()
end
function s.fcheck(tp,sg,fc)
return sg:FilterCount(Card.IsControler,nil,1-tp)<=1
end
function s.spfilter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x5540) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local chkf=tp local chkf=tp
...@@ -42,6 +52,16 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -42,6 +52,16 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
mg1:Merge(mg2) mg1:Merge(mg2)
end end
local res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) local res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if res then return true end
if Duel.GetFlagEffect(tp,11600036)>0 then
local mg3=Duel.GetMatchingGroup(s.mtfilter2,tp,0,LOCATION_MZONE,nil)
mg1:Merge(mg3)
end
aux.FCheckAdditional=s.fcheck
aux.GCheckAdditional=nil
local res=Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
aux.FCheckAdditional=nil
aux.GCheckAdditional=nil
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
...@@ -63,6 +83,15 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -63,6 +83,15 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
mg1:Merge(mg2) mg1:Merge(mg2)
end end
local sg1=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) local sg1=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg4=Duel.GetMatchingGroup(s.mtfilter2,tp,0,LOCATION_MZONE,nil)
if Duel.GetFlagEffect(tp,11600036)>0 then
mg4:Merge(mg1)
end
aux.FCheckAdditional=s.fcheck
aux.GCheckAdditional=nil
local sg3=Duel.GetMatchingGroup(s.spfilter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg4,nil,chkf)
aux.FCheckAdditional=nil
aux.GCheckAdditional=nil
local mg3=nil local mg3=nil
local sg2=nil local sg2=nil
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
...@@ -79,14 +108,26 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -79,14 +108,26 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
local tg=sg:Select(tp,1,1,nil) local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst() local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) if tc:IsSetCard(0x5540) and Duel.GetFlagEffect(tp,11600036)>0 then
tc:SetMaterial(mat1) local mat1=Duel.SelectFusionMaterial(tp,tc,mg4,nil,chkf)
local tdg=mat1:Filter(s.tdfilter,nil) tc:SetMaterial(mat1)
mat1:Sub(tdg) local tdg=mat1:Filter(s.tdfilter,nil)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) mat1:Sub(tdg)
Duel.SendtoDeck(tdg,nil,2,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect() Duel.SendtoDeck(tdg,nil,2,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
local tdg=mat1:Filter(s.tdfilter,nil)
mat1:Sub(tdg)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.SendtoDeck(tdg,nil,2,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
end
else else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf) local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation() local fop=ce:GetOperation()
......
...@@ -14,7 +14,7 @@ function s.initial_effect(c) ...@@ -14,7 +14,7 @@ function s.initial_effect(c)
e2:SetDescription(aux.Stringid(id,0)) e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_LEAVE_FIELD) e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id+10000) e2:SetCountLimit(1,id+10000)
......
...@@ -87,13 +87,26 @@ function s.filter2(c,e,tp,m,f,gc,chkf) ...@@ -87,13 +87,26 @@ function s.filter2(c,e,tp,m,f,gc,chkf)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,true) and c:CheckFusionMaterial(m,gc,chkf) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,true) and c:CheckFusionMaterial(m,gc,chkf)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function s.mtfilter2(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() and c:IsCanBeFusionMaterial() and c:IsFaceup()
end
function s.fcheck(tp,sg,fc)
return sg:FilterCount(Card.IsControler,nil,1-tp)<=1
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) function s.distg(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.GetMatchingGroup(s.filter0,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_PZONE,0,nil) local mg1=Duel.GetMatchingGroup(s.filter0,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_PZONE,0,nil)
mg1:AddCard(c) if Duel.GetFlagEffect(tp,11600036)>0 then
local res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,c,chkf) local mg3=Duel.GetMatchingGroup(s.mtfilter2,tp,0,LOCATION_MZONE,nil)
mg1:Merge(mg3)
end
aux.FCheckAdditional=s.fcheck
aux.GCheckAdditional=nil
local res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
aux.FCheckAdditional=nil
aux.GCheckAdditional=nil
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
...@@ -113,8 +126,15 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -113,8 +126,15 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp)
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.GetMatchingGroup(s.filter1,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_PZONE,0,nil,e) local mg1=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_PZONE,0,nil,e)
mg1:AddCard(c) if Duel.GetFlagEffect(tp,11600036)>0 then
local sg1=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,c,chkf) local mg3=Duel.GetMatchingGroup(s.mtfilter2,tp,0,LOCATION_MZONE,nil)
mg1:Merge(mg3)
end
aux.FCheckAdditional=s.fcheck
aux.GCheckAdditional=nil
local sg1=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
aux.FCheckAdditional=nil
aux.GCheckAdditional=nil
local mg2=nil local mg2=nil
local sg2=nil local sg2=nil
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
......
...@@ -30,8 +30,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -30,8 +30,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
function s.operation(e,tp,eg,ep,ev,re,r,rp) function s.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,id,0,0,0) if Duel.GetFlagEffect(tp,id)<1 then
if Duel.GetFlagEffect(tp,id)>1 then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
...@@ -39,18 +38,19 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,18 +38,19 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EVENT_DESTROYED) e1:SetCode(EVENT_DESTROYED)
e1:SetOperation(s.thop2) e1:SetOperation(s.thop2)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,id,0,0,0)
end end
end end
function s.cfilter2(c,tp) function s.cfilter2(c,e,tp)
return c:IsPreviousControler(tp) and c:IsReason(REASON_EFFECT) and (c:IsLocation(LOCATION_GRAVE) or c:IsLocation(LOCATION_EXTRA)) and c:IsFaceup() and c:IsSetCard(0x5541) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsPreviousControler(tp) and c:IsReason(REASON_EFFECT) and (c:IsLocation(LOCATION_GRAVE) or (c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0)) and c:IsFaceup() and c:IsSetCard(0x5541) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function s.thop2(e,tp,eg,ep,ev,re,r,rp) function s.thop2(e,tp,eg,ep,ev,re,r,rp)
local ss=Duel.GetLocationCount(LOCATION_MZONE) local ss=Duel.GetLocationCount(tp,LOCATION_MZONE)
local sg=eg:Filter(s.cfilter2,nil,tp) local sg=eg:Filter(s.cfilter2,nil,e,tp)
if Duel.GetFlagEffect(tp,id+10000)<2 and sg:GetCount()<=ss and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then if Duel.GetFlagEffect(tp,id+10000)<2 and sg:GetCount()<=ss and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.Hint(HINT_CARD,0,id) Duel.Hint(HINT_CARD,0,id)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP)
Duel.RegisterFlagEffect(tp,id+10000,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,id+10000,RESET_PHASE+PHASE_END,0,1)
end end
end 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