name: Number
card_text: 2+ Level 10 monsters
  When a monster is destroyed by battle and sent to the GY: You can detach 1 material from this card, then target that monster; Special Summon it to your field in Defense Position. You can target 1 other face-up Special Summoned monster you control; gain LP equal to its original ATK. You can only use each effect of "Number XX: Utopic Dark Infinity" once per turn.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--xyz summon
  	aux.AddXyzProcedure(c, nil, 10, 2, nil, nil, 99)
  	c:EnableReviveLimit()
  	--spsummon
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
  	e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O)
  	e1:SetCode(EVENT_BATTLE_DESTROYED)
  	e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetCountLimit(1, id)
  	e1:SetCost(s.cost)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  	--recover
  	local e2 = Effect.CreateEffect(c)
  	e2:SetDescription(aux.Stringid(id, 1))
  	e2:SetCategory(CATEGORY_RECOVER)
  	e2:SetType(EFFECT_TYPE_IGNITION)
  	e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetCountLimit(1, id + 1)
  	e2:SetTarget(s.rectg)
  	e2:SetOperation(s.recop)
  	c:RegisterEffect(e2)
  end
  function s.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 s.filter(c, e, tp)
  	return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e, 0, tp, false, false, POS_FACEUP_DEFENSE)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		local g = eg:Filter(s.filter, nil, e, tp)
  		e:SetLabelObject(g:GetFirst())
  		return g:GetCount() ~= 0
  	end
  	Duel.SetTargetCard(e:GetLabelObject())
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, e:GetLabelObject(), 1, 0, 0)
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	local tc = Duel.GetFirstTarget()
  	if tc:IsRelateToEffect(e) then
  		Duel.SpecialSummon(tc, 0, tp, tp, false, false, POS_FACEUP_DEFENSE)
  	end
  end
  function s.recfilter(c)
  	return c:IsFaceup() and c:GetBaseAttack() > 0 and c:IsSummonType(SUMMON_TYPE_SPECIAL)
  end
  function s.rectg(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	local c = e:GetHandler()
  	if chkc then
  		return chkc ~= c and chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.recfilter(chkc)
  	end
  	if chk == 0 then
  		return Duel.IsExistingTarget(s.recfilter, tp, LOCATION_MZONE, 0, 1, c)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TARGET)
  	local g = Duel.SelectTarget(tp, s.recfilter, tp, LOCATION_MZONE, 0, 1, 1, c)
  	Duel.SetOperationInfo(0, CATEGORY_RECOVER, nil, 0, tp, g:GetFirst():GetBaseAttack())
  end
  function s.recop(e, tp, eg, ep, ev, re, r, rp)
  	local tc = Duel.GetFirstTarget()
  	if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetBaseAttack() > 0 then
  		Duel.Recover(tp, tc:GetBaseAttack(), REASON_EFFECT)
  	end
  end
  
  
source_text: Number
  2+ Level 10 monsters
  When a monster is destroyed by battle and sent to the GY: You can detach 1 material from this card, then target that monster; Special Summon it to your field in Defense Position. You can target 1 other face-up Special Summoned monster you control; gain LP equal to its original ATK. You can only use each effect of "Number XX: Utopic Dark Infinity" once per turn.
target_text: -- Number
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--xyz summon
  	aux.AddXyzProcedure(c, nil, 10, 2, nil, nil, 99)
  	c:EnableReviveLimit()
  	--spsummon
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
  	e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O)
  	e1:SetCode(EVENT_BATTLE_DESTROYED)
  	e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetCountLimit(1, id)
  	e1:SetCost(s.cost)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  	--recover
  	local e2 = Effect.CreateEffect(c)
  	e2:SetDescription(aux.Stringid(id, 1))
  	e2:SetCategory(CATEGORY_RECOVER)
  	e2:SetType(EFFECT_TYPE_IGNITION)
  	e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetCountLimit(1, id + 1)
  	e2:SetTarget(s.rectg)
  	e2:SetOperation(s.recop)
  	c:RegisterEffect(e2)
  end
  function s.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 s.filter(c, e, tp)
  	return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e, 0, tp, false, false, POS_FACEUP_DEFENSE)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		local g = eg:Filter(s.filter, nil, e, tp)
  		e:SetLabelObject(g:GetFirst())
  		return g:GetCount() ~= 0
  	end
  	Duel.SetTargetCard(e:GetLabelObject())
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, e:GetLabelObject(), 1, 0, 0)
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	local tc = Duel.GetFirstTarget()
  	if tc:IsRelateToEffect(e) then
  		Duel.SpecialSummon(tc, 0, tp, tp, false, false, POS_FACEUP_DEFENSE)
  	end
  end
  function s.recfilter(c)
  	return c:IsFaceup() and c:GetBaseAttack() > 0 and c:IsSummonType(SUMMON_TYPE_SPECIAL)
  end
  function s.rectg(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	local c = e:GetHandler()
  	if chkc then
  		return chkc ~= c and chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.recfilter(chkc)
  	end
  	if chk == 0 then
  		return Duel.IsExistingTarget(s.recfilter, tp, LOCATION_MZONE, 0, 1, c)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TARGET)
  	local g = Duel.SelectTarget(tp, s.recfilter, tp, LOCATION_MZONE, 0, 1, 1, c)
  	Duel.SetOperationInfo(0, CATEGORY_RECOVER, nil, 0, tp, g:GetFirst():GetBaseAttack())
  end
  function s.recop(e, tp, eg, ep, ev, re, r, rp)
  	local tc = Duel.GetFirstTarget()
  	if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetBaseAttack() > 0 then
  		Duel.Recover(tp, tc:GetBaseAttack(), REASON_EFFECT)
  	end
  end
  
  