name: Reprodocus
card_text: 2 monsters
  You can activate 1 of these effects.
  ● Declare 1 Monster Type; all face-up monsters this card points to become that Type until the end of this turn.
  ● Declare 1 Attribute; all face-up monsters this card points to become that Attribute until the end of this turn.
  You can only use this effect of "Reprodocus" once per turn.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--link summon
  	aux.AddLinkProcedure(c, nil, 2, 2)
  	c:EnableReviveLimit()
  	--
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetType(EFFECT_TYPE_IGNITION)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetCountLimit(1, id)
  	e1:SetTarget(s.ractg)
  	e1:SetOperation(s.racop)
  	c:RegisterEffect(e1)
  	local e2 = e1:Clone()
  	e2:SetDescription(aux.Stringid(id, 1))
  	e2:SetTarget(s.atttg)
  	e2:SetOperation(s.attop)
  	c:RegisterEffect(e2)
  end
  function s.filter(c, g)
  	return c:IsFaceup() and g:IsContains(c)
  end
  function s.ractg(e, tp, eg, ep, ev, re, r, rp, chk)
  	local lg = e:GetHandler():GetLinkedGroup()
  	if chk == 0 then
  		return Duel.IsExistingMatchingCard(s.filter, tp, LOCATION_MZONE, LOCATION_MZONE, 1, nil, lg)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_RACE)
  	local rac = Duel.AnnounceRace(tp, 1, RACE_ALL)
  	e:SetLabel(rac)
  end
  function s.racop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	if not c:IsRelateToEffect(e) then
  		return
  	end
  	local lg = c:GetLinkedGroup()
  	local g = Duel.GetMatchingGroup(s.filter, tp, LOCATION_MZONE, LOCATION_MZONE, nil, lg)
  	local tc = g:GetFirst()
  	while tc do
  		local e1 = Effect.CreateEffect(e:GetHandler())
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetCode(EFFECT_CHANGE_RACE)
  		e1:SetValue(e:GetLabel())
  		e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END)
  		tc:RegisterEffect(e1)
  		tc = g:GetNext()
  	end
  end
  function s.atttg(e, tp, eg, ep, ev, re, r, rp, chk)
  	local lg = e:GetHandler():GetLinkedGroup()
  	if chk == 0 then
  		return Duel.IsExistingMatchingCard(s.filter, tp, LOCATION_MZONE, LOCATION_MZONE, 1, nil, lg)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_ATTRIBUTE)
  	local att = Duel.AnnounceAttribute(tp, 1, ATTRIBUTE_ALL)
  	e:SetLabel(att)
  end
  function s.attop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	if not c:IsRelateToEffect(e) then
  		return
  	end
  	local lg = c:GetLinkedGroup()
  	local g = Duel.GetMatchingGroup(s.filter, tp, LOCATION_MZONE, LOCATION_MZONE, nil, lg)
  	local tc = g:GetFirst()
  	while tc do
  		local e1 = Effect.CreateEffect(e:GetHandler())
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
  		e1:SetValue(e:GetLabel())
  		e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END)
  		tc:RegisterEffect(e1)
  		tc = g:GetNext()
  	end
  end
  
  
source_text: Reprodocus
  2 monsters
  You can activate 1 of these effects.
  ● Declare 1 Monster Type; all face-up monsters this card points to become that Type until the end of this turn.
  ● Declare 1 Attribute; all face-up monsters this card points to become that Attribute until the end of this turn.
  You can only use this effect of "Reprodocus" once per turn.
target_text: -- Reprodocus
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--link summon
  	aux.AddLinkProcedure(c, nil, 2, 2)
  	c:EnableReviveLimit()
  	--
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetType(EFFECT_TYPE_IGNITION)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetCountLimit(1, id)
  	e1:SetTarget(s.ractg)
  	e1:SetOperation(s.racop)
  	c:RegisterEffect(e1)
  	local e2 = e1:Clone()
  	e2:SetDescription(aux.Stringid(id, 1))
  	e2:SetTarget(s.atttg)
  	e2:SetOperation(s.attop)
  	c:RegisterEffect(e2)
  end
  function s.filter(c, g)
  	return c:IsFaceup() and g:IsContains(c)
  end
  function s.ractg(e, tp, eg, ep, ev, re, r, rp, chk)
  	local lg = e:GetHandler():GetLinkedGroup()
  	if chk == 0 then
  		return Duel.IsExistingMatchingCard(s.filter, tp, LOCATION_MZONE, LOCATION_MZONE, 1, nil, lg)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_RACE)
  	local rac = Duel.AnnounceRace(tp, 1, RACE_ALL)
  	e:SetLabel(rac)
  end
  function s.racop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	if not c:IsRelateToEffect(e) then
  		return
  	end
  	local lg = c:GetLinkedGroup()
  	local g = Duel.GetMatchingGroup(s.filter, tp, LOCATION_MZONE, LOCATION_MZONE, nil, lg)
  	local tc = g:GetFirst()
  	while tc do
  		local e1 = Effect.CreateEffect(e:GetHandler())
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetCode(EFFECT_CHANGE_RACE)
  		e1:SetValue(e:GetLabel())
  		e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END)
  		tc:RegisterEffect(e1)
  		tc = g:GetNext()
  	end
  end
  function s.atttg(e, tp, eg, ep, ev, re, r, rp, chk)
  	local lg = e:GetHandler():GetLinkedGroup()
  	if chk == 0 then
  		return Duel.IsExistingMatchingCard(s.filter, tp, LOCATION_MZONE, LOCATION_MZONE, 1, nil, lg)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_ATTRIBUTE)
  	local att = Duel.AnnounceAttribute(tp, 1, ATTRIBUTE_ALL)
  	e:SetLabel(att)
  end
  function s.attop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	if not c:IsRelateToEffect(e) then
  		return
  	end
  	local lg = c:GetLinkedGroup()
  	local g = Duel.GetMatchingGroup(s.filter, tp, LOCATION_MZONE, LOCATION_MZONE, nil, lg)
  	local tc = g:GetFirst()
  	while tc do
  		local e1 = Effect.CreateEffect(e:GetHandler())
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
  		e1:SetValue(e:GetLabel())
  		e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END)
  		tc:RegisterEffect(e1)
  		tc = g:GetNext()
  	end
  end
  
  