--Shya Shadowlord function c11000533.initial_effect(c) --Destroy local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(11000533,0)) e1:SetCategory(CATEGORY_DESTROY) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,11000533) e1:SetCondition(c11000533.condition) e1:SetCost(c11000533.cost) e1:SetTarget(c11000533.destg) e1:SetOperation(c11000533.desop) c:RegisterEffect(e1) --Own Special Summon local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_SPSUMMON_PROC) e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) e2:SetRange(LOCATION_HAND) e2:SetCountLimit(1,11001533) e2:SetCondition(c11000533.spcon) e2:SetOperation(c11000533.spop) c:RegisterEffect(e2) --Handes local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(11000533,1)) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetCountLimit(1,11002533) e3:SetCost(c11000533.hdcost) e3:SetTarget(c11000533.hdtg) e3:SetOperation(c11000533.hdop) c:RegisterEffect(e3) --todeck local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(11000533,2)) e4:SetCategory(CATEGORY_TOHAND) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e4:SetCode(EVENT_TO_GRAVE) e4:SetCountLimit(1,11003533) e4:SetCondition(c11000533.tdcon) e4:SetCost(c11000533.tdcost) e4:SetTarget(c11000533.tdtg) e4:SetOperation(c11000533.tdop) c:RegisterEffect(e4) end function c11000533.condfilter(c) return c:IsFaceup() and c:IsSetCard(0x1FD) end function c11000533.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return Duel.IsExistingMatchingCard(c11000533.condfilter,tp,LOCATION_MZONE,0,1,nil) end function c11000533.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsDiscardable() end Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) end function c11000533.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(1-tp) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) end function c11000533.desop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end end function c11000533.rfilter(c) return c:IsSetCard(0x1FD) and c:IsType(TYPE_MONSTER) end function c11000533.spcon(e,c) if c==nil then return true end return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 and Duel.CheckReleaseGroup(c:GetControler(),c11000533.rfilter,1,nil) end function c11000533.spop(e,tp,eg,ep,ev,re,r,rp,c) local g=Duel.SelectReleaseGroup(c:GetControler(),c11000533.rfilter,1,1,nil) if Duel.Release(g,REASON_COST) then Duel.SpecialSummonComplete() end end function c11000533.cfilter(c,tp) return c:IsSetCard(0x1FD) and (c:IsControler(tp) or c:IsFaceup()) and c:IsType(TYPE_MONSTER) end function c11000533.hdcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroup(tp,c11000533.cfilter,1,nil,tp) end local sg=Duel.SelectReleaseGroup(tp,c11000533.cfilter,1,1,nil,tp) Duel.Release(sg,REASON_COST) end function c11000533.hdtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,1) end function c11000533.hdop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) if g:GetCount()>0 then local sg=g:RandomSelect(1-tp,1) Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) end end function c11000533.tdcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function c11000533.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroup(tp,c11000533.cfilter,1,nil,tp) end local sg=Duel.SelectReleaseGroup(tp,c11000533.cfilter,1,1,nil,tp) Duel.Release(sg,REASON_COST) end function c11000533.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) end function c11000533.tdop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) end end