--created by Discord \ LeonDuvall, coded by Discord \ XGlitchy30 --Chahine, Paintress of YC.Org local s,id,o=GetID() function s.initial_effect(c) aux.EnablePendulumAttribute(c) local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,0)) e3:SetCategory(CATEGORY_DESTROY+CATEGORY_SEARCH+CATEGORY_TOHAND) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_PZONE) e3:SetCountLimit(1,id) e3:SetCost(s.thcost) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) end function s.counterfilter(c) return c:IsSetCard(0x96b,0xc50) end function s.costfilter(c,tp,code) return c:IsSetCard(0x96b,0xc50) and not c:IsPublic() and ((not code and Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,c,tp,c:GetCode())) or not c:IsCode(code)) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil,tp,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) local g1=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND,0,1,1,nil,tp,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) local g2=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND,0,1,1,g1:GetFirst(),tp,g1:GetFirst():GetCode()) g1:Merge(g2) if #g1<=0 then return end Duel.ConfirmCards(1-tp,g1) Duel.ShuffleHand(tp) end function s.splimit(e,c) return not s.counterfilter(c) end function s.filter(c) return c:IsSetCard(0x96b,0xc50) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsDestructable() and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetReset(RESET_PHASE+PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) if Duel.Destroy(c,REASON_EFFECT)==0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,s.filter,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