Commit f8e837fd authored by Huangnan's avatar Huangnan

fix

parent 0da15785
Pipeline #40430 failed with stages
in 3 minutes and 33 seconds
...@@ -35,7 +35,7 @@ function s.initial_effect(c) ...@@ -35,7 +35,7 @@ function s.initial_effect(c)
e3:SetCategory(CATEGORY_DESTROY) e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCondition(s.descon) e3:SetCondition(s.descon)
e3:SetTarget(s.destg) e3:SetTarget(s.destg)
......
...@@ -55,10 +55,10 @@ end ...@@ -55,10 +55,10 @@ end
function s.spcon(e,c) function s.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCountFromEx(e:GetHandlerPlayer())>0 return Duel.GetLocationCountFromEx(e:GetHandlerPlayer())>0
and Duel.IsExistingMatchingCard(s.spfilter,e:GetHandlerPlayer(),LOCATION_HAND+LOCATION_GRAVE+LOCATION_MZONE,0,1,c) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.IsExistingMatchingCard(s.spfilter,e:GetHandlerPlayer(),LOCATION_HAND+LOCATION_GRAVE+LOCATION_MZONE,0,1,c) and c:IsCanBeSpecialSummoned(e,0,e:GetHandlerPlayer(),true,false)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_MZONE,0,c) local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
if sg then if sg then
......
...@@ -34,7 +34,7 @@ function s.initial_effect(c) ...@@ -34,7 +34,7 @@ function s.initial_effect(c)
e3:SetCategory(CATEGORY_DESTROY) e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCondition(s.descon) e3:SetCondition(s.descon)
e3:SetTarget(s.destg) e3:SetTarget(s.destg)
......
--月咏小萌 --月咏小萌
local s,id,o=GetID() local s,id,o=GetID()
s.MoJin=true
function s.initial_effect(c) function s.initial_effect(c)
--extra summon s.MoJin=true
local e6=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e0:SetDescription(aux.Stringid(id,0))
e6:SetCode(EVENT_SUMMON_SUCCESS) e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e6:SetOperation(s.sumop) e0:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e6) e0:SetOperation(s.sumop)
local e7=e6:Clone() c:RegisterEffect(e0)
e7:SetCode(EVENT_SPSUMMON_SUCCESS) local e1=e0:Clone()
c:RegisterEffect(e7) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
--destroy c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e3:SetDescription(2) e2:SetType(EFFECT_TYPE_IGNITION)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetRange(LOCATION_HAND)
--e3:SetType(EFFECT_TYPE_QUICK_O) e2:SetCost(aux.bfgcost)
e3:SetType(EFFECT_TYPE_IGNITION) e2:SetTarget(s.bfgtg)
--e3:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e2)
e3:SetRange(LOCATION_HAND) local e3=e2:Clone()
--e3:SetCountLimit(1,id) e3:SetRange(LOCATION_GRAVE)
e3:SetCost(aux.bfgcost) e3:SetCountLimit(1,id)
e3:SetTarget(s.target)
e3:SetOperation(s.operation)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,id)
c:RegisterEffect(e4)
end end
function s.sumop(e,tp,eg,ep,ev,re,r,rp) function s.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not (Duel.IsPlayerCanSummon(tp) or Duel.IsPlayerCanAdditionalSummon(tp)) then return end if not (Duel.IsPlayerCanSummon(tp) or Duel.IsPlayerCanAdditionalSummon(tp)) then return end
local e1=Effect.CreateEffect(e:GetHandler()) local e0=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0)) e0:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_FIELD) e0:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) e0:SetCode(EFFECT_SET_SUMMON_COUNT_LIMIT)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
--e1:SetTargetRange(1,0) e0:SetTargetRange(1,0)
e1:SetTarget(s.estg) e0:SetValue(2)
e1:SetReset(RESET_PHASE+PHASE_END) e0:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e0,tp)
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) end
end --融合检查
function s.estg(e,c) function s.Fusionfilter0(c,e)
--return c.MoJin==true return not c:IsImmuneToEffect(e)
return not c:IsSetCard(0x23333a) end
end function s.Fusionfilter1(c)
function s.val(e,c) return c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
local tp=e:GetHandlerPlayer() end
local ct=Duel.GetFlagEffect(tp,id) function s.Fusionfilter2(c,e,tp,m,f,chkf) --加魔禁字段
return ct+1 return c.MoJin and c:IsType(TYPE_FUSION) and (not f or f(c))
end
function s.mfilter1(c)
return c.MoJin==true and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function s.mfilter2(c)
return c.MoJin==true and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function s.sfselect(g,tp)
return Duel.IsExistingMatchingCard(s.synfilter,tp,LOCATION_EXTRA,0,1,nil,g)
end
function s.xfselect(g,tp)
return Duel.IsExistingMatchingCard(s.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,g)
end
function s.lfselect(g,tp)
return Duel.IsExistingMatchingCard(s.lfilter,tp,LOCATION_EXTRA,0,1,nil,g)
end
function s.chkfilter(c,e,tp,m,f,chkf)
if not c.MoJin==true then return end
return s.ffilter(c,e,tp,m,f,chkf) or c:IsSynchroSummonable(nil,m) or c:IsXyzSummonable(m) or c:IsLinkSummonable(m,nil)
end
function s.ffilter(c,e,tp,m,f,chkf)
return c.MoJin==true and c:IsType(TYPE_FUSION) 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.chksfilter(c,g) --同调检查
return c:IsSynchroSummonable(nil,g) function s.Synchrofilter0(c,e)
return c:IsType(TYPE_MONSTER) and not c:IsImmuneToEffect(e)
end end
function s.chkxfilter(c,g) function s.Synchrofilter1(c)
return c:IsXyzSummonable(g) return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end end
function s.chklfilter(c,g) function s.Synchrofilter2(c,tp,g) --加魔禁字段
return c:IsLinkSummonable(g,nil) return c:IsSynchroSummonable(nil,g) and c.MoJin
end end
function s.synfilter(c,g) function s.Synchrofilter3(level)
return c.MoJin==true and c:IsSynchroSummonable(nil,g,#g-1,#g-1) return function(g)
local sum = g:GetSum(Card.GetLevel)
return sum <= level
end
end end
function s.xyzfilter(c,g) function s.Synchrofilter4(g,tp,syncard)
return c.MoJin==true and c:IsXyzSummonable(g,#g,#g) return syncard:IsSynchroSummonable(nil,g,#g-1,#g-1)
end end
function s.lfilter(c,g) --超量检查
return c.MoJin==true and c:IsLinkSummonable(g,nil,#g,#g) function s.Xyzfilter0(c,e)
return c:IsType(TYPE_MONSTER) and not c:IsImmuneToEffect(e)
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.Xyzfilter1(c)
return c:IsType(TYPE_MONSTER) --and c:IsAbleToRemove()
end
function s.Xyzfilter2(c,tp,g) --加魔禁字段
return c:IsXyzSummonable(g) and c.MoJin
end
function s.Xyzfilter4(g,c)
return c:IsXyzSummonable(g,#g,#g)
end
--连接检查
function s.Linkfilter0(c,e)
return c:IsType(TYPE_MONSTER) and not c:IsImmuneToEffect(e)
end
function s.Linkfilter1(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function s.Linkfilter2(c,tp,g) --加魔禁字段
return c:IsLinkSummonable(g) and c.MoJin
end
function s.Linkfilter3(Link)
return function(g)
local sum = g:GetCount()
return sum <= Link
end
end
function s.Linkfilter4(g,c)
return c:IsLinkSummonable(g,nil,#g,#g)
end
--检查结束
function s.bfgtg(e,tp,eg,ep,ev,re,r,rp,chk)
--融合检查
local chkf=tp local chkf=tp
local c=e:GetHandler() local mg1=Duel.GetFusionMaterial(tp)
local sg=Duel.GetMatchingGroup(s.mfilter1,tp,LOCATION_HAND+LOCATION_MZONE,0,c)
local exg=Duel.GetMatchingGroup(s.mfilter2,tp,LOCATION_GRAVE,0,c)
if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 then if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 then
Duel.RegisterFlagEffect(tp,id,RESET_EVENT+RESET_CHAIN,0,1) local sg=Duel.GetMatchingGroup(s.Fusionfilter1,tp,LOCATION_GRAVE,0,nil)
sg:Merge(exg) if sg:GetCount()>0 then
mg1:Merge(sg)
end end
local res=Duel.IsExistingMatchingCard(s.ffilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,sg,nil,chkf) end
local res=Duel.IsExistingMatchingCard(s.Fusionfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,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(s.ffilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf) res=Duel.IsExistingMatchingCard(s.Fusionfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
--同调检查
local mg3=Duel.GetMatchingGroup(s.Synchrofilter0,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e)
if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 then
local mg4=Duel.GetMatchingGroup(s.Synchrofilter1,tp,LOCATION_GRAVE,0,nil)
if mg4:GetCount()>0 then
mg3:Merge(mg4)
end end
end
local Synchro=Duel.IsExistingMatchingCard(s.Synchrofilter2,tp,LOCATION_EXTRA,0,1,nil,tp,mg3)
--超量检查
local mg5=Duel.GetMatchingGroup(s.Xyzfilter0,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e)
if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 then
local mg6=Duel.GetMatchingGroup(s.Xyzfilter1,tp,LOCATION_GRAVE,0,nil)
if mg6:GetCount()>0 then
mg5:Merge(mg6)
end end
end
local Xyz=Duel.IsExistingMatchingCard(s.Xyzfilter2,tp,LOCATION_EXTRA,0,1,nil,tp,mg5)
--连接检查
local mg7=Duel.GetMatchingGroup(s.Linkfilter0,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e)
if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 then
local mg8=Duel.GetMatchingGroup(s.Linkfilter1,tp,LOCATION_GRAVE,0,nil)
if mg8:GetCount()>0 then
mg7:Merge(mg8)
end
end
local Link=Duel.IsExistingMatchingCard(s.Linkfilter2,tp,LOCATION_EXTRA,0,1,nil,tp,mg7)
local b1=res local b1=res
local b2=sg:CheckSubGroup(s.sfselect,1,#sg,tp) local b2=Synchro
local b3=sg:CheckSubGroup(s.xfselect,1,#sg,tp) local b3=Xyz
local b4=sg:CheckSubGroup(s.lfselect,1,#sg,tp) local b4=Link
if chk==0 then return b1 or b2 or b3 or b4 end if chk==0 then return b1 or b2 or b3 or b4 end
local ckg=Duel.GetMatchingGroup(s.chkfilter,tp,LOCATION_EXTRA,0,nil,e,tp,sg,nil,chkf)
if #ckg==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,5))
local chkccc=ckg:Select(tp,1,1,nil)
local off=1 local off=1
local ops={} local ops={}
local opval={} local opval={}
...@@ -143,29 +175,44 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -143,29 +175,44 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
opval[off-1]=4 opval[off-1]=4
off=off+1 off=off+1
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT)
local op=Duel.SelectOption(tp,table.unpack(ops)) local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op] --融合
e:SetLabel(sel) if opval[op]==1 then
if sel==1 then
e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
end e:SetOperation(s.bfgop1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
--同调
elseif opval[op]==2 then
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
e:SetOperation(s.bfgop2)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
--超量
elseif opval[op]==3 then
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
e:SetOperation(s.bfgop3)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
--连接
elseif opval[op]==4 then
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
e:SetOperation(s.bfgop4)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
end end
function s.filter1(c,e) --融合效果处理
return not c:IsImmuneToEffect(e) function s.bfgop1(e,tp,eg,ep,ev,re,r,rp)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp local chkf=tp
local c=e:GetHandler() local mg1=Duel.GetFusionMaterial(tp):Filter(s.Fusionfilter0,nil,e)
local sel=e:GetLabel() local exmat=false
local sg=Duel.GetMatchingGroup(s.mfilter1,tp,LOCATION_HAND+LOCATION_MZONE,0,c) if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 then
local exg=Duel.GetMatchingGroup(s.mfilter2,tp,LOCATION_GRAVE,0,c) local sg=Duel.GetMatchingGroup(s.Fusionfilter1,tp,LOCATION_GRAVE,0,nil,e)
if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetFlagEffect(tp,id)>0 then if sg:GetCount()>0 then
sg:Merge(exg) mg1:Merge(sg)
exmat=true
end
end end
if sel==1 then if exmat then end
local mg1=sg:Filter(s.filter1,nil,e) local sg1=Duel.GetMatchingGroup(s.Fusionfilter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local sg1=Duel.GetMatchingGroup(s.ffilter,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil local mg2=nil
local sg2=nil local sg2=nil
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
...@@ -173,23 +220,23 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -173,23 +220,23 @@ function s.operation(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.ffilter,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf) sg2=Duel.GetMatchingGroup(s.Fusionfilter2,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
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,5)) local sg=sg1:Clone()
local chkccc=sg1:Select(tp,1,1,nil) if sg2 then sg:Merge(sg2) end
local fsg=sg1:Clone()
if sg2 then fsg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=fsg:Select(tp,1,1,nil) local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst() local tc=tg:GetFirst()
mg1:RemoveCard(tc)
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
if exmat then end
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1) tc:SetMaterial(mat1)
local tg=mat1:Filter(Card.IsLocation,nil,LOCATION_HAND+LOCATION_ONFIELD) local g1=mat1:Filter(Card.IsLocation,nil,LOCATION_HAND+LOCATION_ONFIELD)
local rg=mat1:Filter(Card.IsLocation,nil,LOCATION_GRAVE) local g2=mat1:Filter(Card.IsLocation,nil,LOCATION_GRAVE)
Duel.SendtoGrave(tg,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) Duel.SendtoGrave(g1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) Duel.Remove(g2,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect() Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else else
...@@ -199,65 +246,133 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -199,65 +246,133 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
end end
tc:CompleteProcedure() tc:CompleteProcedure()
end end
elseif sel==2 then end
local schk=Duel.GetMatchingGroup(s.chksfilter,tp,LOCATION_EXTRA,0,nil,sg) --同调效果处理
if #schk==0 then return end function s.bfgop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,5)) local mg1=Duel.GetMatchingGroup(s.Synchrofilter0,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e)
local chkccc=schk:Select(tp,1,1,nil) if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 then
Duel.Hint(HINT_SELECTMSG,tp,512) local mg2=Duel.GetMatchingGroup(s.Synchrofilter1,tp,LOCATION_GRAVE,0,nil)
local syg=sg:SelectSubGroup(tp,s.sfselect,false,1,#sg,tp) if mg2:GetCount()>0 then
local syng=Duel.GetMatchingGroup(s.synfilter,tp,LOCATION_EXTRA,0,nil,syg) mg1:Merge(mg2)
if #syng>0 then end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=syng:Select(tp,1,1,nil):GetFirst() local tc=Duel.SelectMatchingCard(tp,s.Synchrofilter2,tp,LOCATION_EXTRA,0,1,1,nil,tp,mg1):GetFirst()
tc:SetMaterial(syg) if tc then
local tg=syg:Filter(Card.IsLocation,nil,LOCATION_HAND+LOCATION_ONFIELD) local level=tc:GetLevel()
local rg=syg:Filter(Card.IsLocation,nil,LOCATION_GRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
Duel.SendtoGrave(tg,REASON_EFFECT+REASON_MATERIAL+REASON_SYNCHRO) aux.GCheckAdditional=s.Synchrofilter3(level)
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_SYNCHRO) local sg=mg1:SelectSubGroup(tp,s.Synchrofilter4,false,1,#mg1,tp,tc)
aux.GCheckAdditional=nil
if sg then
tc:SetMaterial(sg)
local g1=sg:Filter(Card.IsLocation,nil,LOCATION_HAND+LOCATION_MZONE)
local g2=sg:Filter(Card.IsLocation,nil,LOCATION_GRAVE)
Duel.SendtoGrave(g1,REASON_EFFECT+REASON_MATERIAL+REASON_SYNCHRO)
Duel.Remove(g2,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_SYNCHRO)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)
tc:CompleteProcedure() tc:CompleteProcedure()
for sc in aux.Next(sg) do
Duel.RaiseSingleEvent(sc,EVENT_BE_MATERIAL,e,REASON_SYNCHRO,tp,tp,0)
Duel.RaiseEvent(sc,EVENT_BE_MATERIAL,e,REASON_SYNCHRO,tp,tp,0)
end end
elseif sel==3 then end
local xchk=Duel.GetMatchingGroup(s.chkxfilter,tp,LOCATION_EXTRA,0,nil,sg) end
if #xchk==0 then return end end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,5)) --超量效果处理
local chkccc=xchk:Select(tp,1,1,nil) function s.bfgop3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,513) local mg1=Duel.GetMatchingGroup(s.Xyzfilter0,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e)
local syg=sg:SelectSubGroup(tp,s.xfselect,false,1,#sg,tp) if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 then
local syng=Duel.GetMatchingGroup(s.xyzfilter,tp,LOCATION_EXTRA,0,nil,syg) local mg2=Duel.GetMatchingGroup(s.Xyzfilter1,tp,LOCATION_GRAVE,0,nil)
if #syng>0 then if mg2:GetCount()>0 then
mg1:Merge(mg2)
end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=syng:Select(tp,1,1,nil):GetFirst() local tc=Duel.SelectMatchingCard(tp,s.Xyzfilter2,tp,LOCATION_EXTRA,0,1,1,nil,tp,mg1):GetFirst()
tc:SetMaterial(syg) if tc then
for sc in aux.Next(syg) do local Rank=tc:GetRank()
local mg=sc:GetOverlayGroup() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
if mg:GetCount()~=0 then local sg=mg1:SelectSubGroup(tp,s.Xyzfilter4,false,1,4,tc)
Duel.Overlay(tc,mg) if sg then
Duel.HintSelection(sg)
tc:SetMaterial(sg)
for sc in aux.Next(sg) do
local gg=sc:GetOverlayGroup()
if gg:GetCount()~=0 then
Duel.Overlay(tc,gg)
end end
end end
Duel.Overlay(tc,syg) Duel.Overlay(tc,sg)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
tc:CompleteProcedure() tc:CompleteProcedure()
end end
else end
local lchk=Duel.GetMatchingGroup(s.chklfilter,tp,LOCATION_EXTRA,0,nil,sg) end
if #lchk==0 then return end --连接效果处理
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,5)) function s.bfgop4(e,tp,eg,ep,ev,re,r,rp)
local chkccc=lchk:Select(tp,1,1,nil) local mg1=Duel.GetMatchingGroup(s.Linkfilter0,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e)
Duel.Hint(HINT_SELECTMSG,tp,533) if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 then
local syg=sg:SelectSubGroup(tp,s.lfselect,false,1,#sg,tp) local mg2=Duel.GetMatchingGroup(s.Linkfilter1,tp,LOCATION_GRAVE,0,nil)
local syng=Duel.GetMatchingGroup(s.lfilter,tp,LOCATION_EXTRA,0,nil,syg) if mg2:GetCount()>0 then
if #syng>0 then mg1:Merge(mg2)
end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=syng:Select(tp,1,1,nil):GetFirst() local tc=Duel.SelectMatchingCard(tp,s.Linkfilter2,tp,LOCATION_EXTRA,0,1,1,nil,tp,mg1):GetFirst()
tc:SetMaterial(syg) if tc then
local tg=syg:Filter(Card.IsLocation,nil,LOCATION_HAND+LOCATION_ONFIELD) local Link=tc:GetLink()
local rg=syg:Filter(Card.IsLocation,nil,LOCATION_GRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
Duel.SendtoGrave(tg,REASON_EFFECT+REASON_MATERIAL+REASON_LINK) aux.GCheckAdditional=s.Linkfilter3(Link)
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_LINK) local sg=mg1:SelectSubGroup(tp,s.Linkfilter4,false,1,#mg1,tc)
aux.GCheckAdditional=nil
if sg then
tc:SetMaterial(sg)
local g1=sg:Filter(Card.IsLocation,nil,LOCATION_HAND+LOCATION_ONFIELD)
local g2=sg:Filter(Card.IsLocation,nil,LOCATION_GRAVE)
Duel.SendtoGrave(g1,REASON_EFFECT+REASON_MATERIAL+REASON_LINK)
Duel.Remove(g2,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_LINK)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_LINK,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,SUMMON_TYPE_LINK,tp,tp,false,false,POS_FACEUP)
tc:CompleteProcedure() tc:CompleteProcedure()
end end
end end
end end
...@@ -8,7 +8,7 @@ function s.initial_effect(c) ...@@ -8,7 +8,7 @@ function s.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,{id,1}) e1:SetCountLimit(1,id)
e1:SetTarget(s.thtg) e1:SetTarget(s.thtg)
e1:SetOperation(s.thop) e1:SetOperation(s.thop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -24,7 +24,7 @@ function s.initial_effect(c) ...@@ -24,7 +24,7 @@ function s.initial_effect(c)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_GRAVE) e3:SetRange(LOCATION_GRAVE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER) e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e3:SetCountLimit(1,{id,1}) e3:SetCountLimit(1,id+100)
e3:SetCondition(s.spcon) e3:SetCondition(s.spcon)
e3:SetTarget(s.sptg) e3:SetTarget(s.sptg)
e3:SetOperation(s.spop) e3:SetOperation(s.spop)
...@@ -68,20 +68,12 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -68,20 +68,12 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
-- 效果②处理函数
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 if tc and tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0
and tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) and c:IsRelateToEffect(e) then and tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) and c:IsRelateToEffect(e) then
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
-- 离场时除外
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
c:RegisterEffect(e1,true)
end
end end
end end
\ No newline at end of file
...@@ -58,32 +58,47 @@ function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -58,32 +58,47 @@ function s.discost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
-- 效果① -- 效果①:取除素材检索/特殊召唤
function s.filter(c,e,tp) function s.filter(c)
return c:IsSetCard(0x893) and c:IsDefense(200) and return c:IsSetCard(0x893) and c:IsDefense(200)
c:IsAbleToHand() and (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false))
end end
function s.xyztg(e,tp,eg,ep,ev,re,r,rp,chk) function s.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
local check=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp,check) end return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
--
function s.xyzop(e,tp,eg,ep,ev,re,r,rp) function s.xyzop(e,tp,eg,ep,ev,re,r,rp)
--
local check=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp,check) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if not tc then return end
if tc:IsAbleToHand() and (not (check and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)) or Duel.SelectOption(tp,1190,1152)==0) then
local b1=tc:IsAbleToHand()
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)
local op
if b1 and b2 then
op=Duel.SelectOption(tp,1190,1152)
elseif b1 then
op=0
elseif b2 then
op=1
else
return
end
if op==0 then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
else else
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end end
--
-- 自肃效果
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
...@@ -92,9 +107,7 @@ function s.xyzop(e,tp,eg,ep,ev,re,r,rp) ...@@ -92,9 +107,7 @@ function s.xyzop(e,tp,eg,ep,ev,re,r,rp)
e1:SetTarget(s.splimit) e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end
end end
-- 自肃限制函数:只能特殊召唤超量怪兽 -- 自肃限制函数:只能特殊召唤超量怪兽
function s.splimit(e,c) function s.splimit(e,c)
return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_XYZ) return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_XYZ)
......
...@@ -96,7 +96,7 @@ function cm.thccost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -96,7 +96,7 @@ function cm.thccost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoExtraP(c,tp,REASON_COST) Duel.SendtoExtraP(c,tp,REASON_COST)
end end
function cm.thcfilter(c) function cm.thcfilter(c)
return c:IsSetCard(0x3ef1) and c:IsAbleToHand() return c:IsSetCard(0x3ef1) and (c:IsAbleToHand() or c:IsAbleToGrave())
end end
function cm.thctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.thctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thcfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.thcfilter,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -77,14 +77,16 @@ function cm.filter(c) ...@@ -77,14 +77,16 @@ function cm.filter(c)
end end
function cm.postg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,0,LOCATION_MZONE)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end end
function cm.posop(e,tp,eg,ep,ev,re,r,rp) function cm.posop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
if tc and tc:IsRelateToEffect(e) then local sg=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
-- 变为里侧守备表示 local tc=sg:GetFirst()
if not tc then return end
-- 再次确认对象仍在场且符合条件
if tc:IsFaceup() and tc:IsCanTurnSet() and tc:IsLocation(LOCATION_MZONE) then
Duel.HintSelection(Group.FromCards(tc))
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
-- 禁止改变表示形式 -- 禁止改变表示形式
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -24,6 +24,7 @@ function cm.initial_effect(c) ...@@ -24,6 +24,7 @@ function cm.initial_effect(c)
e2:SetCode(EVENT_CUSTOM+m) e2:SetCode(EVENT_CUSTOM+m)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_GRAVE+LOCATION_REMOVED) e2:SetRange(LOCATION_GRAVE+LOCATION_REMOVED)
e2:SetCountLimit(1,m+1)
e2:SetCondition(cm.spcon) e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg) e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop) e2:SetOperation(cm.spop)
......
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