name: Number
card_text: 2 Level 12 monsters
  You can also Xyz Summon this card by using a Rank 10 or 11 DARK Xyz Monster you control as material. (Transfer its materials to this card.) If Summoned this way, the following effect cannot be activated this turn. Once per turn: You can detach 2 materials from this card; banish as many Special Summoned monsters your opponent controls as possible, then attach 1 of those banished monsters to this card as material. If this face-up card on the field would be destroyed by battle or card effect, you can detach 1 material from this card instead.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--xyz summon
  	aux.AddXyzProcedure(c, nil, 12, 2, s.ovfilter, aux.Stringid(id, 0), 2, s.xyzop)
  	c:EnableReviveLimit()
  	--remove
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 1))
  	e1:SetCategory(CATEGORY_REMOVE)
  	e1:SetType(EFFECT_TYPE_IGNITION)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetCountLimit(1)
  	e1:SetCost(s.rmcost)
  	e1:SetTarget(s.rmtg)
  	e1:SetOperation(s.rmop)
  	c:RegisterEffect(e1)
  	--destroy replace
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_CONTINUOUS)
  	e2:SetCode(EFFECT_DESTROY_REPLACE)
  	e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetTarget(s.reptg)
  	c:RegisterEffect(e2)
  end
  aux.xyz_number[id] = 77
  function s.ovfilter(c)
  	return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_XYZ) and c:IsRank(10, 11)
  end
  function s.xyzop(e, tp, chk)
  	if chk == 0 then
  		return true
  	end
  	e:GetHandler():RegisterFlagEffect(id, RESET_EVENT + RESETS_STANDARD - RESET_TOFIELD + RESET_PHASE + PHASE_END, 0, 1)
  end
  function s.rmcost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return e:GetHandler():CheckRemoveOverlayCard(tp, 2, REASON_COST)
  	end
  	e:GetHandler():RemoveOverlayCard(tp, 2, 2, REASON_COST)
  end
  function s.rmfilter(c)
  	return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsAbleToRemove()
  end
  function s.rmtg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return e:GetHandler():GetFlagEffect(id) == 0 and Duel.IsExistingMatchingCard(s.rmfilter, tp, 0, LOCATION_MZONE, 1, nil)
  	end
  	local g = Duel.GetMatchingGroup(s.rmfilter, tp, 0, LOCATION_MZONE, nil)
  	Duel.SetOperationInfo(0, CATEGORY_REMOVE, g, g:GetCount(), 0, 0)
  end
  function s.matfilter(c)
  	return c:IsLocation(LOCATION_REMOVED) and c:IsCanOverlay()
  end
  function s.rmop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	local g = Duel.GetMatchingGroup(s.rmfilter, tp, 0, LOCATION_MZONE, nil)
  	if g:GetCount() > 0 then
  		Duel.Remove(g, POS_FACEUP, REASON_EFFECT)
  		local og = Duel.GetOperatedGroup():Filter(s.matfilter, nil)
  		if og:GetCount() > 0 and c:IsRelateToEffect(e) then
  			Duel.BreakEffect()
  			Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_XMATERIAL)
  			local sg = og:Select(tp, 1, 1, nil)
  			Duel.Overlay(c, sg)
  		end
  	end
  end
  function s.reptg(e, tp, eg, ep, ev, re, r, rp, chk)
  	local c = e:GetHandler()
  	if chk == 0 then
  		return c:IsReason(REASON_BATTLE + REASON_EFFECT) and not c:IsReason(REASON_REPLACE) and c:CheckRemoveOverlayCard(tp, 1, REASON_EFFECT)
  	end
  	if Duel.SelectEffectYesNo(tp, c, 96) then
  		c:RemoveOverlayCard(tp, 1, 1, REASON_EFFECT)
  		return true
  	else
  		return false
  	end
  end
  
  
source_text: Number
  2 Level 12 monsters
  You can also Xyz Summon this card by using a Rank 10 or 11 DARK Xyz Monster you control as material. (Transfer its materials to this card.) If Summoned this way, the following effect cannot be activated this turn. Once per turn: You can detach 2 materials from this card; banish as many Special Summoned monsters your opponent controls as possible, then attach 1 of those banished monsters to this card as material. If this face-up card on the field would be destroyed by battle or card effect, you can detach 1 material from this card instead.
target_text: -- Number
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--xyz summon
  	aux.AddXyzProcedure(c, nil, 12, 2, s.ovfilter, aux.Stringid(id, 0), 2, s.xyzop)
  	c:EnableReviveLimit()
  	--remove
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 1))
  	e1:SetCategory(CATEGORY_REMOVE)
  	e1:SetType(EFFECT_TYPE_IGNITION)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetCountLimit(1)
  	e1:SetCost(s.rmcost)
  	e1:SetTarget(s.rmtg)
  	e1:SetOperation(s.rmop)
  	c:RegisterEffect(e1)
  	--destroy replace
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_CONTINUOUS)
  	e2:SetCode(EFFECT_DESTROY_REPLACE)
  	e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetTarget(s.reptg)
  	c:RegisterEffect(e2)
  end
  aux.xyz_number[id] = 77
  function s.ovfilter(c)
  	return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_XYZ) and c:IsRank(10, 11)
  end
  function s.xyzop(e, tp, chk)
  	if chk == 0 then
  		return true
  	end
  	e:GetHandler():RegisterFlagEffect(id, RESET_EVENT + RESETS_STANDARD - RESET_TOFIELD + RESET_PHASE + PHASE_END, 0, 1)
  end
  function s.rmcost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return e:GetHandler():CheckRemoveOverlayCard(tp, 2, REASON_COST)
  	end
  	e:GetHandler():RemoveOverlayCard(tp, 2, 2, REASON_COST)
  end
  function s.rmfilter(c)
  	return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsAbleToRemove()
  end
  function s.rmtg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return e:GetHandler():GetFlagEffect(id) == 0 and Duel.IsExistingMatchingCard(s.rmfilter, tp, 0, LOCATION_MZONE, 1, nil)
  	end
  	local g = Duel.GetMatchingGroup(s.rmfilter, tp, 0, LOCATION_MZONE, nil)
  	Duel.SetOperationInfo(0, CATEGORY_REMOVE, g, g:GetCount(), 0, 0)
  end
  function s.matfilter(c)
  	return c:IsLocation(LOCATION_REMOVED) and c:IsCanOverlay()
  end
  function s.rmop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	local g = Duel.GetMatchingGroup(s.rmfilter, tp, 0, LOCATION_MZONE, nil)
  	if g:GetCount() > 0 then
  		Duel.Remove(g, POS_FACEUP, REASON_EFFECT)
  		local og = Duel.GetOperatedGroup():Filter(s.matfilter, nil)
  		if og:GetCount() > 0 and c:IsRelateToEffect(e) then
  			Duel.BreakEffect()
  			Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_XMATERIAL)
  			local sg = og:Select(tp, 1, 1, nil)
  			Duel.Overlay(c, sg)
  		end
  	end
  end
  function s.reptg(e, tp, eg, ep, ev, re, r, rp, chk)
  	local c = e:GetHandler()
  	if chk == 0 then
  		return c:IsReason(REASON_BATTLE + REASON_EFFECT) and not c:IsReason(REASON_REPLACE) and c:CheckRemoveOverlayCard(tp, 1, REASON_EFFECT)
  	end
  	if Duel.SelectEffectYesNo(tp, c, 96) then
  		c:RemoveOverlayCard(tp, 1, 1, REASON_EFFECT)
  		return true
  	else
  		return false
  	end
  end
  
  