Commit f3598bb0 authored by mercury233's avatar mercury233

fix

parent 3800557b
Pipeline #18526 failed with stages
in 12 seconds
...@@ -55,7 +55,7 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,7 +55,7 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.spcon(e,tp,eg,ep,ev,re,r,rp) function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():GetType()==TYPE_TRAP return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetActiveType()==TYPE_TRAP
end end
function s.spfilter(c,e,tp) function s.spfilter(c,e,tp)
return c:IsLevel(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevel(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -70,12 +70,13 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -70,12 +70,13 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY) e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetLabel(Duel.GetTurnCount())
e1:SetCondition(s.spcon) e1:SetCondition(s.spcon)
e1:SetOperation(s.spop) e1:SetOperation(s.spop)
if Duel.GetCurrentPhase()==PHASE_STANDBY then if Duel.GetCurrentPhase()==PHASE_STANDBY then
e1:SetLabel(Duel.GetTurnCount())
e1:SetReset(RESET_PHASE+PHASE_STANDBY,2) e1:SetReset(RESET_PHASE+PHASE_STANDBY,2)
else else
e1:SetLabel(0)
e1:SetReset(RESET_PHASE+PHASE_STANDBY) e1:SetReset(RESET_PHASE+PHASE_STANDBY)
end end
Duel.RegisterEffect(e1,1-tp) Duel.RegisterEffect(e1,1-tp)
......
...@@ -14,47 +14,26 @@ function s.initial_effect(c) ...@@ -14,47 +14,26 @@ function s.initial_effect(c)
e1:SetTarget(s.target) e1:SetTarget(s.target)
e1:SetOperation(s.activate) e1:SetOperation(s.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
if not s.global_check then
s.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
ge1:SetOperation(s.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
if Duel.GetFlagEffect(tc:GetSummonPlayer(),id)==0 then
Duel.RegisterFlagEffect(tc:GetSummonPlayer(),id,RESET_PHASE+PHASE_END,0,1)
end
if Duel.GetFlagEffect(0,id)>0 and Duel.GetFlagEffect(1,id)>0 then
break
end
tc=eg:GetNext()
end
end end
function s.condition(e,tp,eg,ep,ev,re,r,rp) function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(1-tp,id)>0 return Duel.GetActivityCount(1-tp,ACTIVITY_SPSUMMON)>0
end end
function s.filter(c) function s.filter(c)
return c:IsFaceup() and c:IsAttackAbove(2000) return c:IsFaceup() and c:IsAttackAbove(2000)
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function s.cfilter(c) function s.cfilter(c)
return c:GetType()==TYPE_TRAP and c:IsSetCard(0x4c,0x89) return c:GetType()==TYPE_TRAP and c:IsSetCard(0x4c,0x89)
end end
function s.rmfilter(c) function s.rmfilter(c)
return c:IsAbleToRemove() and c:IsType(TYPE_MONSTER) return c:IsAbleToRemove() and c:IsType(TYPE_MONSTER)
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc)and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE)
local g=Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) if tc:IsRelateToEffect(e)
......
...@@ -15,27 +15,27 @@ function s.initial_effect(c) ...@@ -15,27 +15,27 @@ function s.initial_effect(c)
e1:SetValue(s.efilter) e1:SetValue(s.efilter)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Search --Search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id)
e2:SetCost(s.thcost)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
--material
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0)) e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_CUSTOM+id)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id) e3:SetCountLimit(1,id+o)
e3:SetCost(s.thcost) e3:SetTarget(s.mttg)
e3:SetTarget(s.thtg) e3:SetOperation(s.mtop)
e3:SetOperation(s.thop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--material
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_CUSTOM+id)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,id+o)
e4:SetTarget(s.mttg)
e4:SetOperation(s.mtop)
c:RegisterEffect(e4)
local g=Group.CreateGroup() local g=Group.CreateGroup()
aux.RegisterMergedDelayedEvent(c,id,EVENT_TO_GRAVE,g) aux.RegisterMergedDelayedEvent(c,id,EVENT_TO_GRAVE,g)
aux.RegisterMergedDelayedEvent(c,id,EVENT_REMOVE,g) aux.RegisterMergedDelayedEvent(c,id,EVENT_REMOVE,g)
...@@ -82,14 +82,14 @@ function s.cfilter(c,tp) ...@@ -82,14 +82,14 @@ function s.cfilter(c,tp)
end end
function s.mttg(e,tp,eg,ep,ev,re,r,rp,chk) function s.mttg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=eg:Filter(s.cfilter,nil,tp) local g=eg:Filter(s.cfilter,nil,tp)
if chk==0 then return #g>0 end if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) and #g>0 end
Duel.SetTargetCard(g) Duel.SetTargetCard(g)
end end
function s.mtop(e,tp,eg,ep,ev,re,r,rp) function s.mtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=eg:Filter(s.cfilter,nil,tp) local g=eg:Filter(s.cfilter,nil,tp)
local mg=g:Filter(aux.NecroValleyFilter(Card.IsRelateToChain),nil) local mg=g:Filter(aux.NecroValleyFilter(Card.IsRelateToChain),nil)
if #mg>0 and c:IsRelateToChain() and c:IsType(TYPE_XYZ) then if #mg>0 and c:IsRelateToChain() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local og=mg:Select(tp,1,1,nil) local og=mg:Select(tp,1,1,nil)
Duel.Overlay(c,og) Duel.Overlay(c,og)
......
--アティスの蟲惑魔 --アティスの蟲惑魔
--Script by 奥克斯 --Script by 奥克斯
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
...@@ -49,15 +49,11 @@ function s.cfilter(c) ...@@ -49,15 +49,11 @@ function s.cfilter(c)
return c:GetType()==TYPE_TRAP return c:GetType()==TYPE_TRAP
end end
function s.atkcon(e) function s.atkcon(e)
local g=Duel.GetMatchingGroup(s.cfilter,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil) return Duel.IsExistingMatchingCard(s.cfilter,e:GetHandlerPlayer(),LOCATION_GRAVE,0,1,nil)
return #g>0
end end
function s.filter(c) function s.filter(c)
return c:IsFaceup() and c:IsRace(RACE_INSECT+RACE_PLANT) return c:IsFaceup() and c:IsRace(RACE_INSECT+RACE_PLANT)
end end
function s.rmfilter(c)
return c:GetType()==TYPE_TRAP and c:IsAbleToRemove()
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ct=Duel.GetMatchingGroupCount(s.filter,tp,LOCATION_MZONE,0,nil) local ct=Duel.GetMatchingGroupCount(s.filter,tp,LOCATION_MZONE,0,nil)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and aux.NegateAnyFilter(chkc) end if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and aux.NegateAnyFilter(chkc) end
...@@ -66,6 +62,9 @@ function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -66,6 +62,9 @@ function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,ct,nil) local g=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,#g,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,#g,0,0)
end end
function s.rmfilter(c)
return c:GetType()==TYPE_TRAP and c:IsAbleToRemove()
end
function s.disop(e,tp,eg,ep,ev,re,r,rp) function s.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetTargetsRelateToChain():Filter(Card.IsFaceup,nil) local g=Duel.GetTargetsRelateToChain():Filter(Card.IsFaceup,nil)
......
...@@ -18,7 +18,7 @@ function s.initial_effect(c) ...@@ -18,7 +18,7 @@ function s.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e2:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--Special Summon --Special Summon
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
......
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