--Sherigan, l'Incantatrice Nottesfumo --Script by XGlitchy30 function c62613301.initial_effect(c) --spsummon self local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(62613301,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:HOPT() e1:SetCost(c62613301.spcost) e1:SetTarget(c62613301.sptg) e1:SetOperation(c62613301.spop) c:RegisterEffect(e1) --search local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(62613301,1)) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_SUMMON_SUCCESS) e2:HOPT() e2:SetTarget(c62613301.thtg) e2:SetOperation(c62613301.thop) c:RegisterEffect(e2) --return local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(62613301,2)) e3:SetCategory(CATEGORY_TOGRAVE) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetCode(EVENT_BE_MATERIAL) e3:HOPT() e3:SetCondition(c62613301.rtcon) e3:SetTarget(c62613301.rttg) e3:SetOperation(c62613301.rtop) c:RegisterEffect(e3) end --filters function c62613301.cfilter(c) return c:IsDiscardable() and c:IsSetCard(ARCHE_NIGHTSHADE) end function c62613301.thfilter(c) return c:IsSetCard(ARCHE_NIGHTSHADE) and c:IsAbleToHand() end function c62613301.rtfilter(c) return c:IsFaceup() and c:IsSetCard(ARCHE_NIGHTSHADE) end --spsummon self function c62613301.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c62613301.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end Duel.DiscardHand(tp,c62613301.cfilter,1,1,REASON_COST+REASON_DISCARD,e:GetHandler()) end function c62613301.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function c62613301.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToChain() then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end end --search function c62613301.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c62613301.thfilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function c62613301.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,c62613301.thfilter,tp,LOCATION_DECK,0,1,1,nil) if g:GetCount()>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end end --return function c62613301.rtcon(e,tp,eg,ep,ev,re,r,rp) return r==REASON_SYNCHRO end function c62613301.rttg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c62613301.rtfilter,tp,LOCATION_REMOVED,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0) end function c62613301.rtop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,c62613301.rtfilter,tp,LOCATION_REMOVED,0,1,1,nil) if g:GetCount()>0 then Duel.HintSelection(g) Duel.SendtoGrave(g,REASON_EFFECT+REASON_RETURN) end end