--Inceneritrice del Cielo Brakadiano Rubinodemone --Scripted by: XGlitchy30 local s,id=GetID() function s.initial_effect(c) aux.AddCodeList(c,id) aux.EnablePendulumAttribute(c) --splimit local p0=Effect.CreateEffect(c) p0:SetType(EFFECT_TYPE_FIELD) p0:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) p0:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE) p0:SetRange(LOCATION_PZONE) p0:SetTargetRange(1,0) p0:SetTarget(s.splimit) c:RegisterEffect(p0) --spsummon local p1=Effect.CreateEffect(c) p1:SetDescription(aux.Stringid(id,0)) p1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) p1:SetType(EFFECT_TYPE_IGNITION) p1:SetRange(LOCATION_PZONE) p1:SetProperty(EFFECT_FLAG_CARD_TARGET) p1:SetCountLimit(1,id) p1:SetTarget(s.sptg) p1:SetOperation(s.spop) c:RegisterEffect(p1) --SS local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,1)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCountLimit(1,id+100) e1:SetCondition(s.condition) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) --ss local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetCategory(CATEGORY_DESTROY) e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetCode(EVENT_DESTROYED) e3:SetCountLimit(1,id+200) e3:SetCondition(s.dscon) e3:SetTarget(s.dstg) e3:SetOperation(s.dsop) c:RegisterEffect(e3) end function s.splimit(e,c) return not c:IsRace(RACE_DRAGON) end function s.desfilter1(c,tp) return c:IsFaceup() and Duel.GetMZoneCount(tp,c)>0 and not c:IsCode(id) end function s.spfilter(c,e,tp) return c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and s.desfilter1(chkc,tp) end if chk==0 then local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if ft<-1 then return false end return Duel.IsExistingTarget(s.desfilter1,tp,LOCATION_ONFIELD,0,1,nil,tp) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,s.desfilter1,tp,LOCATION_ONFIELD,0,1,1,nil,tp) if #g>0 then Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end end function s.spop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end end function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM) or re and re:GetHandler():IsSetCard(0xb48) end function s.spf(c,e,tp) return c:IsSetCard(0xb48) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spf,tp,LOCATION_HAND,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,s.spf,tp,LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end function s.dscon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_EFFECT) end function s.dstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) end function s.dsop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end end