Commit b36084a6 authored by wind2009's avatar wind2009

Fix

parent b51cb932
Pipeline #42775 passed with stages
in 3 minutes and 48 seconds
...@@ -78,7 +78,7 @@ function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -78,7 +78,7 @@ function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.setop(e,tp,eg,ep,ev,re,r,rp) function s.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToChain() and Duel.SSet(tp,c)~=0 then if c:IsRelateToChain() and aux.NecroValleyFilter()(c) and Duel.SSet(tp,c)~=0 then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(id,2)) e1:SetDescription(aux.Stringid(id,2))
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -100,7 +100,7 @@ function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -100,7 +100,7 @@ function s.postg(e,tp,eg,ep,ev,re,r,rp,chk)
and Duel.IsExistingMatchingCard(s.posfilter,tp,LOCATION_MZONE,0,1,nil) end and Duel.IsExistingMatchingCard(s.posfilter,tp,LOCATION_MZONE,0,1,nil) end
local g=Duel.GetMatchingGroup(s.posfilter,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(s.posfilter,tp,LOCATION_MZONE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
Duel.SetOperationInfo(0,0x100000000,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_MSET,eg,1,0,0)
end end
function s.posop(e,tp,eg,ep,ev,re,r,rp) function s.posop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(s.cfilter,tp,LOCATION_PZONE,0,nil) local ct=Duel.GetMatchingGroupCount(s.cfilter,tp,LOCATION_PZONE,0,nil)
......
...@@ -49,6 +49,8 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -49,6 +49,8 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if e:IsCostChecked() then if e:IsCostChecked() then
e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_GRAVE_SPSUMMON+CATEGORY_GRAVE_ACTION) e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_GRAVE_SPSUMMON+CATEGORY_GRAVE_ACTION)
end end
local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_GRAVE,0,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end end
end end
function s.atkfilter(e,c) function s.atkfilter(e,c)
......
...@@ -38,6 +38,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,6 +38,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
local fg=tg-tc2 local fg=tg-tc2
local tc3=fg:GetFirst() local tc3=fg:GetFirst()
if Duel.Remove(tc2,POS_FACEUP,REASON_EFFECT)~=0 then if Duel.Remove(tc2,POS_FACEUP,REASON_EFFECT)~=0 then
Duel.BreakEffect()
local op=aux.SelectFromOptions(1-tp, local op=aux.SelectFromOptions(1-tp,
{true,aux.Stringid(id,1),1}, {true,aux.Stringid(id,1),1},
{true,aux.Stringid(id,2),2}) {true,aux.Stringid(id,2),2})
......
...@@ -35,7 +35,6 @@ function s.thfilter(c) ...@@ -35,7 +35,6 @@ function s.thfilter(c)
return c:IsSetCard(0x2dc) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:IsSetCard(0x2dc) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ch=Duel.GetCurrentChain()
local b1=Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp) local b1=Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp)
and (not e:IsCostChecked() or Duel.GetFlagEffect(tp,id)==0) and (not e:IsCostChecked() or Duel.GetFlagEffect(tp,id)==0)
local b2=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) local b2=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil)
...@@ -56,8 +55,8 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -56,8 +55,8 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
elseif op==2 then elseif op==2 then
if e:IsCostChecked() then if e:IsCostChecked() then
Duel.RegisterFlagEffect(tp,id+o,RESET_PHASE+PHASE_END,0,1)
e:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) e:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
Duel.RegisterFlagEffect(tp,id+o,RESET_PHASE+PHASE_END,0,1)
end end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
......
...@@ -53,12 +53,17 @@ function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -53,12 +53,17 @@ function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function s.drop(e,tp,eg,ep,ev,re,r,rp) function s.drop(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.tdfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
if sg:GetCount()<3 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.tdfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,3,3,nil) local g=sg:Select(tp,3,3,nil)
if g:GetCount()>0 and Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 if g:GetCount()>0 then
and g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK+LOCATION_EXTRA) then Duel.HintSelection(g)
Duel.BreakEffect() if Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0
Duel.Draw(tp,1,REASON_EFFECT) and g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK+LOCATION_EXTRA) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end end
end end
function s.cfilter(c,tp) function s.cfilter(c,tp)
......
...@@ -53,16 +53,19 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -53,16 +53,19 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFlagEffect(1-tp,id) local ct=Duel.GetFlagEffect(1-tp,id)
local flag=false
if ct>=1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if ct>=1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) then and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
flag=true
end end
end end
if ct>=3 and Duel.GetFlagEffect(tp,id+o)==0 then if ct>=3 and Duel.GetFlagEffect(tp,id+o)==0 then
Duel.BreakEffect() if flag then Duel.BreakEffect() end
flag=true
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(id,1)) e1:SetDescription(aux.Stringid(id,1))
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
...@@ -76,6 +79,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -76,6 +79,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,id+o,RESET_PHASE+PHASE_END+RESET_SELF_TURN,0,1) Duel.RegisterFlagEffect(tp,id+o,RESET_PHASE+PHASE_END+RESET_SELF_TURN,0,1)
end end
if ct>=5 then if ct>=5 then
if flag then Duel.BreakEffect() end
local g=Duel.GetMatchingGroup(s.posfilter,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(s.posfilter,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.BreakEffect() Duel.BreakEffect()
...@@ -84,5 +88,5 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -84,5 +88,5 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.efilter(e,re) function s.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer() and re:IsActivated() return e:GetHandlerPlayer()~=re:GetOwnerPlayer() and re:IsActivated()
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