Commit 1ca7f134 authored by Huangnan's avatar Huangnan

fix

parent 1e0b6f4e
Pipeline #39030 failed with stages
in 10 minutes and 57 seconds
...@@ -109,7 +109,8 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -109,7 +109,8 @@ function s.op(e,tp,eg,ep,ev,re,r,rp)
if #g==0 then return end if #g==0 then return end
local tg=g:Select(tp,1,1,nil) local tg=g:Select(tp,1,1,nil)
Duel.HintSelection(tg) Duel.HintSelection(tg)
if #tg>0 and Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and tg:GetFirst():IsLocation(LOCATION_DECK+LOCATION_EXTRA) and Duel.IsPlayerCanDiscardDeck(tp,2) then if #tg>0 and Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and tg:GetFirst():IsLocation(LOCATION_DECK+LOCATION_EXTRA)
and Duel.IsPlayerCanDiscardDeck(tp,1) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
Duel.DiscardDeck(tp,2,REASON_EFFECT) Duel.DiscardDeck(tp,2,REASON_EFFECT)
......
...@@ -30,7 +30,7 @@ function s.poscon1(e,tp,eg,ep,ev,re,r,rp) ...@@ -30,7 +30,7 @@ function s.poscon1(e,tp,eg,ep,ev,re,r,rp)
return tc:IsControler(1-tp) and tc:IsPosition(POS_FACEUP) and c:IsCanChangePosition() return tc:IsControler(1-tp) and tc:IsPosition(POS_FACEUP) and c:IsCanChangePosition()
end end
function s.poscost1(e,tp,eg,ep,ev,re,r,rp,chk) function s.poscost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanChangePosition() end if chk==0 then return c:IsAttackPos() end
Duel.ChangePosition(e:GetHandler(),POS_FACEUP_DEFENSE) Duel.ChangePosition(e:GetHandler(),POS_FACEUP_DEFENSE)
end end
function s.posop1(e,tp,eg,ep,ev,re,r,rp) function s.posop1(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -53,6 +53,7 @@ function cm.spcon(e,c) ...@@ -53,6 +53,7 @@ function cm.spcon(e,c)
return mg:CheckSubGroup(cm.gcheck,2,2,c,tp) return mg:CheckSubGroup(cm.gcheck,2,2,c,tp)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c) function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=mg:SelectSubGroup(tp,cm.gcheck,false,2,2,c,tp) local g=mg:SelectSubGroup(tp,cm.gcheck,false,2,2,c,tp)
Duel.SendtoGrave(g,REASON_SPSUMMON+REASON_COST) Duel.SendtoGrave(g,REASON_SPSUMMON+REASON_COST)
...@@ -86,7 +87,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -86,7 +87,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.gfilter(c) function cm.gfilter(c)
return not c:IsRace(RACE_ZOMBIE) return not c:IsRace(RACE_ZOMBIE) and c:IsType(TYPE_MONSTER)
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return ((rk.check(c,"BOW")) or (not Duel.IsExistingMatchingCard(cm.gfilter,tp,LOCATION_GRAVE,0,1,nil) and c:IsRace(RACE_ZOMBIE))) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return ((rk.check(c,"BOW")) or (not Duel.IsExistingMatchingCard(cm.gfilter,tp,LOCATION_GRAVE,0,1,nil) and c:IsRace(RACE_ZOMBIE))) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -90,7 +90,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -90,7 +90,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.gfilter(c) function cm.gfilter(c)
return not c:IsRace(RACE_ZOMBIE) return not c:IsRace(RACE_ZOMBIE) and c:IsType(TYPE_MONSTER)
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return ((rk.check(c,"BOW")) or (not Duel.IsExistingMatchingCard(cm.gfilter,tp,LOCATION_GRAVE,0,1,nil) and c:IsRace(RACE_ZOMBIE))) and c:IsFaceup() return ((rk.check(c,"BOW")) or (not Duel.IsExistingMatchingCard(cm.gfilter,tp,LOCATION_GRAVE,0,1,nil) and c:IsRace(RACE_ZOMBIE))) and c:IsFaceup()
......
...@@ -103,9 +103,11 @@ function s.adjustop(e,tp,eg,ep,ev,re,r,rp) ...@@ -103,9 +103,11 @@ function s.adjustop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(p,id) then if Duel.IsPlayerAffectedByEffect(p,id) then
for tc in aux.Next(cg) do for tc in aux.Next(cg) do
if tc:IsControlerCanBeChanged(false) then if tc:IsControlerCanBeChanged(false) then
sg:AddCard(tc) if Duel.GetLocationCount(p,LOCATION_MZONE)<1 then
else sg:AddCard(tc)
Duel.GetControl(tc,p) else
Duel.GetControl(tc,1-p)
end
end end
end end
end end
......
...@@ -82,18 +82,18 @@ function s.remop(e,tp,eg,ep,ev,re,r,rp) ...@@ -82,18 +82,18 @@ function s.remop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then if tc then
local e1=Effect.CreateEffect(c) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET) e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
end end
Duel.SpecialSummonComplete()
end end
\ No newline at end of file
...@@ -30,14 +30,14 @@ end ...@@ -30,14 +30,14 @@ end
function s.synfilter(c,e,tp) function s.synfilter(c,e,tp)
return c:IsSetCard(0x5c0) and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x5c0) and c:IsType(TYPE_MONSTER)
end end
function s.filter(c,e,tp) function s.filter(c,e,tp,lv)
return c:IsSetCard(0x5c0) and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x5c0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local cl=c:GetLevel() local cl=c:GetLevel()
local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK,0,nil,e,tp)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsAbleToDeck() and g:CheckWithSumEqual(Card.GetLevel,cl,1,99) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsAbleToDeck() and g:CheckWithSumEqual(Card.GetLevel,cl,1,5)
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,g,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,g,tp,LOCATION_DECK)
end end
...@@ -47,10 +47,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,10 +47,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK,0,nil):SelectWithSumEqual(tp,Card.GetLevel,cl,1,99) local lc=Duel.GetLocationCount(tp,LOCATION_MZONE)
if g:GetCount()==1 then local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK,0,nil,e,tp):SelectWithSumEqual(tp,Card.GetLevel,cl,1,lc)
if g:GetCount()==1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
elseif g:GetCount()>=2 and not Duel.IsPlayerAffectedByEffect(tp,59822133) then elseif g:GetCount()>=2 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and not Duel.IsPlayerAffectedByEffect(tp,59822133) then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
......
...@@ -57,6 +57,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,6 +57,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(s.efilter) e1:SetValue(s.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3))
end end
end end
end end
......
...@@ -53,7 +53,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,7 +53,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end end
function s.remcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.remcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return e:GetHandler():IsAbleToExtra() and Duel.IsExistingMatchingCard(s.refilter,tp,0,LOCATION_REMOVED,1,nil) end if chk==0 then return e:GetHandler():IsAbleToExtraAsCost() and Duel.IsExistingMatchingCard(s.refilter,tp,0,LOCATION_REMOVED,1,nil) end
local g=Duel.SelectMatchingCard(tp,s.remfilter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,1,c):GetFirst() local g=Duel.SelectMatchingCard(tp,s.remfilter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,1,c):GetFirst()
if g then if g then
Duel.SendtoDeck(c,tp,SEQ_DECKSHUFFLE,REASON_COST) Duel.SendtoDeck(c,tp,SEQ_DECKSHUFFLE,REASON_COST)
......
...@@ -63,7 +63,7 @@ end ...@@ -63,7 +63,7 @@ end
function s.spop(e,tp,eg,ep,ev,re,r,rp,c) function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
Duel.Remove(tc,POS_FACEUP,REASON_SPSUMMON) Duel.Remove(tc,POS_FACEUP,REASON_SPSUMMON)
if tc:IsSetCard(0x5c0) then if tc:IsSetCard(0x5c0) and tc:IsType(TYPE_MONSTER) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
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