name: Machine
card_text: This card can be used to Ritual Summon any "Cyber Angel" Ritual Monster. You must also Tribute monsters from your hand or field whose total Levels equal or exceed the Level of the Ritual Monster you Ritual Summon. If a LIGHT monster(s) you control would be destroyed by battle or card effect while this card is in your GY, you can banish this card instead.
external_ids: local SETCARD_ID_0 = 0x2093 --Cyber
  
lua: local SETCARD_ID_0 = 0x2093 --Cyber
  local s, id, o = GetID()
  function s.initial_effect(c)
  	aux.AddRitualProcGreater2(c, s.ritual_filter)
  	--destroy replace
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  	e2:SetCode(EFFECT_DESTROY_REPLACE)
  	e2:SetRange(LOCATION_GRAVE)
  	e2:SetTarget(s.reptg)
  	e2:SetValue(s.repval)
  	e2:SetOperation(s.repop)
  	c:RegisterEffect(e2)
  end
  function s.ritual_filter(c)
  	return c:IsSetCard(SETCARD_ID_0)
  end
  function s.repfilter(c, tp)
  	return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsReason(REASON_EFFECT + REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
  end
  function s.reptg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return e:GetHandler():IsAbleToRemove() and eg:IsExists(s.repfilter, 1, nil, tp)
  	end
  	return Duel.SelectEffectYesNo(tp, e:GetHandler(), 96)
  end
  function s.repval(e, c)
  	return s.repfilter(c, e:GetHandlerPlayer())
  end
  function s.repop(e, tp, eg, ep, ev, re, r, rp)
  	Duel.Remove(e:GetHandler(), POS_FACEUP, REASON_EFFECT)
  end
  
  
source_text: Machine
  This card can be used to Ritual Summon any "Cyber Angel" Ritual Monster. You must also Tribute monsters from your hand or field whose total Levels equal or exceed the Level of the Ritual Monster you Ritual Summon. If a LIGHT monster(s) you control would be destroyed by battle or card effect while this card is in your GY, you can banish this card instead.
target_text: -- Machine
  local SETCARD_ID_0 = 0x2093 --Cyber
  local s, id, o = GetID()
  function s.initial_effect(c)
  	aux.AddRitualProcGreater2(c, s.ritual_filter)
  	--destroy replace
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  	e2:SetCode(EFFECT_DESTROY_REPLACE)
  	e2:SetRange(LOCATION_GRAVE)
  	e2:SetTarget(s.reptg)
  	e2:SetValue(s.repval)
  	e2:SetOperation(s.repop)
  	c:RegisterEffect(e2)
  end
  function s.ritual_filter(c)
  	return c:IsSetCard(SETCARD_ID_0)
  end
  function s.repfilter(c, tp)
  	return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsReason(REASON_EFFECT + REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
  end
  function s.reptg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return e:GetHandler():IsAbleToRemove() and eg:IsExists(s.repfilter, 1, nil, tp)
  	end
  	return Duel.SelectEffectYesNo(tp, e:GetHandler(), 96)
  end
  function s.repval(e, c)
  	return s.repfilter(c, e:GetHandlerPlayer())
  end
  function s.repop(e, tp, eg, ep, ev, re, r, rp)
  	Duel.Remove(e:GetHandler(), POS_FACEUP, REASON_EFFECT)
  end
  
  