Commit 16fc6981 authored by Huangnan's avatar Huangnan

fix

parent e4a7dd33
Pipeline #33373 failed with stages
in 19 minutes and 46 seconds
No preview for this file type
...@@ -31,9 +31,6 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -31,9 +31,6 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.SelectReleaseGroup(tp,s.costfilter,1,1,nil,e,tp) local g=Duel.SelectReleaseGroup(tp,s.costfilter,1,1,nil,e,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function s.spfilter1(c,e,tp)
return c:IsSetCard(0x6a70) and c:IsLevelAbove(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.fselect1(g,tp) function s.fselect1(g,tp)
return Duel.IsExistingMatchingCard(s.lkfilter,tp,LOCATION_EXTRA,0,1,nil,g) return Duel.IsExistingMatchingCard(s.lkfilter,tp,LOCATION_EXTRA,0,1,nil,g)
end end
...@@ -53,7 +50,7 @@ function s.linkcheck(c,g,tc) ...@@ -53,7 +50,7 @@ function s.linkcheck(c,g,tc)
return c:IsLinkSummonable(g,nil,g:GetCount(),g:GetCount()) and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0 return c:IsLinkSummonable(g,nil,g:GetCount(),g:GetCount()) and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0
end end
function s.syncheck(c,g) function s.syncheck(c,g)
return c:IsSynchroSummonable(g,nil,g:GetCount()-1,g:GetCount()-1) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 return c:IsSynchroSummonable(nil,g,g:GetCount()-1,g:GetCount()-1) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function s.spcheck(g,tp,tc) function s.spcheck(g,tp,tc)
return Duel.GetMZoneCount(tp,tc,tp)>=g:GetCount() and Duel.IsExistingMatchingCard(s.linkcheck,tp,LOCATION_EXTRA,0,1,nil,g,tc) return Duel.GetMZoneCount(tp,tc,tp)>=g:GetCount() and Duel.IsExistingMatchingCard(s.linkcheck,tp,LOCATION_EXTRA,0,1,nil,g,tc)
...@@ -106,7 +103,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -106,7 +103,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
if ft>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end if ft>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local op=e:GetLabel() local op=e:GetLabel()
if op==1 then if op==1 then
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter1),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp) local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spchk),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp)
local cg=Duel.GetMatchingGroup(s.chkfilter1,tp,LOCATION_EXTRA,0,nil,tp) local cg=Duel.GetMatchingGroup(s.chkfilter1,tp,LOCATION_EXTRA,0,nil,tp)
local _,maxlink=cg:GetMaxGroup(Card.GetLink) local _,maxlink=cg:GetMaxGroup(Card.GetLink)
if ft>0 and maxlink then if ft>0 and maxlink then
...@@ -128,22 +125,20 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -128,22 +125,20 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.LinkSummon(tp,rg:GetFirst(),og,nil,#og,#og) Duel.LinkSummon(tp,rg:GetFirst(),og,nil,#og,#og)
end end
end end
elseif op==2 then elseif op==2 and ft>1 then
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spchk2),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,2,2,nil,e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spchk2),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,2,ft,nil,e,tp)
for tc in aux.Next(g) do for tc in aux.Next(g) do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
end end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
Duel.AdjustAll() Duel.AdjustAll()
local og=Duel.GetOperatedGroup() local og=Duel.GetOperatedGroup()
if og:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)<g:GetCount() then return end
local tg=Duel.GetMatchingGroup(s.syncheck,tp,LOCATION_EXTRA,0,nil,og) local tg=Duel.GetMatchingGroup(s.syncheck,tp,LOCATION_EXTRA,0,nil,og)
if og:GetCount()==g:GetCount() and tg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then if og:GetCount()==g:GetCount() and tg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local rg=tg:Select(tp,1,1,nil) local rg=tg:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,rg:GetFirst(),nil,rg) Duel.SynchroSummon(tp,rg:GetFirst(),nil,og,#og-1,#og-1)
end end
e1:Reset()
end end
end end
function s.setcon(e,tp,eg,ep,ev,re,r,rp) function s.setcon(e,tp,eg,ep,ev,re,r,rp)
...@@ -158,10 +153,10 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) ...@@ -158,10 +153,10 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then Duel.SSet(tp,c) end if c:IsRelateToEffect(e) then Duel.SSet(tp,c) end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,4)) e1:SetDescription(aux.Stringid(id,4))
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
\ No newline at end of file
...@@ -89,6 +89,8 @@ function cm.burnop(e,tp,eg,ep,ev,re,r,rp) ...@@ -89,6 +89,8 @@ function cm.burnop(e,tp,eg,ep,ev,re,r,rp)
g:AddCard(c) g:AddCard(c)
Duel.HintSelection(g) Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
Duel.Damage(tp,1000,REASON_EFFECT)
Duel.Damage(1-tp,1000,REASON_EFFECT)
end end
end end
end end
......
...@@ -90,8 +90,7 @@ function cm.mvop(e,tp,eg,ep,ev,re,r,rp) ...@@ -90,8 +90,7 @@ function cm.mvop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end elseif tc:IsLocation(LOCATION_GRAVE) then
if tc:IsLocation(LOCATION_GRAVE) then
Duel.SendtoDeck(tc,nil,nil,REASON_EFFECT) Duel.SendtoDeck(tc,nil,nil,REASON_EFFECT)
end end
end end
......
...@@ -103,15 +103,15 @@ function cm.spfilter2(c) ...@@ -103,15 +103,15 @@ function cm.spfilter2(c)
return c:IsSetCard(0x821) and c:IsAbleToRemove() return c:IsSetCard(0x821) and c:IsAbleToRemove()
end end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(cm.spfilter2,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil) local b1=Duel.IsExistingMatchingCard(cm.spfilter2,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,e:GetHandler())
local b2=Duel.IsCanRemoveCounter(tp,1,0,0x1820,2,REASON_COST) local b2=Duel.IsCanRemoveCounter(tp,1,0,0x1820,2,REASON_COST)
if chk==0 then return b1 or b2 end if chk==0 then return b1 or b2 end
local op=aux.SelectFromOptions(tp, local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(m,0)}, {b1,aux.Stringid(m,5)},
{b2,aux.Stringid(m,1)}) {b2,aux.Stringid(m,6)})
if op==1 then if op==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.spfilter2,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.spfilter2,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
else else
Duel.RemoveCounter(tp,1,0,0x1820,2,REASON_COST) Duel.RemoveCounter(tp,1,0,0x1820,2,REASON_COST)
......
...@@ -37,6 +37,7 @@ function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -37,6 +37,7 @@ function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,nil) local g=Duel.GetMatchingGroup(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,nil)
if chk==0 then return #g>1 end if chk==0 then return #g>1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:SelectSubGroup(tp,cm.fselect,false,2,2,c) local sg=g:SelectSubGroup(tp,cm.fselect,false,2,2,c)
Duel.SendtoGrave(sg,REASON_COST) Duel.SendtoGrave(sg,REASON_COST)
end end
......
...@@ -40,6 +40,7 @@ function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -40,6 +40,7 @@ function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,nil) local g=Duel.GetMatchingGroup(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,nil)
if chk==0 then return #g>1 end if chk==0 then return #g>1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:SelectSubGroup(tp,cm.fselect,false,2,2,c) local sg=g:SelectSubGroup(tp,cm.fselect,false,2,2,c)
Duel.SendtoGrave(sg,REASON_COST) Duel.SendtoGrave(sg,REASON_COST)
end end
......
...@@ -60,6 +60,7 @@ function cm.filter(c,tp,e) ...@@ -60,6 +60,7 @@ function cm.filter(c,tp,e)
e1:SetProperty(pro1,pro2) e1:SetProperty(pro1,pro2)
c:RegisterEffect(e1,true) c:RegisterEffect(e1,true)
local e2=SNNM.AASTregi(c,e1) local e2=SNNM.AASTregi(c,e1)
e2:SetLabel(c:GetSequence(),0x10002)
local res=false local res=false
if e1:IsActivatable(tp) then res=true end if e1:IsActivatable(tp) then res=true end
e2:Reset() e2:Reset()
......
...@@ -55,8 +55,8 @@ function s.initial_effect(c) ...@@ -55,8 +55,8 @@ function s.initial_effect(c)
e4:SetCode(EVENT_FREE_CHAIN) e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e4:SetCountLimit(1) e4:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e4:SetCost(s.exccost) e4:SetTarget(s.exctarget)
e4:SetOperation(s.excop) e4:SetOperation(s.excop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
...@@ -97,48 +97,52 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -97,48 +97,52 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
end end
-- 除外效果 -- 除外效果
function s.exccost(e,tp,eg,ep,ev,re,r,rp,chk) function s.exctarget(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end if chk==0 then return e:GetHandler():IsAbleToRemove() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0)
end end
function s.excop(e,tp,eg,ep,ev,re,r,rp) function s.excop(e,tp,eg,ep,ev,re,r,rp)
-- 速攻魔法发动权限 if e:GetHandler():IsAbleToRemove() then
local e1=Effect.CreateEffect(e:GetHandler()) if Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)>0 then
e1:SetDescription(aux.Stringid(id,1)) -- 速攻魔法发动权限
e1:SetType(EFFECT_TYPE_FIELD) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_QP_ACT_IN_NTPHAND) e1:SetDescription(aux.Stringid(id,1))
e1:SetTargetRange(LOCATION_HAND,0) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTarget(s.acttg) e1:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e1:SetCountLimit(1) e1:SetTargetRange(LOCATION_HAND,0)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetTarget(s.acttg)
Duel.RegisterEffect(e1,tp) e1:SetCountLimit(1)
e1:SetReset(RESET_PHASE+PHASE_END)
-- 陷阱发动权限 Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(id,1)) -- 陷阱发动权限
e2:SetType(EFFECT_TYPE_FIELD) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) e1:SetDescription(aux.Stringid(id,1))
e2:SetTargetRange(LOCATION_HAND,0) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetTarget(s.acttg) e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCountLimit(1) e2:SetTargetRange(LOCATION_HAND,0)
e2:SetReset(RESET_PHASE+PHASE_END) e2:SetTarget(s.acttg)
Duel.RegisterEffect(e2,tp) e2:SetCountLimit(1)
e2:SetReset(RESET_PHASE+PHASE_END)
local desc=math.random(5,10) Duel.RegisterEffect(e2,tp)
Duel.Hint(24,0,aux.Stringid(id,desc))
-- 回归效果 local desc=math.random(5,10)
local c=e:GetHandler() Duel.Hint(24,0,aux.Stringid(id,desc))
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) -- 回归效果
local e3=Effect.CreateEffect(c) local c=e:GetHandler()
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1)
e3:SetCode(EVENT_PHASE+PHASE_STANDBY) local e3=Effect.CreateEffect(c)
e3:SetCountLimit(1) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetLabel(Duel.GetTurnCount()) e3:SetCode(EVENT_PHASE+PHASE_STANDBY)
e3:SetCondition(s.retcon) e3:SetCountLimit(1)
e3:SetOperation(s.retop) e3:SetLabel(Duel.GetTurnCount())
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,2) e3:SetCondition(s.retcon)
Duel.RegisterEffect(e3,tp) e3:SetOperation(s.retop)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,2)
Duel.RegisterEffect(e3,tp)
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