Commit 59d41ff2 authored by POLYMER's avatar POLYMER

fix

parent 89ea8040
...@@ -29,19 +29,22 @@ end ...@@ -29,19 +29,22 @@ end
function s.lkfilter(g,lc) function s.lkfilter(g,lc)
return g:GetClassCount(Card.GetLinkCode)==g:GetCount() return g:GetClassCount(Card.GetLinkCode)==g:GetCount()
end end
function s.disfilter(c,tp)
return c:IsDiscardable() and and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,c)
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.disfilter,tp,LOCATION_HAND,0,1,nil,tp) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,nil) Duel.DiscardHand(tp,s.disfilter,1,1,REASON_COST+REASON_DISCARD,nil,tp)
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp) and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsPlayerCanDraw(tp) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,2,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,2,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 g=Duel.GetFieldGroup(tp,LOCATION_HAND,0):Select(tp,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
if g then local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) if #g>0 and Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 then
Duel.Draw(tp,2,REASON_EFFECT) Duel.Draw(tp,2,REASON_EFFECT)
end 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