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)
local g=Duel.SelectReleaseGroup(tp,s.costfilter,1,1,nil,e,tp)
Duel.Release(g,REASON_COST)
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)
return Duel.IsExistingMatchingCard(s.lkfilter,tp,LOCATION_EXTRA,0,1,nil,g)
end
......@@ -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
end
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
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)
......@@ -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
local op=e:GetLabel()
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 _,maxlink=cg:GetMaxGroup(Card.GetLink)
if ft>0 and maxlink then
......@@ -128,22 +125,20 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.LinkSummon(tp,rg:GetFirst(),og,nil,#og,#og)
end
end
elseif op==2 then
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spchk2),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,2,2,nil,e,tp)
elseif op==2 and ft>1 then
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
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
end
Duel.SpecialSummonComplete()
Duel.AdjustAll()
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)
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)
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
e1:Reset()
end
end
function s.setcon(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)
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
Duel.Damage(tp,1000,REASON_EFFECT)
Duel.Damage(1-tp,1000,REASON_EFFECT)
end
end
end
......
......@@ -90,8 +90,7 @@ function cm.mvop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
if tc:IsLocation(LOCATION_GRAVE) then
elseif tc:IsLocation(LOCATION_GRAVE) then
Duel.SendtoDeck(tc,nil,nil,REASON_EFFECT)
end
end
......
......@@ -103,15 +103,15 @@ function cm.spfilter2(c)
return c:IsSetCard(0x821) and c:IsAbleToRemove()
end
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)
if chk==0 then return b1 or b2 end
local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(m,0)},
{b2,aux.Stringid(m,1)})
{b1,aux.Stringid(m,5)},
{b2,aux.Stringid(m,6)})
if op==1 then
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)
else
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)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,nil)
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)
Duel.SendtoGrave(sg,REASON_COST)
end
......
......@@ -40,6 +40,7 @@ function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,nil)
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)
Duel.SendtoGrave(sg,REASON_COST)
end
......
......@@ -60,6 +60,7 @@ function cm.filter(c,tp,e)
e1:SetProperty(pro1,pro2)
c:RegisterEffect(e1,true)
local e2=SNNM.AASTregi(c,e1)
e2:SetLabel(c:GetSequence(),0x10002)
local res=false
if e1:IsActivatable(tp) then res=true end
e2:Reset()
......
......@@ -55,8 +55,8 @@ function s.initial_effect(c)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e4:SetCountLimit(1)
e4:SetCost(s.exccost)
e4:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e4:SetTarget(s.exctarget)
e4:SetOperation(s.excop)
c:RegisterEffect(e4)
end
......@@ -97,12 +97,14 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
end
-- 除外效果
function s.exccost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
function s.exctarget(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0)
end
function s.excop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsAbleToRemove() then
if Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)>0 then
-- 速攻魔法发动权限
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(id,1))
......@@ -139,6 +141,8 @@ function s.excop(e,tp,eg,ep,ev,re,r,rp)
e3:SetOperation(s.retop)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,2)
Duel.RegisterEffect(e3,tp)
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