name: Reptilianne
card_text: If you control a DARK Reptile monster: You can Special Summon this card from your hand, then, if your opponent controls any monsters with 0 ATK, you can Special Summon up to an equal number of "Reptilianne" monsters from your hand. You can only use this effect of "Reptilianne Coatl" once per turn. If this card you control would be used as Synchro Material for a Reptile monster, you can treat it as a non-Tuner.
external_ids: local CARD_ID_0 = 59822133 --Blue-Eyes Spirit Dragon
  local SETCARD_ID_0 = 0x3c --Reptilianne
  
lua: local CARD_ID_0 = 59822133 --Blue-Eyes Spirit Dragon
  local SETCARD_ID_0 = 0x3c --Reptilianne
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--spsummon
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
  	e1:SetType(EFFECT_TYPE_IGNITION)
  	e1:SetRange(LOCATION_HAND)
  	e1:SetCountLimit(1, id)
  	e1:SetCondition(s.spcon)
  	e1:SetTarget(s.sptg)
  	e1:SetOperation(s.spop)
  	c:RegisterEffect(e1)
  	--nontuner
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_SINGLE)
  	e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetCode(EFFECT_NONTUNER)
  	e2:SetValue(s.ntval)
  	c:RegisterEffect(e2)
  end
  function s.cfilter(c)
  	return c:IsFaceup() and c:IsRace(RACE_REPTILE) and c:IsAttribute(ATTRIBUTE_DARK)
  end
  function s.spcon(e, tp, eg, ep, ev, re, r, rp)
  	return Duel.IsExistingMatchingCard(s.cfilter, tp, LOCATION_MZONE, 0, 1, nil)
  end
  function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk)
  	local c = e:GetHandler()
  	if chk == 0 then
  		return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and c:IsCanBeSpecialSummoned(e, 0, tp, false, false)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, c, 1, 0, 0)
  end
  function s.cgfilter(c)
  	return c:IsFaceup() and c:IsAttack(0)
  end
  function s.spfilter(c, e, tp)
  	return c:IsSetCard(SETCARD_ID_0) and c:IsCanBeSpecialSummoned(e, 0, tp, false, false)
  end
  function s.spop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	if c:IsRelateToEffect(e) and Duel.SpecialSummon(c, 0, tp, tp, false, false, POS_FACEUP) ~= 0 then
  		local cg = Duel.GetMatchingGroup(s.cgfilter, tp, 0, LOCATION_MZONE, nil)
  		local ct = math.min(#cg, (Duel.GetLocationCount(tp, LOCATION_MZONE)))
  		if ct > 1 and Duel.IsPlayerAffectedByEffect(tp, CARD_ID_0) then
  			ct = 1
  		end
  		local g = Duel.GetMatchingGroup(s.spfilter, tp, LOCATION_HAND, 0, nil, e, tp)
  		if g:GetCount() > 0 and ct > 0 and Duel.SelectYesNo(tp, aux.Stringid(id, 1)) then
  			Duel.BreakEffect()
  			Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
  			local sg = g:Select(tp, 1, ct, nil)
  			Duel.SpecialSummon(sg, 0, tp, tp, false, false, POS_FACEUP)
  		end
  	end
  end
  function s.ntval(e, c)
  	return e:GetHandler():IsControler(c:GetControler()) and c:IsRace(RACE_REPTILE)
  end
  
  
source_text: Reptilianne
  If you control a DARK Reptile monster: You can Special Summon this card from your hand, then, if your opponent controls any monsters with 0 ATK, you can Special Summon up to an equal number of "Reptilianne" monsters from your hand. You can only use this effect of "Reptilianne Coatl" once per turn. If this card you control would be used as Synchro Material for a Reptile monster, you can treat it as a non-Tuner.
target_text: -- Reptilianne
  local CARD_ID_0 = 59822133 --Blue-Eyes Spirit Dragon
  local SETCARD_ID_0 = 0x3c --Reptilianne
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--spsummon
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
  	e1:SetType(EFFECT_TYPE_IGNITION)
  	e1:SetRange(LOCATION_HAND)
  	e1:SetCountLimit(1, id)
  	e1:SetCondition(s.spcon)
  	e1:SetTarget(s.sptg)
  	e1:SetOperation(s.spop)
  	c:RegisterEffect(e1)
  	--nontuner
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_SINGLE)
  	e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetCode(EFFECT_NONTUNER)
  	e2:SetValue(s.ntval)
  	c:RegisterEffect(e2)
  end
  function s.cfilter(c)
  	return c:IsFaceup() and c:IsRace(RACE_REPTILE) and c:IsAttribute(ATTRIBUTE_DARK)
  end
  function s.spcon(e, tp, eg, ep, ev, re, r, rp)
  	return Duel.IsExistingMatchingCard(s.cfilter, tp, LOCATION_MZONE, 0, 1, nil)
  end
  function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk)
  	local c = e:GetHandler()
  	if chk == 0 then
  		return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and c:IsCanBeSpecialSummoned(e, 0, tp, false, false)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, c, 1, 0, 0)
  end
  function s.cgfilter(c)
  	return c:IsFaceup() and c:IsAttack(0)
  end
  function s.spfilter(c, e, tp)
  	return c:IsSetCard(SETCARD_ID_0) and c:IsCanBeSpecialSummoned(e, 0, tp, false, false)
  end
  function s.spop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	if c:IsRelateToEffect(e) and Duel.SpecialSummon(c, 0, tp, tp, false, false, POS_FACEUP) ~= 0 then
  		local cg = Duel.GetMatchingGroup(s.cgfilter, tp, 0, LOCATION_MZONE, nil)
  		local ct = math.min(#cg, (Duel.GetLocationCount(tp, LOCATION_MZONE)))
  		if ct > 1 and Duel.IsPlayerAffectedByEffect(tp, CARD_ID_0) then
  			ct = 1
  		end
  		local g = Duel.GetMatchingGroup(s.spfilter, tp, LOCATION_HAND, 0, nil, e, tp)
  		if g:GetCount() > 0 and ct > 0 and Duel.SelectYesNo(tp, aux.Stringid(id, 1)) then
  			Duel.BreakEffect()
  			Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
  			local sg = g:Select(tp, 1, ct, nil)
  			Duel.SpecialSummon(sg, 0, tp, tp, false, false, POS_FACEUP)
  		end
  	end
  end
  function s.ntval(e, c)
  	return e:GetHandler():IsControler(c:GetControler()) and c:IsRace(RACE_REPTILE)
  end
  
  