Commit 43f7162a authored by wyykak's avatar wyykak

fix 86379867

parent ef17daab
......@@ -30,7 +30,13 @@ function c86379867.initial_effect(c)
end
--
function c86379867.spfilter(c,e,tp)
return c:IsSetCard(0x190) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
local hasRoom=false
if c:IsLocation(LOCATION_EXTRA) then
hasRoom=Duel.GetLocationCountFromEx(tp,tp,nil,c)
else
hasRoom=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
return c:IsSetCard(0x190) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and hasRoom
end
function c86379867.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......@@ -41,7 +47,7 @@ function c86379867.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c86379867.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,c86379867.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
......
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