name: Inzektor
card_text: Once per turn: You can equip 1 "Inzektor" monster from your hand or GY to this card. While this card is equipped to a monster, that monster's Level is increased by 2, also it gains ATK/DEF equal to this card's ATK/DEF. While this card is equipped to a monster: You can send this Equip Card to the GY, then target 1 face-up monster you control; increase that target's Level by 1 or 2.
external_ids: local SETCARD_ID_0 = 0x56 --Inzektor
  
lua: local SETCARD_ID_0 = 0x56 --Inzektor
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--equip
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_IGNITION)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_EQUIP)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetCountLimit(1)
  	e1:SetTarget(s.eqtg)
  	e1:SetOperation(s.eqop)
  	c:RegisterEffect(e1)
  	--equip effect
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_EQUIP)
  	e2:SetCode(EFFECT_UPDATE_ATTACK)
  	e2:SetValue(500)
  	c:RegisterEffect(e2)
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_EQUIP)
  	e3:SetCode(EFFECT_UPDATE_DEFENSE)
  	e3:SetValue(100)
  	c:RegisterEffect(e3)
  	local e4 = Effect.CreateEffect(c)
  	e4:SetType(EFFECT_TYPE_EQUIP)
  	e4:SetCode(EFFECT_UPDATE_LEVEL)
  	e4:SetValue(2)
  	c:RegisterEffect(e4)
  	--lvup
  	local e5 = Effect.CreateEffect(c)
  	e5:SetDescription(aux.Stringid(id, 1))
  	e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e5:SetType(EFFECT_TYPE_IGNITION)
  	e5:SetRange(LOCATION_SZONE)
  	e5:SetCost(s.lvcost)
  	e5:SetTarget(s.lvtg)
  	e5:SetOperation(s.lvop)
  	c:RegisterEffect(e5)
  end
  function s.filter(c)
  	return c:IsSetCard(SETCARD_ID_0) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
  end
  function s.eqtg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.GetLocationCount(tp, LOCATION_SZONE) > 0 and Duel.IsExistingMatchingCard(s.filter, tp, LOCATION_GRAVE + LOCATION_HAND, 0, 1, nil)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_LEAVE_GRAVE, nil, 1, tp, LOCATION_GRAVE + LOCATION_HAND)
  end
  function s.eqop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	if Duel.GetLocationCount(tp, LOCATION_SZONE) <= 0 then
  		return
  	end
  	if c:IsFacedown() or not c:IsRelateToEffect(e) then
  		return
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_EQUIP)
  	local g = Duel.SelectMatchingCard(tp, aux.NecroValleyFilter(s.filter), tp, LOCATION_GRAVE + LOCATION_HAND, 0, 1, 1, nil)
  	local tc = g:GetFirst()
  	if tc then
  		if not Duel.Equip(tp, tc, c) then
  			return
  		end
  		local e1 = Effect.CreateEffect(c)
  		e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetCode(EFFECT_EQUIP_LIMIT)
  		e1:SetReset(RESET_EVENT + RESETS_STANDARD)
  		e1:SetValue(s.eqlimit)
  		tc:RegisterEffect(e1)
  	end
  end
  function s.eqlimit(e, c)
  	return e:GetOwner() == c
  end
  function s.lvcost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return e:GetHandler():IsAbleToGraveAsCost()
  	end
  	Duel.SendtoGrave(e:GetHandler(), REASON_COST)
  end
  function s.lvfilter(c)
  	return c:IsFaceup() and c:IsLevelAbove(0)
  end
  function s.lvtg(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.lvfilter(chkc)
  	end
  	if chk == 0 then
  		return e:GetHandler():GetEquipTarget() and Duel.IsExistingTarget(s.lvfilter, tp, LOCATION_MZONE, 0, 1, nil)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_FACEUP)
  	Duel.SelectTarget(tp, s.lvfilter, tp, LOCATION_MZONE, 0, 1, 1, nil)
  end
  function s.lvop(e, tp, eg, ep, ev, re, r, rp)
  	local tc = Duel.GetFirstTarget()
  	if tc:IsRelateToEffect(e) and tc:IsFaceup() then
  		local opt = Duel.SelectOption(tp, aux.Stringid(id, 2), aux.Stringid(id, 3))
  		local e1 = Effect.CreateEffect(e:GetHandler())
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetCode(EFFECT_UPDATE_LEVEL)
  		e1:SetValue(opt + 1)
  		e1:SetReset(RESET_EVENT + RESETS_STANDARD)
  		tc:RegisterEffect(e1)
  	end
  end
  
  
