Commit d9217ad4 authored by Amiya's avatar Amiya

修复

parent fa12a54c
...@@ -32,13 +32,12 @@ function s.thfilter(c) ...@@ -32,13 +32,12 @@ function s.thfilter(c)
return not c:IsCode(id) and c:IsSetCard(0x1cf) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return not c:IsCode(id) and c:IsSetCard(0x1cf) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
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.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end end
function s.thop(e,tp,eg,ep,ev,re,r,rp) function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if #g>0 then if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
......
...@@ -64,10 +64,10 @@ end ...@@ -64,10 +64,10 @@ end
function s.tdfilter(c,e,tp) function s.tdfilter(c,e,tp)
return c:IsLevel(0x1cf) and c:IsType(TYPE_MONSTER) return c:IsLevel(0x1cf) and c:IsType(TYPE_MONSTER)
and c:IsCanBeEffectTarget(e) and c:IsLevelAbove(3) and c:IsCanBeEffectTarget(e) and c:IsLevelAbove(3)
and (c:IsAbleToDeck() or c:IsCanBeSpecialSummoned(e,0,tp,false,false)) and (c:IsAbleToDeck() or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE))
end end
function s.fselect(g,e,tp) function s.fselect(g,e,tp)
return g:IsExists(Card.IsAbleToDeck,2,nil) and g:IsExists(Card.IsCanBeSpecialSummoned,1,nil,e,0,tp,false,false) return g:IsExists(Card.IsAbleToDeck,2,nil) and g:IsExists(Card.IsCanBeSpecialSummoned,1,nil,e,0,tp,false,false,POS_FACEUP_DEFENSE)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local dg=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_REMOVED,nil,e,tp) local dg=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_REMOVED,nil,e,tp)
...@@ -85,7 +85,9 @@ end ...@@ -85,7 +85,9 @@ end
function s.fselect2(g,e,tp,sg) function s.fselect2(g,e,tp,sg)
local ag=sg local ag=sg
ag:Sub(g) ag:Sub(g)
return g:IsExists(Card.IsAbleToDeck,2,nil) and ag:IsExists(Card.IsCanBeSpecialSummoned,1,nil,e,0,tp,false,false,POS_FACEUP_DEFENSE) return g:IsExists(Card.IsAbleToDeck,2,nil) and (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and ag:IsExists(Card.IsCanBeSpecialSummoned,1,nil,e,0,tp,false,false,POS_FACEUP_DEFENSE)
or not sg:IsExists(Card.IsCanBeSpecialSummoned,1,nil,e,0,tp,false,false,POS_FACEUP_DEFENSE)
or Duel.GetLocationCount(tp,LOCATION_MZONE)==0)
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToChain,nil) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToChain,nil)
...@@ -95,12 +97,15 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -95,12 +97,15 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
aux.PlaceCardsOnDeckBottom(tp,tg) aux.PlaceCardsOnDeckBottom(tp,tg)
elseif tg:GetCount()>2 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then elseif tg:GetCount()>2 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local sg=tg:SelectSubGroup(tp,s.fselect2,false,2,2,e,tp,g) local sg=tg:SelectSubGroup(tp,s.fselect2,false,2,2,e,tp,g)
if sg:GetCount()>0 then if sg:GetCount()>0 then
tg:Sub(sg) tg:Sub(sg)
aux.PlaceCardsOnDeckBottom(tp,sg) aux.PlaceCardsOnDeckBottom(tp,sg)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE) local tc=tg:GetFirst()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) then
Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end end
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