Commit d6436180 authored by yks's avatar yks

fix: fix the bug that can only search 1 card

parent 40fea7ee
Pipeline #27980 failed with stages
in 27 seconds
...@@ -51,9 +51,11 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -51,9 +51,11 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function s.thop(e,tp,eg,ep,ev,re,r,rp) function s.thop(e,tp,eg,ep,ev,re,r,rp)
local rg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK,0,nil)
if rg:GetCount()<2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,2,2,nil) local g=rg:Select(tp,2,2,nil)
if g:GetCount()>0 then if g:GetCount()==2 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
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