Commit b9592792 authored by wind2009's avatar wind2009

Fix 無垢なる者 メディウス

parent 1a23a647
...@@ -49,7 +49,8 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,7 +49,8 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.spfilter(c,tp,chk) function s.spfilter(c,tp,chk)
return c:IsFaceupEx() and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() and Duel.GetMZoneCount(tp,c)>0 return c:IsFaceupEx() and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
and (Duel.GetMZoneCount(tp,c)>0 or not chk)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -61,7 +62,12 @@ end ...@@ -61,7 +62,12 @@ end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local rg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,nil,tp) local rg=nil
if Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil,tp,true) then
rg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,nil,tp,true)
else
rg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,nil,tp,false)
end
if rg and rg:GetCount()>0 then if rg and rg:GetCount()>0 then
if rg:IsExists(Card.IsLocation,1,nil,LOCATION_HAND) then if rg:IsExists(Card.IsLocation,1,nil,LOCATION_HAND) then
Duel.ConfirmCards(1-tp,rg) Duel.ConfirmCards(1-tp,rg)
......
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