--Magician of New Creation local s,id,o=GetID() function s.initial_effect(c) c:EnableReviveLimit() aux.AddOrigBigbangType(c) aux.AddBigbangProc(c,s.matfilter,1,1,aux.NOT(Card.IsNeutral),1) --Unaffected by your opponent's Spell effects. local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) e1:SetValue(s.efilter) c:RegisterEffect(e1) --If this card is Bigbang Summoned: You can target 1 Spell in your GY; add it to your hand. local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_TOHAND) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e2:SetCountLimit(1,{id,0}) e2:SetCondition(s.thcon) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) --If this card is destroyed by battle or card effect: You can add 1 DARK Spellcaster monster from your Deck to your hand. local e3=Effect.CreateEffect(c) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetCode(EVENT_DESTROYED) e3:SetCountLimit(1,{id,1}) e3:SetCondition(s.thcon2) e3:SetTarget(s.thtg2) e3:SetOperation(s.thop2) c:RegisterEffect(e3) end function s.matfilter(c) return c:IsNeutral() and c:IsRace(RACE_SPELLCASTER) end function s.efilter(e,te) return te:IsActiveType(TYPE_SPELL) and te:GetOwnerPlayer()~=e:GetHandlerPlayer() end function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsSummonType(SUMMON_TYPE_BIGBANG) end function s.thfilter(c) return c:IsType(TYPE_SPELL) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end end function s.thcon2(e,tp,eg,ep,ev,re,r,rp) return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0 end function s.thfilter2(c) return c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToHand() end function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function s.thop2(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,s.thfilter2,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