name: Reptilianne
card_text: Banish 1 "Reptilianne" monster from your GY; Special Summon 2 "Reptilianne Tokens" (Reptile/EARTH/Level 1/ATK 0/DEF 0).
external_ids: local CARD_ID_0 = 59822133 --Blue-Eyes Spirit Dragon
  local CARD_ID_1 = 21179144 --Reptilianne Token
  local SETCARD_ID_0 = 0x3c --Reptilianne
  
lua: local CARD_ID_0 = 59822133 --Blue-Eyes Spirit Dragon
  local CARD_ID_1 = 21179144 --Reptilianne Token
  local SETCARD_ID_0 = 0x3c --Reptilianne
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetCost(s.cost)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  end
  function s.cfilter(c)
  	return c:IsSetCard(SETCARD_ID_0) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
  end
  function s.cost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.IsExistingMatchingCard(s.cfilter, tp, LOCATION_GRAVE, 0, 1, nil)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_REMOVE)
  	local g = Duel.SelectMatchingCard(tp, s.cfilter, tp, LOCATION_GRAVE, 0, 1, 1, nil)
  	Duel.Remove(g, POS_FACEUP, REASON_COST)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return not Duel.IsPlayerAffectedByEffect(tp, CARD_ID_0)
  			and Duel.GetLocationCount(tp, LOCATION_MZONE) > 1
  			and Duel.IsPlayerCanSpecialSummonMonster(tp, id + 1, SETCARD_ID_0, TYPES_TOKEN_MONSTER, 0, 0, 1, RACE_REPTILE, ATTRIBUTE_EARTH)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_TOKEN, nil, 2, 0, 0)
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 2, 0, 0)
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	if Duel.IsPlayerAffectedByEffect(tp, CARD_ID_0) then
  		return
  	end
  	if Duel.GetLocationCount(tp, LOCATION_MZONE) < 2 then
  		return
  	end
  	if not Duel.IsPlayerCanSpecialSummonMonster(tp, id + 1, SETCARD_ID_0, TYPES_TOKEN_MONSTER, 0, 0, 1, RACE_REPTILE, ATTRIBUTE_EARTH) then
  		return
  	end
  	for i = 1, 2 do
  		local token = Duel.CreateToken(tp, id + 1)
  		Duel.SpecialSummonStep(token, 0, tp, tp, false, false, POS_FACEUP)
  	end
  	Duel.SpecialSummonComplete()
  end
  
  
source_text: Reptilianne
  Banish 1 "Reptilianne" monster from your GY; Special Summon 2 "Reptilianne Tokens" (Reptile/EARTH/Level 1/ATK 0/DEF 0).
target_text: -- Reptilianne
  local CARD_ID_0 = 59822133 --Blue-Eyes Spirit Dragon
  local CARD_ID_1 = 21179144 --Reptilianne Token
  local SETCARD_ID_0 = 0x3c --Reptilianne
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetCost(s.cost)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  end
  function s.cfilter(c)
  	return c:IsSetCard(SETCARD_ID_0) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
  end
  function s.cost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.IsExistingMatchingCard(s.cfilter, tp, LOCATION_GRAVE, 0, 1, nil)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_REMOVE)
  	local g = Duel.SelectMatchingCard(tp, s.cfilter, tp, LOCATION_GRAVE, 0, 1, 1, nil)
  	Duel.Remove(g, POS_FACEUP, REASON_COST)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return not Duel.IsPlayerAffectedByEffect(tp, CARD_ID_0)
  			and Duel.GetLocationCount(tp, LOCATION_MZONE) > 1
  			and Duel.IsPlayerCanSpecialSummonMonster(tp, id + 1, SETCARD_ID_0, TYPES_TOKEN_MONSTER, 0, 0, 1, RACE_REPTILE, ATTRIBUTE_EARTH)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_TOKEN, nil, 2, 0, 0)
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 2, 0, 0)
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	if Duel.IsPlayerAffectedByEffect(tp, CARD_ID_0) then
  		return
  	end
  	if Duel.GetLocationCount(tp, LOCATION_MZONE) < 2 then
  		return
  	end
  	if not Duel.IsPlayerCanSpecialSummonMonster(tp, id + 1, SETCARD_ID_0, TYPES_TOKEN_MONSTER, 0, 0, 1, RACE_REPTILE, ATTRIBUTE_EARTH) then
  		return
  	end
  	for i = 1, 2 do
  		local token = Duel.CreateToken(tp, id + 1)
  		Duel.SpecialSummonStep(token, 0, tp, tp, false, false, POS_FACEUP)
  	end
  	Duel.SpecialSummonComplete()
  end
  
  