name: Number
card_text: 3 Level 4 monsters
  Once per turn, you can activate 1 of these effects.
  ● Detach 3 Xyz Materials from this card; destroy all other face-up monsters on the field.
  ● Detach 5 Xyz Materials from this card; destroy all cards your opponent controls.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--xyz summon
  	aux.AddXyzProcedure(c, nil, 4, 3)
  	c:EnableReviveLimit()
  	--destroy1
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_DESTROY)
  	e1:SetType(EFFECT_TYPE_IGNITION)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetCountLimit(1, EFFECT_COUNT_CODE_SINGLE)
  	e1:SetCost(s.cost1)
  	e1:SetTarget(s.target1)
  	e1:SetOperation(s.operation1)
  	c:RegisterEffect(e1)
  	--destroy2
  	local e2 = Effect.CreateEffect(c)
  	e2:SetDescription(aux.Stringid(id, 1))
  	e2:SetCategory(CATEGORY_DESTROY)
  	e2:SetType(EFFECT_TYPE_IGNITION)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetCountLimit(1, EFFECT_COUNT_CODE_SINGLE)
  	e2:SetCost(s.cost2)
  	e2:SetTarget(s.target2)
  	e2:SetOperation(s.operation2)
  	c:RegisterEffect(e2)
  end
  aux.xyz_number[id] = 91
  function s.cost1(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return e:GetHandler():CheckRemoveOverlayCard(tp, 3, REASON_COST)
  	end
  	Duel.Hint(HINT_OPSELECTED, 1 - tp, e:GetDescription())
  	e:GetHandler():RemoveOverlayCard(tp, 3, 3, REASON_COST)
  end
  function s.filter1(c)
  	return c:IsFaceup()
  end
  function s.target1(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.IsExistingMatchingCard(s.filter1, tp, LOCATION_MZONE, LOCATION_MZONE, 1, e:GetHandler())
  	end
  	local g = Duel.GetMatchingGroup(s.filter1, tp, LOCATION_MZONE, LOCATION_MZONE, e:GetHandler())
  	Duel.SetOperationInfo(0, CATEGORY_DESTROY, g, g:GetCount(), 0, 0)
  end
  function s.operation1(e, tp, eg, ep, ev, re, r, rp)
  	local g = Duel.GetMatchingGroup(s.filter1, tp, LOCATION_MZONE, LOCATION_MZONE, aux.ExceptThisCard(e))
  	Duel.Destroy(g, REASON_EFFECT)
  end
  function s.cost2(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return e:GetHandler():CheckRemoveOverlayCard(tp, 5, REASON_COST)
  	end
  	Duel.Hint(HINT_OPSELECTED, 1 - tp, e:GetDescription())
  	e:GetHandler():RemoveOverlayCard(tp, 5, 5, REASON_COST)
  end
  function s.target2(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.IsExistingMatchingCard(aux.TRUE, tp, 0, LOCATION_ONFIELD, 1, nil)
  	end
  	local g = Duel.GetMatchingGroup(aux.TRUE, tp, 0, LOCATION_ONFIELD, nil)
  	Duel.SetOperationInfo(0, CATEGORY_DESTROY, g, g:GetCount(), 0, 0)
  end
  function s.operation2(e, tp, eg, ep, ev, re, r, rp)
  	local g = Duel.GetMatchingGroup(aux.TRUE, tp, 0, LOCATION_ONFIELD, nil)
  	Duel.Destroy(g, REASON_EFFECT)
  end
  
  
source_text: Number
  3 Level 4 monsters
  Once per turn, you can activate 1 of these effects.
  ● Detach 3 Xyz Materials from this card; destroy all other face-up monsters on the field.
  ● Detach 5 Xyz Materials from this card; destroy all cards your opponent controls.
target_text: -- Number
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--xyz summon
  	aux.AddXyzProcedure(c, nil, 4, 3)
  	c:EnableReviveLimit()
  	--destroy1
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_DESTROY)
  	e1:SetType(EFFECT_TYPE_IGNITION)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetCountLimit(1, EFFECT_COUNT_CODE_SINGLE)
  	e1:SetCost(s.cost1)
  	e1:SetTarget(s.target1)
  	e1:SetOperation(s.operation1)
  	c:RegisterEffect(e1)
  	--destroy2
  	local e2 = Effect.CreateEffect(c)
  	e2:SetDescription(aux.Stringid(id, 1))
  	e2:SetCategory(CATEGORY_DESTROY)
  	e2:SetType(EFFECT_TYPE_IGNITION)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetCountLimit(1, EFFECT_COUNT_CODE_SINGLE)
  	e2:SetCost(s.cost2)
  	e2:SetTarget(s.target2)
  	e2:SetOperation(s.operation2)
  	c:RegisterEffect(e2)
  end
  aux.xyz_number[id] = 91
  function s.cost1(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return e:GetHandler():CheckRemoveOverlayCard(tp, 3, REASON_COST)
  	end
  	Duel.Hint(HINT_OPSELECTED, 1 - tp, e:GetDescription())
  	e:GetHandler():RemoveOverlayCard(tp, 3, 3, REASON_COST)
  end
  function s.filter1(c)
  	return c:IsFaceup()
  end
  function s.target1(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.IsExistingMatchingCard(s.filter1, tp, LOCATION_MZONE, LOCATION_MZONE, 1, e:GetHandler())
  	end
  	local g = Duel.GetMatchingGroup(s.filter1, tp, LOCATION_MZONE, LOCATION_MZONE, e:GetHandler())
  	Duel.SetOperationInfo(0, CATEGORY_DESTROY, g, g:GetCount(), 0, 0)
  end
  function s.operation1(e, tp, eg, ep, ev, re, r, rp)
  	local g = Duel.GetMatchingGroup(s.filter1, tp, LOCATION_MZONE, LOCATION_MZONE, aux.ExceptThisCard(e))
  	Duel.Destroy(g, REASON_EFFECT)
  end
  function s.cost2(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return e:GetHandler():CheckRemoveOverlayCard(tp, 5, REASON_COST)
  	end
  	Duel.Hint(HINT_OPSELECTED, 1 - tp, e:GetDescription())
  	e:GetHandler():RemoveOverlayCard(tp, 5, 5, REASON_COST)
  end
  function s.target2(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.IsExistingMatchingCard(aux.TRUE, tp, 0, LOCATION_ONFIELD, 1, nil)
  	end
  	local g = Duel.GetMatchingGroup(aux.TRUE, tp, 0, LOCATION_ONFIELD, nil)
  	Duel.SetOperationInfo(0, CATEGORY_DESTROY, g, g:GetCount(), 0, 0)
  end
  function s.operation2(e, tp, eg, ep, ev, re, r, rp)
  	local g = Duel.GetMatchingGroup(aux.TRUE, tp, 0, LOCATION_ONFIELD, nil)
  	Duel.Destroy(g, REASON_EFFECT)
  end
  
  