--Chromalith the Luminescent Shifter local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() aux.AddOrigBigbangType(c) aux.AddBigbangProc(c,aux.NOT(Card.IsPositive),2) --If this card is Bigbang Summoned: You can target 1 monster on the field or in the GYs; banish it, and if you do, its owner can Special Summon 1 of their banished monster with a different Type and Attribute from the monster banished by this effect. local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e1:SetCountLimit(1,{id,0}) e1:SetCondition(s.rmcon) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) c:RegisterEffect(e1) --If this card is destroyed: You can target up to 6 monsters with different attributes in your GY, except this card; shuffle them into the Deck, and if you do, draw 1 card for every 2 cards shuffled. local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e2:SetCode(EVENT_DESTROYED) e2:SetCountLimit(1,{id,1}) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsSummonType(SUMMON_TYPE_BIGBANG) end function s.rmfilter(c) return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_MZONE) and s.rmfilter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,LOCATION_GRAVE+LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.SelectTarget(tp,s.rmfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,LOCATION_GRAVE+LOCATION_MZONE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,1-tp,LOCATION_GRAVE+LOCATION_MZONE) end function s.spfilter(c,e,tp,race,att) return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and not c:IsRace(race) and not c:IsAttribute(att) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) if Duel.IsExistingMatchingCard(s.spfilter,tc:GetOwner(),LOCATION_REMOVED,0,1,nil,e,tc:GetOwner(),tc:GetRace(),tc:GetAttribute()) and Duel.SelectYesNo(tc:GetOwner(),aux.Stringid(id,0)) then Duel.BreakEffect() local g1=Duel.SelectMatchingCard(tc:GetOwner(),s.spfilter,tc:GetOwner(),LOCATION_REMOVED,0,1,1,nil,e,tc:GetOwner(),tc:GetRace(),tc:GetAttribute()) if g1:GetCount()>0 then Duel.SpecialSummon(g1,0,tp,tp,false,false,POS_FACEUP) end end end end function s.filter(c,e) return c:IsAbleToDeck() and c:IsType(TYPE_MONSTER) end function s.fselect(g,tp) return g:GetClassCount(Card.GetAttribute)==#g end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_GRAVE,0,e:GetHandler(),e) if chkc then return false end if chk==0 then if not Duel.IsPlayerCanDraw(tp,1) then return false end return g:CheckSubGroup(s.fselect,2,6,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local sg=g:SelectSubGroup(tp,s.fselect,true,2,6,tp) Duel.SetTargetCard(sg) Duel.SetOperationInfo(0,CATEGORY_TODECK,sg,sg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) if not g then return end local sg=g:Filter(Card.IsRelateToEffect,nil,e) Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) local g2=Duel.GetOperatedGroup() if g2:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end local ct=g2:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) if ct>=2 then Duel.Draw(tp,ct//2,REASON_EFFECT) end end