--Sinnamon Animation --Scripted by: XGlitchy30 local cid,id=GetID() function cid.initial_effect(c) c:EnableCounterPermit(0xa34) c:SetCounterLimit(0xa34,3) --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e1) --add counter local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetRange(LOCATION_SZONE) e2:SetOperation(cid.acop) c:RegisterEffect(e2) local e2x=e2:Clone() e2x:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2x) --reduce atk local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD) e3:SetCode(EFFECT_UPDATE_ATTACK) e3:SetRange(LOCATION_SZONE) e3:SetTargetRange(0,LOCATION_MZONE) e3:SetValue(cid.val) c:RegisterEffect(e3) --stack deck local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,1)) e4:SetType(EFFECT_TYPE_QUICK_O) e4:SetCode(EVENT_FREE_CHAIN) e4:SetHintTiming(0,TIMING_END_PHASE) e4:SetRange(LOCATION_SZONE) e4:SetCondition(cid.thcon) e4:SetCost(cid.thcost) e4:SetTarget(cid.thtg) e4:SetOperation(cid.thop) c:RegisterEffect(e4) end --add counter function cid.cfilter(c,tp) return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xa34) and c:IsControler(tp) end function cid.acop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if eg:IsExists(cid.cfilter,1,nil,tp) then c:AddCounter(0xa34,1) end end --reduce atk function cid.val(e,c) return -e:GetHandler():GetCounter(0xa34)*500 end --stack deck function cid.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsStatus(STATUS_EFFECT_ENABLED) end function cid.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end Duel.SendtoGrave(e:GetHandler(),REASON_COST) end function cid.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=3 end end function cid.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,1)) local g=Duel.SelectMatchingCard(tp,aux.AND(Card.IsSetCard,aux.NOT(Card.IsCode)),tp,LOCATION_DECK,0,3,3,nil,0xa34,id) if #g>0 then Duel.ConfirmCards(1-tp,g) Duel.ShuffleDeck(tp) local tc=g:GetFirst() while tc do Duel.MoveSequence(tc,0) tc=g:GetNext() end Duel.SortDecktop(tp,tp,g:GetCount()) else local deck=Duel.GetFieldGroup(tp,LOCATION_DECK,0) Duel.ConfirmCards(1-tp,deck) end end