source_text: Inzektor
  Once per turn: You can equip 1 "Inzektor" monster from your hand or GY to this card. While this card is equipped to a monster, that monster's Level is increased by 2, also it gains ATK/DEF equal to this card's ATK/DEF. While this card is equipped to a monster: You can send this Equip Card to the GY, then target 1 face-up monster you control; increase that target's Level by 1 or 2.
target_text: -- Inzektor
  local SETCARD_ID_0 = 0x56 --Inzektor
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--equip
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_IGNITION)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_EQUIP)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetCountLimit(1)
  	e1:SetTarget(s.eqtg)
  	e1:SetOperation(s.eqop)
  	c:RegisterEffect(e1)
  	--equip effect
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_EQUIP)
  	e2:SetCode(EFFECT_UPDATE_ATTACK)
  	e2:SetValue(500)
  	c:RegisterEffect(e2)
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_EQUIP)
  	e3:SetCode(EFFECT_UPDATE_DEFENSE)
  	e3:SetValue(100)
  	c:RegisterEffect(e3)
  	local e4 = Effect.CreateEffect(c)
  	e4:SetType(EFFECT_TYPE_EQUIP)
  	e4:SetCode(EFFECT_UPDATE_LEVEL)
  	e4:SetValue(2)
  	c:RegisterEffect(e4)
  	--lvup
  	local e5 = Effect.CreateEffect(c)
  	e5:SetDescription(aux.Stringid(id, 1))
  	e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e5:SetType(EFFECT_TYPE_IGNITION)
  	e5:SetRange(LOCATION_SZONE)
  	e5:SetCost(s.lvcost)
  	e5:SetTarget(s.lvtg)
  	e5:SetOperation(s.lvop)
  	c:RegisterEffect(e5)
  end
  function s.filter(c)
  	return c:IsSetCard(SETCARD_ID_0) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
  end
  function s.eqtg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.GetLocationCount(tp, LOCATION_SZONE) > 0 and Duel.IsExistingMatchingCard(s.filter, tp, LOCATION_GRAVE + LOCATION_HAND, 0, 1, nil)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_LEAVE_GRAVE, nil, 1, tp, LOCATION_GRAVE + LOCATION_HAND)
  end
  function s.eqop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	if Duel.GetLocationCount(tp, LOCATION_SZONE) <= 0 then
  		return
  	end
  	if c:IsFacedown() or not c:IsRelateToEffect(e) then
  		return
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_EQUIP)
  	local g = Duel.SelectMatchingCard(tp, aux.NecroValleyFilter(s.filter), tp, LOCATION_GRAVE + LOCATION_HAND, 0, 1, 1, nil)
  	local tc = g:GetFirst()
  	if tc then
  		if not Duel.Equip(tp, tc, c) then
  			return
  		end
  		local e1 = Effect.CreateEffect(c)
  		e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetCode(EFFECT_EQUIP_LIMIT)
  		e1:SetReset(RESET_EVENT + RESETS_STANDARD)
  		e1:SetValue(s.eqlimit)
  		tc:RegisterEffect(e1)
  	end
  end
  function s.eqlimit(e, c)
  	return e:GetOwner() == c
  end
  function s.lvcost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return e:GetHandler():IsAbleToGraveAsCost()
  	end
  	Duel.SendtoGrave(e:GetHandler(), REASON_COST)
  end
  function s.lvfilter(c)
  	return c:IsFaceup() and c:IsLevelAbove(0)
  end
  function s.lvtg(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.lvfilter(chkc)
  	end
  	if chk == 0 then
  		return e:GetHandler():GetEquipTarget() and Duel.IsExistingTarget(s.lvfilter, tp, LOCATION_MZONE, 0, 1, nil)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_FACEUP)
  	Duel.SelectTarget(tp, s.lvfilter, tp, LOCATION_MZONE, 0, 1, 1, nil)
  end
  function s.lvop(e, tp, eg, ep, ev, re, r, rp)
  	local tc = Duel.GetFirstTarget()
  	if tc:IsRelateToEffect(e) and tc:IsFaceup() then
  		local opt = Duel.SelectOption(tp, aux.Stringid(id, 2), aux.Stringid(id, 3))
  		local e1 = Effect.CreateEffect(e:GetHandler())
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetCode(EFFECT_UPDATE_LEVEL)
  		e1:SetValue(opt + 1)
  		e1:SetReset(RESET_EVENT + RESETS_STANDARD)
  		tc:RegisterEffect(e1)
  	end
  end
  
  