--Number P135: Lightning Lynx function c249001077.initial_effect(c) c:EnableReviveLimit() aux.AddCodeList(c,249001075) --spsummon condition local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_SINGLE) e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e0:SetCode(EFFECT_SPSUMMON_CONDITION) e0:SetValue(c249001077.splimit) c:RegisterEffect(e0) --double attack local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(82944432,0)) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) e1:SetCondition(c249001077.condition) e1:SetCost(c249001077.cost) e1:SetTarget(c249001077.target) e1:SetOperation(c249001077.operation) c:RegisterEffect(e1) --Negate local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(44508094,0)) e2:SetCategory(CATEGORY_NEGATE+CATEGORY_ATKCHANGE) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_CHAINING) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e2:SetRange(LOCATION_MZONE) e2:SetCondition(c249001077.condition2) e2:SetTarget(c249001077.target2) e2:SetOperation(c249001077.operation2) c:RegisterEffect(e2) end c249001077.xyz_number=135 function c249001077.splimit(e,se,sp,st) return e:GetHandler():GetLocation()~=LOCATION_EXTRA end function c249001077.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsAbleToEnterBP() end function c249001077.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) end function c249001077.filter(c) return c:IsFaceup() and c:IsSetCard(0xC048) and not c:IsHasEffect(EFFECT_EXTRA_ATTACK) end function c249001077.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c249001077.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(c249001077.filter,tp,LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,c249001077.filter,tp,LOCATION_MZONE,0,1,1,nil) end function c249001077.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetValue(1) tc:RegisterEffect(e1) end end function c249001077.condition2(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,249001075) or not Duel.IsChainNegatable(ev) then return false end if re:IsHasCategory(CATEGORY_NEGATE) and Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT):IsHasType(EFFECT_TYPE_ACTIVATE) then return false end local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY) return ex and tg~=nil and tc+tg:FilterCount(Card.IsOnField,nil)-tg:GetCount()>0 end function c249001077.target2(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) end function c249001077.operation2(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and e:GetHandler():IsRelateToEffect(e) then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetValue(400) e:GetHandler():RegisterEffect(e1) end end