--Cyber-Varia Strike Technique function c249000948.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_DESTROY) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCondition(c249000948.condition) e1:SetTarget(c249000948.target) e1:SetOperation(c249000948.activate) c:RegisterEffect(e1) --atk local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(249000948,0)) e2:SetCategory(CATEGORY_ATKCHANGE) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetRange(LOCATION_GRAVE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e2:SetCode(EVENT_FREE_CHAIN) e2:SetHintTiming(TIMING_DAMAGE_STEP) e2:SetCondition(c249000948.atkcon) e2:SetCost(aux.bfgcost) e2:SetTarget(c249000948.target2) e2:SetOperation(c249000948.operation) c:RegisterEffect(e2) end function c249000948.cfilter1(c) return c:IsFaceup() and c:IsSetCard(0x1FD) end function c249000948.cfilter2(c) return c:IsFaceup() and c:GetCode()==249000945 end function c249000948.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(c249000948.cfilter1,tp,LOCATION_MZONE,0,1,nil) and (Duel.GetTurnPlayer()==tp or Duel.IsExistingMatchingCard(c249000948.cfilter2,tp,LOCATION_ONFIELD,0,1,nil)) end function c249000948.target(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then local ct=Duel.GetMatchingGroupCount(c249000948.cfilter1,tp,LOCATION_MZONE,0,nil) e:SetLabel(ct+1) return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,c) end local ct=e:GetLabel() local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,c) Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,0) end function c249000948.activate(e,tp,eg,ep,ev,re,r,rp) local ct=Duel.GetMatchingGroupCount(c249000948.cfilter1,tp,LOCATION_MZONE,0,nil)+1 local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,aux.ExceptThisCard(e)) if g:GetCount()>=1 and ct>=1 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local sg=g:Select(tp,1,ct,nil) Duel.HintSelection(sg) Duel.Destroy(sg,REASON_EFFECT) end end function c249000948.atkcon(e,tp,eg,ep,ev,re,r,rp) return aux.exccon(e) and Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) end function c249000948.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c249000948.cfilter1(chkc) end if chk==0 then return Duel.IsExistingTarget(c249000948.cfilter1,tp,LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,c249000948.cfilter1,tp,LOCATION_MZONE,0,1,1,nil) end function c249000948.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and tc:IsFaceup() then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetValue(1200) tc:RegisterEffect(e1) end end