name: Black
card_text: 1 Tuner + 1+ non-Tuner monsters
  If this card is Special Summoned, or a Level 5 or higher monster(s) is Special Summoned to your opponent's field: Target 1 Special Summoned monster your opponent controls; return that target to the hand. You can only use this effect of "Black Rose Moonlight Dragon" once per turn.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--synchro summon
  	aux.AddSynchroProcedure(c, nil, aux.NonTuner(nil), 1)
  	c:EnableReviveLimit()
  	--tohand
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_TOHAND)
  	e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_F)
  	e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e1:SetCode(EVENT_SPSUMMON_SUCCESS)
  	e1:SetCountLimit(1, id)
  	e1:SetTarget(s.thtg)
  	e1:SetOperation(s.thop)
  	c:RegisterEffect(e1)
  	local e2 = e1:Clone()
  	e2:SetDescription(aux.Stringid(id, 1))
  	e2:SetCode(EVENT_CUSTOM + id)
  	c:RegisterEffect(e2)
  	--event
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  	e3:SetCode(EVENT_SPSUMMON_SUCCESS)
  	e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
  	e3:SetRange(LOCATION_MZONE)
  	e3:SetCondition(s.evcon)
  	e3:SetOperation(s.evop)
  	c:RegisterEffect(e3)
  end
  function s.cfilter(c, tp)
  	return c:IsFaceup() and c:IsLevelAbove(5) and c:IsControler(tp)
  end
  function s.evcon(e, tp, eg, ep, ev, re, r, rp)
  	return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.cfilter, 1, nil, 1 - tp)
  end
  function s.evop(e, tp, eg, ep, ev, re, r, rp)
  	Duel.RaiseSingleEvent(e:GetHandler(), EVENT_CUSTOM + id, re, r, rp, ep, ev)
  end
  function s.filter(c)
  	return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsAbleToHand()
  end
  function s.thtg(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1 - tp) and s.filter(chkc)
  	end
  	if chk == 0 then
  		return true
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_RTOHAND)
  	local g = Duel.SelectTarget(tp, s.filter, tp, 0, LOCATION_MZONE, 1, 1, nil)
  	Duel.SetOperationInfo(0, CATEGORY_TOHAND, g, g:GetCount(), 0, 0)
  end
  function s.thop(e, tp, eg, ep, ev, re, r, rp)
  	local tc = Duel.GetFirstTarget()
  	if tc and tc:IsRelateToEffect(e) then
  		Duel.SendtoHand(tc, nil, REASON_EFFECT)
  	end
  end
  
  
source_text: Black
  1 Tuner + 1+ non-Tuner monsters
  If this card is Special Summoned, or a Level 5 or higher monster(s) is Special Summoned to your opponent's field: Target 1 Special Summoned monster your opponent controls; return that target to the hand. You can only use this effect of "Black Rose Moonlight Dragon" once per turn.
target_text: -- Black
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--synchro summon
  	aux.AddSynchroProcedure(c, nil, aux.NonTuner(nil), 1)
  	c:EnableReviveLimit()
  	--tohand
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_TOHAND)
  	e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_F)
  	e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
  	e1:SetCode(EVENT_SPSUMMON_SUCCESS)
  	e1:SetCountLimit(1, id)
  	e1:SetTarget(s.thtg)
  	e1:SetOperation(s.thop)
  	c:RegisterEffect(e1)
  	local e2 = e1:Clone()
  	e2:SetDescription(aux.Stringid(id, 1))
  	e2:SetCode(EVENT_CUSTOM + id)
  	c:RegisterEffect(e2)
  	--event
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  	e3:SetCode(EVENT_SPSUMMON_SUCCESS)
  	e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
  	e3:SetRange(LOCATION_MZONE)
  	e3:SetCondition(s.evcon)
  	e3:SetOperation(s.evop)
  	c:RegisterEffect(e3)
  end
  function s.cfilter(c, tp)
  	return c:IsFaceup() and c:IsLevelAbove(5) and c:IsControler(tp)
  end
  function s.evcon(e, tp, eg, ep, ev, re, r, rp)
  	return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.cfilter, 1, nil, 1 - tp)
  end
  function s.evop(e, tp, eg, ep, ev, re, r, rp)
  	Duel.RaiseSingleEvent(e:GetHandler(), EVENT_CUSTOM + id, re, r, rp, ep, ev)
  end
  function s.filter(c)
  	return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsAbleToHand()
  end
  function s.thtg(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
  	if chkc then
  		return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1 - tp) and s.filter(chkc)
  	end
  	if chk == 0 then
  		return true
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_RTOHAND)
  	local g = Duel.SelectTarget(tp, s.filter, tp, 0, LOCATION_MZONE, 1, 1, nil)
  	Duel.SetOperationInfo(0, CATEGORY_TOHAND, g, g:GetCount(), 0, 0)
  end
  function s.thop(e, tp, eg, ep, ev, re, r, rp)
  	local tc = Duel.GetFirstTarget()
  	if tc and tc:IsRelateToEffect(e) then
  		Duel.SendtoHand(tc, nil, REASON_EFFECT)
  	end
  end
  
  