name: Overlay
card_text: Once per turn: You can pay 600 Life Points; detach 1 Xyz Material from a monster on the field.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--detach
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetType(EFFECT_TYPE_IGNITION)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetCountLimit(1)
  	e1:SetCost(s.cost)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.operation)
  	c:RegisterEffect(e1)
  end
  function s.cost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.CheckLPCost(tp, 600)
  	end
  	Duel.PayLPCost(tp, 600)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.CheckRemoveOverlayCard(tp, 1, 1, 1, REASON_EFFECT)
  	end
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_DEATTACHFROM)
  	local sg = Duel.SelectMatchingCard(tp, Card.CheckRemoveOverlayCard, tp, LOCATION_MZONE, LOCATION_MZONE, 1, 1, nil, tp, 1, REASON_EFFECT)
  	if sg:GetCount() == 0 then
  		return
  	end
  	Duel.HintSelection(sg)
  	sg:GetFirst():RemoveOverlayCard(tp, 1, 1, REASON_EFFECT)
  end
  
  
source_text: Overlay
  Once per turn: You can pay 600 Life Points; detach 1 Xyz Material from a monster on the field.
target_text: -- Overlay
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--detach
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetType(EFFECT_TYPE_IGNITION)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetCountLimit(1)
  	e1:SetCost(s.cost)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.operation)
  	c:RegisterEffect(e1)
  end
  function s.cost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.CheckLPCost(tp, 600)
  	end
  	Duel.PayLPCost(tp, 600)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.CheckRemoveOverlayCard(tp, 1, 1, 1, REASON_EFFECT)
  	end
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_DEATTACHFROM)
  	local sg = Duel.SelectMatchingCard(tp, Card.CheckRemoveOverlayCard, tp, LOCATION_MZONE, LOCATION_MZONE, 1, 1, nil, tp, 1, REASON_EFFECT)
  	if sg:GetCount() == 0 then
  		return
  	end
  	Duel.HintSelection(sg)
  	sg:GetFirst():RemoveOverlayCard(tp, 1, 1, REASON_EFFECT)
  end
  
  