--Magical Arrows function c249001058.initial_effect(c) aux.AddCodeList(c,249001056) --Activate local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) e1:SetCondition(c249001058.condition) e1:SetTarget(c249001058.target) e1:SetOperation(c249001058.activate) c:RegisterEffect(e1) end function c249001058.cfilter1(c) return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) end function c249001058.cfilter2(c) return c:IsFaceup() and c:IsCode(249001056) end function c249001058.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(c249001058.cfilter1,tp,LOCATION_MZONE,0,1,nil) and (Duel.GetTurnPlayer()==tp or Duel.IsExistingMatchingCard(c249001058.cfilter2,tp,LOCATION_ONFIELD,0,1,nil)) end function c249001058.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) end function c249001058.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT,LOCATION_REMOVED) end end