Commit 5367b705 authored by mercury233's avatar mercury233 Committed by GitHub

fix 白の救済

parent c5cd6ef0
...@@ -48,25 +48,27 @@ function c63509474.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,25 +48,27 @@ function c63509474.condition(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and c:IsReason(REASON_DESTROY) return rp==1-tp and c:IsReason(REASON_DESTROY)
and c:IsReason(REASON_EFFECT) and c:IsPreviousControler(tp) and c:IsReason(REASON_EFFECT) and c:IsPreviousControler(tp)
end end
function c63509474.filter(c,e,tp) function c63509474.filter(c,e,tp,spchk)
return c:IsRace(RACE_FISH) and (c:IsAbleToHand() or c:IsCanBeSpecialSummoned(e,0,tp,false,false)) return c:IsRace(RACE_FISH) and (c:IsAbleToHand() or spchk and c:IsCanBeSpecialSummoned(e,0,tp,false,false))
end end
function c63509474.target(e,tp,eg,ep,ev,re,r,rp,chk) function c63509474.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c63509474.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end if chk==0 then
local spchk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
return Duel.IsExistingMatchingCard(c63509474.filter,tp,LOCATION_DECK,0,1,nil,e,tp,spchk)
end
end end
function c63509474.operation(e,tp,eg,ep,ev,re,r,rp) function c63509474.operation(e,tp,eg,ep,ev,re,r,rp)
local spchk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,c63509474.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c63509474.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp,spchk)
if g:GetCount()>0 then if g:GetCount()>0 then
local sc=g:GetFirst() local sc=g:GetFirst()
if sc then if spchk and sc:IsCanBeSpecialSummoned(e,0,tp,false,false)
if sc:IsCanBeSpecialSummoned(e,0,tp,false,false) and (not sc:IsAbleToHand() or Duel.SelectOption(tp,1190,1152)==1) then
and (not sc:IsAbleToHand() or Duel.SelectOption(tp,1190,1152)==1) then Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) else
else Duel.SendtoHand(sc,nil,REASON_EFFECT)
Duel.SendtoHand(sc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sc)
Duel.ConfirmCards(1-tp,sc)
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