Commit f63a173b authored by Huangnan's avatar Huangnan

fix

parent bf64a95e
Pipeline #38671 failed with stages
in 79 minutes
......@@ -89,11 +89,6 @@ function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,cm.setfilter,tp,LOCATION_DECK,0,1,1,nil,tpe)
if g:GetCount()>0 then
local tc=g:GetFirst()
local op=Duel.SelectOption(tp,aux.Stringid(m,2),aux.Stringid(m,3))
if op==0 then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
else
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
\ No newline at end of file
......@@ -81,8 +81,8 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g)
Duel.ConfirmCards(tp,g1)
if not Duel.SelectYesNo(tp,aux.Stringid(m,4)) then return end
local tg1=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,nil)
local tg2=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,0,LOCATION_GRAVE,nil)
local tg1=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local tg2=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
local tg3=g1:Filter(Card.IsAbleToHand,nil)
local sg=Group.CreateGroup()
if tg1:GetCount()>0 and ((tg2:GetCount()==0 and tg3:GetCount()==0) or Duel.SelectYesNo(tp,aux.Stringid(m,1))) then
......
......@@ -41,29 +41,21 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
function cm.filter(c)
return c:IsFaceup() and c:IsRace(RACE_ZOMBIE) and c:IsAbleToGraveAsCost()
return c:IsRace(RACE_ZOMBIE) and c:IsAbleToGraveAsCost()
end
function cm.mzfilter(g,tp)
return Duel.GetLocationCountFromEx(tp,tp,g)>0
end
function cm.mzfilter1(c,tp)
return c:GetSequence()<5
function cm.gcheck(g,tc,tp)
return Duel.GetLocationCountFromEx(tp,tp,g,tc)>0
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_MZONE,0,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=-ft+1
return ft>-2 and mg:GetCount()>1 and (ft>0 or mg:IsExists(cm.mzfilter1,ct,nil))
return mg:CheckSubGroup(cm.gcheck,2,2,c,tp)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_MZONE,0,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=nil
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
g=mg:SelectSubGroup(tp,cm.mzfilter,false,2,2,tp)
Duel.SendtoGrave(g,REASON_COST)
local g=mg:SelectSubGroup(tp,cm.gcheck,false,2,2,c,tp)
Duel.SendtoGrave(g,REASON_SPSUMMON+REASON_COST)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -103,11 +103,9 @@ 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
if not tc:IsControlerCanBeChanged(true) then
sg:AddCard(tc)
else
Duel.GetControl(tc,1-p)
end
sg:AddCard(tc)
else
Duel.GetControl(tc,p)
end
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