Commit 872150fd authored by Huangnan's avatar Huangnan

fix

parent aef03d88
Pipeline #40506 failed with stages
in 2 minutes and 12 seconds
...@@ -11,13 +11,13 @@ function s.initial_effect(c) ...@@ -11,13 +11,13 @@ function s.initial_effect(c)
e0:SetOperation(s.operation) e0:SetOperation(s.operation)
c:RegisterEffect(e0) c:RegisterEffect(e0)
end end
function s.syncheckadditional(level) function s.syncheckadditional(lv)
return function(g) return function(g)
local sum = g:GetSum(Card.GetLevel) local sum = g:GetSum(Card.GetLevel)
return sum <= level return sum <= lv
end end
end end
function s.syncheck(g,tp,syncard) function s.syncheck(g,syncard)
return syncard:IsSynchroSummonable(nil,g,#g-1,#g-1) return syncard:IsSynchroSummonable(nil,g,#g-1,#g-1)
end end
function s.filter(c) function s.filter(c)
...@@ -34,21 +34,20 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -34,21 +34,20 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_GRAVE+LOCATION_EXTRA,LOCATION_GRAVE+LOCATION_EXTRA,nil) local mg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_GRAVE+LOCATION_EXTRA,LOCATION_GRAVE+LOCATION_EXTRA,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,1,nil,nil,mg,nil,4):GetFirst() local tc=Duel.SelectMatchingCard(tp,Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,1,nil,nil,mg,nil,4):GetFirst()
if tc then if not tc then return end
local level=tc:GetLevel() local lv=tc:GetLevel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
aux.GCheckAdditional=s.syncheckadditional(level) aux.GCheckAdditional=s.syncheckadditional(lv)
local sg=mg:SelectSubGroup(tp,s.syncheck,false,1,4,tp,tc) local sg=mg:SelectSubGroup(tp,s.syncheck,false,1,4,tc)
aux.GCheckAdditional=nil aux.GCheckAdditional=nil
if sg then if not sg then return end
tc:SetMaterial(sg) tc:SetMaterial(sg)
Duel.Remove(sg,POS_FACEUP,REASON_MATERIAL+REASON_SYNCHRO) Duel.Remove(sg,POS_FACEUP,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 for sc in aux.Next(sg) do
Duel.RaiseSingleEvent(sc,EVENT_BE_MATERIAL,e,REASON_SYNCHRO,tp,tp,0) Duel.RaiseSingleEvent(sc,EVENT_BE_MATERIAL,e,REASON_SYNCHRO,tp,tp,0)
Duel.RaiseEvent(sc,EVENT_BE_MATERIAL,e,REASON_SYNCHRO,tp,tp,0) Duel.RaiseEvent(sc,EVENT_BE_MATERIAL,e,REASON_SYNCHRO,tp,tp,0)
end
end
end end
end end
\ No newline at end of file
...@@ -60,10 +60,10 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,10 +60,10 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local op=aux.SelectFromOptions(1-tp, local op=aux.SelectFromOptions(1-tp,
{true,aux.Stringid(m,2)}, {true,aux.Stringid(m,2)},
{true,aux.Stringid(m,3)}) {true,aux.Stringid(m,3)})
if op==1 then if op==1 then
Duel.SpecialSummon(g2,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g2,0,tp,tp,false,false,POS_FACEUP)
end end
if op==2 then if op==2 then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_DISABLE)
...@@ -130,9 +130,9 @@ end ...@@ -130,9 +130,9 @@ end
function cm.spsumfilter2(c,e,tp) function cm.spsumfilter2(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp) return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp)
end end
function c1041278.gcheck(g,e,tp,b1,b2) function cm.gcheck(g,e,tp,b1,b2)
return b1 and g:IsExists(c1041278.spfilter1,1,nil,e,tp,g) return b1 and g:IsExists(cm.spfilter1,1,nil,e,tp,g)
or b2 and g:IsExists(c1041278.spfilter3,2,nil,e,tp) or b2 and g:IsExists(cm.spfilter3,2,nil,e,tp)
end end
function cm.gcheck(g,e,tp) function cm.gcheck(g,e,tp)
if #g~=2 then return false end if #g~=2 then return false end
......
...@@ -27,7 +27,7 @@ function s.peff2op(e,tp,eg,ep,ev,re,r,rp) ...@@ -27,7 +27,7 @@ function s.peff2op(e,tp,eg,ep,ev,re,r,rp)
end end
function s.meff2(c) function s.meff2(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_GRAVE_ACTION) e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
......
...@@ -46,7 +46,7 @@ function s.meff1(c) ...@@ -46,7 +46,7 @@ function s.meff1(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function s.cpcon(e,tp,eg,ep,ev,re,r,rp) function s.cpcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and re:GetActivateLocation()==LOCATION_MZONE return rp==1-tp and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and re:GetActivateLocation()==LOCATION_SZONE
end end
function s.cpcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.cpcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1) e:SetLabel(1)
...@@ -81,7 +81,7 @@ function s.thfilter(c) ...@@ -81,7 +81,7 @@ function s.thfilter(c)
return c:IsType(TYPE_RITUAL) and c:IsRace(RACE_PLANT) and c:IsLevel(6) and c:IsAbleToHand() return c:IsType(TYPE_RITUAL) and c:IsRace(RACE_PLANT) and c:IsLevel(6) and c:IsAbleToHand()
end end
function s.meff2tg(e,tp,eg,ep,ev,re,r,rp,chk) function s.meff2tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_EXTRA)
end end
function s.meff2op(e,tp,eg,ep,ev,re,r,rp) function s.meff2op(e,tp,eg,ep,ev,re,r,rp)
......
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