name: Armored
card_text: Once per turn, you can either: Target 1 "Cyber Dragon" you control, or 1 Fusion Monster you control that lists "Cyber Dragon" as Fusion Material; equip this card to that target, OR: Unequip this card and Special Summon it. Once per turn, while equipped to a monster by this effect: You can target 1 face-up monster on the field; the equipped monster loses exactly 1000 ATK (even if this card leaves the field), and if it does, destroy that target. If the equipped monster would be destroyed by battle or card effect, destroy this card instead.
external_ids: local CARD_ID_0 = 70095154 --Cyber Dragon
  
lua: local CARD_ID_0 = 70095154 --Cyber Dragon
  local s, id, o = GetID()
  function s.initial_effect(c)
  	aux.EnableUnionAttribute(c, s.filter)
  	--destroy
  	local e5 = Effect.CreateEffect(c)
  	e5:SetDescription(aux.Stringid(id, 2))
  	e5:SetCategory(CATEGORY_DESTROY)
  	e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e5:SetType(EFFECT_TYPE_IGNITION)
  	e5:SetRange(LOCATION_SZONE)
  	e5:SetCountLimit(1)
  	e5:SetTarget(s.destg)
  	e5:SetOperation(s.desop)
  	c:RegisterEffect(e5)
  end
  function s.filter(c)
  	return c:IsCode(CARD_ID_0) or c:IsType(TYPE_FUSION) and aux.IsMaterialListCode(c, CARD_ID_0)
  end
  function s.desfilter(c)
  	return c:IsFaceup()
  end
  function s.destg(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsLocation(LOCATION_MZONE) and s.desfilter(chkc)
  	end
  	if chk == 0 then
  		return e:GetHandler():GetEquipTarget() and e:GetHandler():GetEquipTarget():GetAttack() >= 1000 and Duel.IsExistingTarget(s.desfilter, tp, LOCATION_MZONE, LOCATION_MZONE, 1, nil)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_DESTROY)
  	local g = Duel.SelectTarget(tp, s.desfilter, tp, LOCATION_MZONE, LOCATION_MZONE, 1, 1, nil)
  	Duel.SetOperationInfo(0, CATEGORY_DESTROY, g, 1, 0, 0)
  end
  function s.desop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	if not c:IsRelateToEffect(e) then
  		return
  	end
  	local ec = c:GetEquipTarget()
  	if ec:GetAttack() < 1000 then
  		return
  	end
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_UPDATE_ATTACK)
  	e1:SetValue(-1000)
  	e1:SetReset(RESET_EVENT + RESETS_STANDARD)
  	ec:RegisterEffect(e1)
  	local tc = Duel.GetFirstTarget()
  	if tc:IsRelateToEffect(e) and tc:IsFaceup() and not ec:IsHasEffect(EFFECT_REVERSE_UPDATE) then
  		Duel.Destroy(tc, REASON_EFFECT)
  	end
  end
  
  
source_text: Armored
  Once per turn, you can either: Target 1 "Cyber Dragon" you control, or 1 Fusion Monster you control that lists "Cyber Dragon" as Fusion Material; equip this card to that target, OR: Unequip this card and Special Summon it. Once per turn, while equipped to a monster by this effect: You can target 1 face-up monster on the field; the equipped monster loses exactly 1000 ATK (even if this card leaves the field), and if it does, destroy that target. If the equipped monster would be destroyed by battle or card effect, destroy this card instead.
target_text: -- Armored
  local CARD_ID_0 = 70095154 --Cyber Dragon
  local s, id, o = GetID()
  function s.initial_effect(c)
  	aux.EnableUnionAttribute(c, s.filter)
  	--destroy
  	local e5 = Effect.CreateEffect(c)
  	e5:SetDescription(aux.Stringid(id, 2))
  	e5:SetCategory(CATEGORY_DESTROY)
  	e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e5:SetType(EFFECT_TYPE_IGNITION)
  	e5:SetRange(LOCATION_SZONE)
  	e5:SetCountLimit(1)
  	e5:SetTarget(s.destg)
  	e5:SetOperation(s.desop)
  	c:RegisterEffect(e5)
  end
  function s.filter(c)
  	return c:IsCode(CARD_ID_0) or c:IsType(TYPE_FUSION) and aux.IsMaterialListCode(c, CARD_ID_0)
  end
  function s.desfilter(c)
  	return c:IsFaceup()
  end
  function s.destg(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsLocation(LOCATION_MZONE) and s.desfilter(chkc)
  	end
  	if chk == 0 then
  		return e:GetHandler():GetEquipTarget() and e:GetHandler():GetEquipTarget():GetAttack() >= 1000 and Duel.IsExistingTarget(s.desfilter, tp, LOCATION_MZONE, LOCATION_MZONE, 1, nil)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_DESTROY)
  	local g = Duel.SelectTarget(tp, s.desfilter, tp, LOCATION_MZONE, LOCATION_MZONE, 1, 1, nil)
  	Duel.SetOperationInfo(0, CATEGORY_DESTROY, g, 1, 0, 0)
  end
  function s.desop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	if not c:IsRelateToEffect(e) then
  		return
  	end
  	local ec = c:GetEquipTarget()
  	if ec:GetAttack() < 1000 then
  		return
  	end
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_UPDATE_ATTACK)
  	e1:SetValue(-1000)
  	e1:SetReset(RESET_EVENT + RESETS_STANDARD)
  	ec:RegisterEffect(e1)
  	local tc = Duel.GetFirstTarget()
  	if tc:IsRelateToEffect(e) and tc:IsFaceup() and not ec:IsHasEffect(EFFECT_REVERSE_UPDATE) then
  		Duel.Destroy(tc, REASON_EFFECT)
  	end
  end
  
  