--Pastel Palettes - Sign Dream --Script by XyLeN function c20015005.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_TOGRAVE) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,20015005+EFFECT_COUNT_CODE_OATH) e1:SetTarget(c20015005.target) e1:SetOperation(c20015005.activate) c:RegisterEffect(e1) end function c20015005.spfilter(c,e,tp) return not aux.LvL6or7Check(c) and c:IsSetCard(0x880) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function c20015005.tgfilter(c) return aux.LvL6or7Check(c) and c:IsSetCard(0x880) and c:IsAbleToGrave() end function c20015005.target(e,tp,eg,ep,ev,re,r,rp,chk) local b1=Duel.IsExistingMatchingCard(c20015005.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local b2=Duel.IsExistingMatchingCard(c20015005.tgfilter,tp,LOCATION_DECK,0,1,nil) if chk==0 then return b1 or b2 end local off=1 local ops,opval={},{} if b1 then ops[off]=aux.Stringid(20015005,0) opval[off]=0 off=off+1 end if b2 then ops[off]=aux.Stringid(20015005,1) opval[off]=1 off=off+1 end local op=Duel.SelectOption(tp,table.unpack(ops))+1 local sel=opval[op] e:SetLabel(sel) if sel==0 then e:SetCategory(CATEGORY_SPECIAL_SUMMON) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) else e:SetCategory(CATEGORY_TOGRAVE) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) end end function c20015005.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local sel=e:GetLabel() if sel==0 then if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,c20015005.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) if g:GetCount()>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end else Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,c20015005.tgfilter,tp,LOCATION_DECK,0,1,1,nil) if g:GetCount()>0 then Duel.SendtoGrave(g,REASON_EFFECT) end end end dofile("script/Pastel Palettes Core.lua")