--Shooting Stardust Dragon function c269000008.initial_effect(c) --synchro summon aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSynchroType,TYPE_SYNCHRO),aux.FilterBoolFunction(c269000008.sfilter),1,1) c:EnableReviveLimit() --multi attack local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(24696097,0)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) e1:SetCondition(c269000008.mtcon) e1:SetOperation(c269000008.mtop) c:RegisterEffect(e1) --negate local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(24696097,1)) e2:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_CHAINING) e2:SetCountLimit(1) e2:SetRange(LOCATION_MZONE) e2:SetCondition(c269000008.discon) e2:SetTarget(c269000008.distg) e2:SetOperation(c269000008.disop) c:RegisterEffect(e2) --disable attack local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(246960978,2)) e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EVENT_FREE_CHAIN) e3:SetHintTiming(0,0xc) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCondition(c269000008.dacon) e3:SetTarget(c269000008.datg) e3:SetOperation(c269000008.daop) c:RegisterEffect(e3) --Revive local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(246960978,3)) e4:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD) e4:SetCategory(CATEGORY_SPECIAL_SUMMON) e4:SetCode(EVENT_PHASE+PHASE_END) e4:SetRange(LOCATION_REMOVED) e4:SetCountLimit(1) e4:SetTarget(c269000008.sumtg) e4:SetOperation(c269000008.sumop) c:RegisterEffect(e4) end function c269000008.sfilter(c) return c:IsRace(RACE_DRAGON) and c:IsSynchroType(TYPE_SYNCHRO) end function c269000008.mtcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsAbleToEnterBP() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=5 end function c269000008.mtop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() Duel.ConfirmDecktop(tp,5) local g=Duel.GetDecktopGroup(tp,5) local ct=g:FilterCount(Card.IsType,nil,TYPE_TUNER) Duel.ShuffleDeck(tp) if ct>0 then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) e1:SetValue(ct) c:RegisterEffect(e1) end end function c269000008.discon(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) return tg and tg:IsExists(Card.IsOnField,1,nil) and Duel.IsChainNegatable(ev) end function c269000008.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) end end function c269000008.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end end function c269000008.dacon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE end function c269000008.datg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return e:GetHandler():IsAbleToRemove() and not e:GetHandler():IsStatus(STATUS_CHAINING) end Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0) end function c269000008.daop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and Duel.Remove(c,POS_FACEUP,REASON_EFFECT)~=0 then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetReset(RESET_PHASE+PHASE_END) e1:SetCountLimit(1) e1:SetOperation(c269000008.disop2) Duel.RegisterEffect(e1,tp) c:RegisterFlagEffect(269000008,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,0) end end function c269000008.disop2(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,0,269000008) Duel.NegateAttack() end function c269000008.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:GetFlagEffect(269000008)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function c269000008.sumop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end