Commit 18be2854 authored by Grajade's avatar Grajade

Update c86379867.lua

parent b4bdbe4e
Pipeline #8938 passed with stage
in 31 seconds
...@@ -32,15 +32,14 @@ end ...@@ -32,15 +32,14 @@ end
function c86379867.spfilter(c,e,tp) function c86379867.spfilter(c,e,tp)
local hasRoom=false local hasRoom=false
if c:IsLocation(LOCATION_EXTRA) then if c:IsLocation(LOCATION_EXTRA) then
hasRoom=Duel.GetLocationCountFromEx(tp,tp,nil,c) hasRoom=Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
else else
hasRoom=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 hasRoom=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end 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 end
function c86379867.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c86379867.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.IsExistingMatchingCard(c86379867.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil,e,tp) end
and 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) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA)
end end
function c86379867.operation(e,tp,eg,ep,ev,re,r,rp) 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) ...@@ -49,14 +48,13 @@ function c86379867.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) 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 g=Duel.SelectMatchingCard(tp,c86379867.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc and Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)>0 then
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
Duel.SendtoGrave(tc,REASON_EFFECT) Duel.SendtoGrave(tc,REASON_EFFECT)
end end
end end
-- --
function c86379867.spfilter2(c,e,tp) 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 end
function c86379867.con(e,tp,eg,ep,ev,re,r,rp) 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 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