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)
if #g==0 then return end
local tg=g:Select(tp,1,1,nil)
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.DisableShuffleCheck()
Duel.DiscardDeck(tp,2,REASON_EFFECT)
......
......@@ -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()
end
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)
end
function s.posop1(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -53,6 +53,7 @@ function cm.spcon(e,c)
return mg:CheckSubGroup(cm.gcheck,2,2,c,tp)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=mg:SelectSubGroup(tp,cm.gcheck,false,2,2,c,tp)
Duel.SendtoGrave(g,REASON_SPSUMMON+REASON_COST)
......@@ -86,7 +87,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.gfilter(c)
return not c:IsRace(RACE_ZOMBIE)
return not c:IsRace(RACE_ZOMBIE) and c:IsType(TYPE_MONSTER)
end
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)
......
......@@ -90,7 +90,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.gfilter(c)
return not c:IsRace(RACE_ZOMBIE)
return not c:IsRace(RACE_ZOMBIE) and c:IsType(TYPE_MONSTER)
end
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()
......
......@@ -103,9 +103,11 @@ function s.adjustop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(p,id) then
for tc in aux.Next(cg) do
if tc:IsControlerCanBeChanged(false) then
sg:AddCard(tc)
else
Duel.GetControl(tc,p)
if Duel.GetLocationCount(p,LOCATION_MZONE)<1 then
sg:AddCard(tc)
else
Duel.GetControl(tc,1-p)
end
end
end
end
......
......@@ -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 tc=g:GetFirst()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
end
\ No newline at end of file
......@@ -30,14 +30,14 @@ end
function s.synfilter(c,e,tp)
return c:IsSetCard(0x5c0) and c:IsType(TYPE_MONSTER)
end
function s.filter(c,e,tp)
return c:IsSetCard(0x5c0) and c:IsType(TYPE_MONSTER)
function s.filter(c,e,tp,lv)
return c:IsSetCard(0x5c0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local cl=c:GetLevel()
local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK,0,nil)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsAbleToDeck() and g:CheckWithSumEqual(Card.GetLevel,cl,1,99)
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,5)
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)
end
......@@ -47,10 +47,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) then
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
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)
if g:GetCount()==1 then
local lc=Duel.GetLocationCount(tp,LOCATION_MZONE)
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)
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)
end
end
......
......@@ -57,6 +57,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(s.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
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
......
......@@ -53,7 +53,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end
function s.remcost(e,tp,eg,ep,ev,re,r,rp,chk)
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()
if g then
Duel.SendtoDeck(c,tp,SEQ_DECKSHUFFLE,REASON_COST)
......
......@@ -63,7 +63,7 @@ end
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
local tc=e:GetLabelObject()
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)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
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