name: Rebirth
card_text: This card can be used to Ritual Summon any "Nephthys" 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. Then, if you Tributed "Devotee of Nephthys" or "Cerulean Sacred Phoenix of Nephthys", you can destroy 1 card on the field.
external_ids: local CARD_ID_0 = 24175232 --Cerulean Sacred Phoenix of Nephthys
  local CARD_ID_1 = 88176533 --Devotee of Nephthys
  local SETCARD_ID_0 = 0x11f --Nephthys
  
lua: local CARD_ID_0 = 24175232 --Cerulean Sacred Phoenix of Nephthys
  local CARD_ID_1 = 88176533 --Devotee of Nephthys
  local SETCARD_ID_0 = 0x11f --Nephthys
  local s, id, o = GetID()
  function s.initial_effect(c)
  	aux.AddCodeList(c, CARD_ID_1, CARD_ID_0)
  	aux.AddRitualProcGreater2(c, s.filter, LOCATION_HAND, nil, nil, false, s.extraop)
  end
  function s.filter(c, e, tp)
  	return c:IsSetCard(SETCARD_ID_0)
  end
  function s.mfilter(c)
  	if c:IsPreviousLocation(LOCATION_MZONE) then
  		local code, code2 = c:GetPreviousCodeOnField()
  		return code == CARD_ID_1 or code == CARD_ID_0 or code2 == CARD_ID_1 or code2 == CARD_ID_0
  	end
  	return c:IsCode(CARD_ID_1, CARD_ID_0)
  end
  function s.extraop(e, tp, eg, ep, ev, re, r, rp, tc, mat)
  	if not tc then
  		return
  	end
  	local g = Duel.GetMatchingGroup(aux.TRUE, tp, LOCATION_ONFIELD, LOCATION_ONFIELD, e:GetHandler())
  	if mat:IsExists(s.mfilter, 1, nil) and #g > 0 and Duel.SelectYesNo(tp, aux.Stringid(id, 0)) then
  		Duel.BreakEffect()
  		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_DESTROY)
  		local sg = g:Select(tp, 1, 1, e:GetHandler())
  		Duel.Destroy(sg, REASON_EFFECT)
  	end
  end
  
  
source_text: Rebirth
  This card can be used to Ritual Summon any "Nephthys" 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. Then, if you Tributed "Devotee of Nephthys" or "Cerulean Sacred Phoenix of Nephthys", you can destroy 1 card on the field.
target_text: -- Rebirth
  local CARD_ID_0 = 24175232 --Cerulean Sacred Phoenix of Nephthys
  local CARD_ID_1 = 88176533 --Devotee of Nephthys
  local SETCARD_ID_0 = 0x11f --Nephthys
  local s, id, o = GetID()
  function s.initial_effect(c)
  	aux.AddCodeList(c, CARD_ID_1, CARD_ID_0)
  	aux.AddRitualProcGreater2(c, s.filter, LOCATION_HAND, nil, nil, false, s.extraop)
  end
  function s.filter(c, e, tp)
  	return c:IsSetCard(SETCARD_ID_0)
  end
  function s.mfilter(c)
  	if c:IsPreviousLocation(LOCATION_MZONE) then
  		local code, code2 = c:GetPreviousCodeOnField()
  		return code == CARD_ID_1 or code == CARD_ID_0 or code2 == CARD_ID_1 or code2 == CARD_ID_0
  	end
  	return c:IsCode(CARD_ID_1, CARD_ID_0)
  end
  function s.extraop(e, tp, eg, ep, ev, re, r, rp, tc, mat)
  	if not tc then
  		return
  	end
  	local g = Duel.GetMatchingGroup(aux.TRUE, tp, LOCATION_ONFIELD, LOCATION_ONFIELD, e:GetHandler())
  	if mat:IsExists(s.mfilter, 1, nil) and #g > 0 and Duel.SelectYesNo(tp, aux.Stringid(id, 0)) then
  		Duel.BreakEffect()
  		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_DESTROY)
  		local sg = g:Select(tp, 1, 1, e:GetHandler())
  		Duel.Destroy(sg, REASON_EFFECT)
  	end
  end
  
  