Commit 18be2854 authored by Grajade's avatar Grajade

Update c86379867.lua

parent b4bdbe4e
......@@ -32,15 +32,14 @@ end
function c86379867.spfilter(c,e,tp)
local hasRoom=false
if c:IsLocation(LOCATION_EXTRA) then
hasRoom=Duel.GetLocationCountFromEx(tp,tp,nil,c)
hasRoom=Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
else
hasRoom=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
return c:IsSetCard(0x190) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and hasRoom
return c:IsSetCard(0x190) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and hasRoom and c:IsType(TYPE_MONSTER)
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
and Duel.IsExistingMatchingCard(c86379867.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil,e,tp) end
if chk==0 then return Duel.IsExistingMatchingCard(c86379867.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA)
end
function c86379867.operation(e,tp,eg,ep,ev,re,r,rp)
......@@ -49,14 +48,13 @@ function c86379867.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
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)
if tc and Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)>0 then
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
--
function c86379867.spfilter2(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return bit.band(c:GetOriginalType(),TYPE_MONSTER)~=0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c86379867.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and bit.band(e:GetHandler():GetReason(),REASON_BATTLE)~=0 and e:GetHandler():GetEquipGroup():IsExists(c86379867.spfilter2,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
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