Commit c072ab62 authored by mercury233's avatar mercury233

use Duel.SelectOption

parent fef9f1d9
...@@ -31,7 +31,7 @@ function c15978426.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -31,7 +31,7 @@ function c15978426.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c15978426.filter,tp,LOCATION_DECK,0,1,1,nil,tohand) local g=Duel.SelectMatchingCard(tp,c15978426.filter,tp,LOCATION_DECK,0,1,1,nil,tohand)
local tc=g:GetFirst() local tc=g:GetFirst()
if not tc then return end if not tc then return end
if tohand and tc:IsAbleToHand() and (not tc:IsAbleToGrave() or Duel.SelectYesNo(tp,aux.Stringid(15978426,1))) then if tohand and tc:IsAbleToHand() and (not tc:IsAbleToGrave() or Duel.SelectOption(tp,1191,1190)==1) then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
else else
......
...@@ -37,35 +37,22 @@ end ...@@ -37,35 +37,22 @@ end
function c60470713.mfilter(c) function c60470713.mfilter(c)
return c:IsFaceup() and c:IsSetCard(0x71) and c:IsRace(RACE_FAIRY) return c:IsFaceup() and c:IsSetCard(0x71) and c:IsRace(RACE_FAIRY)
end end
function c60470713.filter1(c) function c60470713.filter(c,e,tp,chk)
return c:IsSetCard(0x71) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c60470713.filter2(c,e,tp)
return c:IsSetCard(0x71) and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x71) and c:IsType(TYPE_MONSTER)
and (c:IsAbleToHand() or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)) and (c:IsAbleToHand() or chk and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK))
end end
function c60470713.operation(e,tp,eg,ep,ev,re,r,rp) function c60470713.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local b=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c60470713.mfilter,tp,LOCATION_MZONE,0,1,nil) local b=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c60470713.mfilter,tp,LOCATION_MZONE,0,1,nil)
if not b then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,c60470713.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp,b)
local g=Duel.SelectMatchingCard(tp,c60470713.filter1,tp,LOCATION_DECK,0,1,1,nil) local tc=g:GetFirst()
if g:GetCount()>0 then if tc then
Duel.SendtoHand(g,nil,REASON_EFFECT) if b and tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
Duel.ConfirmCards(1-tp,g) and (not tc:IsAbleToHand() or Duel.SelectOption(tp,1190,1152)==1) then
end Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK)
else else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.SendtoHand(tc,nil,REASON_EFFECT)
local g=Duel.SelectMatchingCard(tp,c60470713.filter2,tp,LOCATION_DECK,0,1,1,nil,e,tp) Duel.ConfirmCards(1-tp,tc)
local tc=g:GetFirst()
if tc then
if not tc:IsAbleToHand() or (tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
and Duel.SelectYesNo(tp,aux.Stringid(60470713,1))) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK)
else
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end end
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