Commit 45924414 authored by wind2009's avatar wind2009

Fix B·F·W

parent b76f6e51
...@@ -38,13 +38,12 @@ function s.tgfilter(c,e,tp,chk) ...@@ -38,13 +38,12 @@ function s.tgfilter(c,e,tp,chk)
and (chk or Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetAttack(),tp)) and (chk or Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetAttack(),tp))
end end
function s.thfilter(c,atk,tp) function s.thfilter(c,atk,tp)
return c:IsSetCard(0x12f) and c:IsAttackBelow(atk-1) return c:IsSetCard(0x12f) and c:IsAttackBelow(atk-1) and c:IsAbleToHand()
and c:IsAbleToHand()
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return eg:IsContains(chkc) and s.tgfilter(chkc,e,tp,true) end if chkc then return eg:IsContains(chkc) and s.tgfilter(chkc,e,tp,true) end
local g=eg:Filter(s.tgfilter,nil,e,tp,false) local g=eg:Filter(s.tgfilter,nil,e,tp,false)
if chk==0 then return g:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end if chk==0 then return g:GetCount()>0 end
if g:GetCount()==1 then if g:GetCount()==1 then
Duel.SetTargetCard(g:GetFirst()) Duel.SetTargetCard(g:GetFirst())
else else
...@@ -52,10 +51,11 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -52,10 +51,11 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tc=g:Select(tp,1,1,nil) local tc=g:Select(tp,1,1,nil)
Duel.SetTargetCard(tc) Duel.SetTargetCard(tc)
end end
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 tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,tc:GetAttack(),tp) local sg=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,tc:GetAttack(),tp)
if sg:GetCount()>0 then if sg: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