Commit 367995ad authored by wind2009's avatar wind2009

Add Duel.ConfirmCards

parent d493e8d1
Pipeline #25064 passed with stages
in 58 seconds
No preview for this file type
......@@ -125,6 +125,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
if #g1>0 and #g2>0 then
Duel.SendtoHand(Group.__add(g1,g2):SelectSubGroup(tp,s.fselect2,false,2,2),nil,REASON_EFFECT)
local tg=Duel.GetOperatedGroup()
Duel.ConfirmCards(1-tp,tg)
if tg:FilterCount(s.spfilter,nil,e,tp)==2 and Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.BreakEffect()
for tc in aux.Next(tg) do
......
......@@ -61,10 +61,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp,e:GetLabelObject())
local tc=sg:GetFirst()
if tc and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0
and tc:IsLocation(LOCATION_HAND) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and tc:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.BreakEffect()
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
if tc and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,tc)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.BreakEffect()
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
end
end
end
\ No newline at end of file
......@@ -49,10 +49,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
local lr=0
if tc:IsType(TYPE_XYZ) then lr=tc:GetRank() else lr=tc:GetLevel() end
local rg=tg:SelectSubGroup(tp,s.lrcheck,false,2,2,lr)
if rg and Duel.SendtoDeck(rg,nil,1,REASON_EFFECT)==2 then
Duel.BreakEffect()
local qg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil,POS_FACEUP)
Duel.Remove(qg,POS_FACEUP,REASON_EFFECT)
if rg then
Duel.ConfirmCards(1-tp,rg)
if Duel.SendtoDeck(rg,nil,1,REASON_EFFECT)==2 then
Duel.BreakEffect()
local qg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil,POS_FACEUP)
Duel.Remove(qg,POS_FACEUP,REASON_EFFECT)
end
end
end
end
\ No newline at end of file
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