--Mage-Core of Lightning function c249001264.initial_effect(c) aux.EnableDualAttribute(c) --destroy local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(249001264,0)) e1:SetCategory(CATEGORY_DESTROY) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCondition(c249001264.condition) e1:SetCost(c249001264.cost) e1:SetTarget(c249001264.target) e1:SetOperation(c249001264.operation) c:RegisterEffect(e1) end function c249001264.cfilter(c) return c:IsFaceup() and c:IsCode(249001261) end function c249001264.condition(e,tp,eg,ep,ev,re,r,rp) return aux.IsDualState(e) and Duel.IsExistingMatchingCard(c249001264.cfilter,tp,LOCATION_ONFIELD,0,1,nil) end function c249001264.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsReleasable() end Duel.Release(e:GetHandler(),REASON_COST) end function c249001264.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetChainLimit(aux.FALSE) end function c249001264.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then if Duel.Destroy(tc,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(16037007,1)) then Duel.BreakEffect() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) Duel.HintSelection(g) Duel.Destroy(g,REASON_EFFECT) end end end