--Skyburner Bombing Run --Commissioned by: Leon Duvall --Scripted by: XGlitchy30 local cid,id=GetID() function cid.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_DESTROY) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,TIMING_END_PHASE+TIMINGS_CHECK_MONSTER) e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH) e1:SetCondition(cid.condition) e1:SetTarget(cid.target) e1:SetOperation(cid.activate) c:RegisterEffect(e1) end --ACTIVATE --filters function cid.filter(c) return c:IsFaceup() and c:IsSetCard(0xf41) and c:IsType(TYPE_MONSTER) and c:IsLevelAbove(6) end --------- function cid.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(cid.filter,tp,LOCATION_MZONE,0,1,nil) end function cid.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc~=e:GetHandler() end if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,2,e:GetHandler()) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) if e:IsHasType(EFFECT_TYPE_ACTIVATE) then Duel.SetChainLimit(cid.limit(g)) end end function cid.limit(g) return function (e,ep,tp) return tp==ep or not g:IsContains(e:GetHandler()) end end function cid.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) Duel.Destroy(g,REASON_EFFECT) end