Commit 5137772c authored by Huangnan's avatar Huangnan

fix

parent 32dd21f0
Pipeline #41067 failed with stages
in 10 minutes and 21 seconds
......@@ -21,7 +21,7 @@ function cm.filter(c,e,tp,m)
elseif c:IsType(TYPE_XYZ) then
b=SUMMON_TYPE_XYZ
elseif c:IsType(TYPE_RITUAL) then
b=TYPE_RITUAL
b=SUMMON_TYPE_RITUAL
if not c:IsLocation(LOCATION_HAND+LOCATION_DECK) then
return false
end
......@@ -29,7 +29,7 @@ function cm.filter(c,e,tp,m)
return false
end
local num=c:GetLevel()+c:GetRank()
return c:IsCanBeSpecialSummoned(e,b,tp,false,true) and (c:IsLevelAbove(1) or c:IsRankAbove(1)) and m:CheckWithSumEqual(cm.sumfun,num,1,m:GetCount()) and ((c:IsLocation(LOCATION_DECK) and Duel.GetMZoneCount(tp)>0)
return c:IsCanBeSpecialSummoned(e,b,tp,false,true) and (c:IsLevelAbove(1) or c:IsRankAbove(1)) and m:CheckWithSumEqual(cm.sumfun,num,1,m:GetCount()) and ((c:IsLocation(LOCATION_DECK+LOCATION_HAND) and Duel.GetMZoneCount(tp)>0)
or (c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0))
end
function cm.sumfun(c)
......
--星间列车 启航号角
local s,id,o=GetID()
function s.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
......
......@@ -48,7 +48,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetOperatedGroup()
Duel.ConfirmCards(1-tp,g)
local tc=g:GetFirst()
if Duel.GetLocationCount(tp,LOCATION_SZONE)>0
if tc:IsType(TYPE_CONTINUOUS) and tc:IsType(TYPE_TRAP)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and not tc:IsForbidden() and tc:CheckUniqueOnField(tp)
and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
......
......@@ -29,7 +29,7 @@ function s.initial_effect(c)
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_SZONE)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id+o*10000)
e3:SetTarget(s.drtg)
e3:SetOperation(s.drop)
......
......@@ -145,6 +145,7 @@ end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local c=e:GetHandler()
if not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg=Duel.GetMatchingGroup(s.mfilter,tp,LOCATION_ONFIELD,0,nil,c:GetLevel(),tp)
if c.mat_filter then
mg=mg:Filter(c.mat_filter,c,tp)
......
......@@ -123,6 +123,7 @@ end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local c=e:GetHandler()
if not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg=Duel.GetMatchingGroup(s.mfilter,tp,LOCATION_ONFIELD,0,nil,c:GetLevel(),tp)
if c.mat_filter then
mg=mg:Filter(c.mat_filter,c,tp)
......
......@@ -94,13 +94,13 @@ end
function s.target3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
if re:GetHandler():IsAbleToRemove() and re:GetHandler():IsRelateToEffect(re) and re:GetLocation()==LOCATION_GRAVE then
if re:GetHandler():IsAbleToRemove() and re:GetHandler():IsRelateToEffect(re) and re:IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
end
function s.operation3(e,tp,eg,ep,ev,re,r,rp)
if re:GetLocation()==LOCATION_GRAVE and Duel.Remove(re:GetHandler(),POS_FACEUP,REASON_EFFECT)>0 and re:GetHandler():IsRelateToEffect(re) then
if re:IsLocation(LOCATION_GRAVE) and Duel.Remove(re:GetHandler(),POS_FACEUP,REASON_EFFECT)>0 and re:GetHandler():IsRelateToEffect(re) then
Duel.NegateActivation(ev)
end
end
......
......@@ -44,6 +44,11 @@ function c61200007.initial_effect(c)
e3:SetTarget(s.tg3)
e3:SetOperation(s.op3)
c:RegisterEffect(e3)
--魔陷发动
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_ACTIVATE)
e4:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e4)
end
function s.f1(c)
......
......@@ -63,7 +63,7 @@ function s.op1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,s.f1,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc and Duel.SSet(tp,tc)~=0 and g:GetCount()>0 then
local e1=Effect.CreateEffect()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
......
......@@ -154,7 +154,8 @@ function s.tg4(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,0)
if c:GetEquipTarget():IsCode(61200201,61200202,61200203) then
local sc=c:GetEquipTarget()
if sc:IsCode(61200201,61200202,61200203) then
Duel.SetChainLimit(aux.FALSE)
end
end
......
......@@ -99,6 +99,7 @@ function s.con3(e,tp,eg,ep,ev,re,r,rp)
end
function s.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
return c:IsDestructable()
end
......@@ -127,8 +128,7 @@ function s.tg4(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function s.op4(e,tp,eg,ep,ev,re,r,rp)
local g=GetDecktopGroup(tp,2)
Duel.DisableShuffleCheck()
local g=Duel.GetDecktopGroup(tp,2)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
......
......@@ -5,10 +5,8 @@ function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_HANDES+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE+LOCATION_REMOVED)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCountLimit(1,id)
e1:SetCondition(s.con1)
e1:SetTarget(s.tg1)
......@@ -62,8 +60,7 @@ function s.f5(c)
end
function s.con1(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetTurnPlayer()
return ph==tp and Duel.IsExistingMatchingCard(s.f1,tp,LOCATION_ONFIELD,0,1,nil)
return Duel.IsExistingMatchingCard(s.f1,tp,LOCATION_ONFIELD,0,1,nil)
end
function s.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -22,7 +22,6 @@ function c61200309.initial_effect(c)
e2:SetTarget(s.tg2)
e2:SetOperation(s.op2)
c:RegisterEffect(e2)
end
function s.f1(c)
......@@ -93,7 +92,7 @@ function s.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(c,POS_FACEDOWN,REASON_EFFECT)
end
end
tc:GetNext()
tc=g2:GetNext()
end
i=i+1
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