name: Speedroid
card_text: Cannot be used as Synchro Material except for a Synchro Summon by its own effect. During your Main Phase, if this card is Normal or Special Summoned: You can target 1 face-up monster your opponent controls; immediately after this effect resolves, Synchro Summon 1 WIND Synchro Monster using only this card you control and that monster. You can only use this effect of "Speedroid Maliciousmagnet" once per turn.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--cannot be synchro
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
  	e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
  	e1:SetCondition(s.smcon)
  	e1:SetValue(1)
  	c:RegisterEffect(e1)
  	--synchro summon
  	local e2 = Effect.CreateEffect(c)
  	e2:SetDescription(aux.Stringid(id, 1))
  	e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
  	e2:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e2:SetCode(EVENT_SUMMON_SUCCESS)
  	e2:SetProperty(EFFECT_FLAG_CARD_TARGET + EFFECT_FLAG_DELAY)
  	e2:SetCountLimit(1, id)
  	e2:SetCondition(s.spcon)
  	e2:SetTarget(s.sptg)
  	e2:SetOperation(s.spop)
  	c:RegisterEffect(e2)
  	local e3 = e2:Clone()
  	e3:SetCode(EVENT_SPSUMMON_SUCCESS)
  	c:RegisterEffect(e3)
  end
  function s.smcon(e)
  	return e:GetHandler():GetFlagEffect(id) == 0
  end
  function s.spcon(e, tp, eg, ep, ev, re, r, rp)
  	return Duel.GetTurnPlayer() == tp and bit.band(Duel.GetCurrentPhase(), PHASE_MAIN1 + PHASE_MAIN2) > 0
  end
  function s.filter(tc, c, tp)
  	if tc:IsFacedown() or not tc:IsCanBeSynchroMaterial() then
  		return false
  	end
  	c:RegisterFlagEffect(id, 0, 0, 1)
  	local mg = Group.FromCards(c, tc)
  	local res = Duel.IsExistingMatchingCard(s.synfilter, tp, LOCATION_EXTRA, 0, 1, nil, mg)
  	c:ResetFlagEffect(id)
  	return res
  end
  function s.synfilter(c, mg)
  	return c:IsAttribute(ATTRIBUTE_WIND) and c:IsSynchroSummonable(nil, mg)
  end
  function s.sptg(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, e:GetHandler(), tp)
  	end
  	if chk == 0 then
  		return Duel.IsExistingTarget(s.filter, tp, 0, LOCATION_MZONE, 1, nil, e:GetHandler(), tp)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_FACEUP)
  	Duel.SelectTarget(tp, s.filter, tp, 0, LOCATION_MZONE, 1, 1, nil, e:GetHandler(), tp)
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, LOCATION_EXTRA)
  end
  function s.spop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	local tc = Duel.GetFirstTarget()
  	if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
  		c:RegisterFlagEffect(id, RESET_EVENT + RESETS_STANDARD, 0, 1)
  		local mg = Group.FromCards(c, tc)
  		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
  		local g = Duel.SelectMatchingCard(tp, s.synfilter, tp, LOCATION_EXTRA, 0, 1, 1, nil, mg)
  		local sc = g:GetFirst()
  		if sc then
  			Duel.SynchroSummon(tp, sc, nil, mg)
  		else
  			c:ResetFlagEffect(id)
  		end
  	end
  end
  
  
source_text: Speedroid
  Cannot be used as Synchro Material except for a Synchro Summon by its own effect. During your Main Phase, if this card is Normal or Special Summoned: You can target 1 face-up monster your opponent controls; immediately after this effect resolves, Synchro Summon 1 WIND Synchro Monster using only this card you control and that monster. You can only use this effect of "Speedroid Maliciousmagnet" once per turn.
target_text: -- Speedroid
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--cannot be synchro
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
  	e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
  	e1:SetCondition(s.smcon)
  	e1:SetValue(1)
  	c:RegisterEffect(e1)
  	--synchro summon
  	local e2 = Effect.CreateEffect(c)
  	e2:SetDescription(aux.Stringid(id, 1))
  	e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
  	e2:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e2:SetCode(EVENT_SUMMON_SUCCESS)
  	e2:SetProperty(EFFECT_FLAG_CARD_TARGET + EFFECT_FLAG_DELAY)
  	e2:SetCountLimit(1, id)
  	e2:SetCondition(s.spcon)
  	e2:SetTarget(s.sptg)
  	e2:SetOperation(s.spop)
  	c:RegisterEffect(e2)
  	local e3 = e2:Clone()
  	e3:SetCode(EVENT_SPSUMMON_SUCCESS)
  	c:RegisterEffect(e3)
  end
  function s.smcon(e)
  	return e:GetHandler():GetFlagEffect(id) == 0
  end
  function s.spcon(e, tp, eg, ep, ev, re, r, rp)
  	return Duel.GetTurnPlayer() == tp and bit.band(Duel.GetCurrentPhase(), PHASE_MAIN1 + PHASE_MAIN2) > 0
  end
  function s.filter(tc, c, tp)
  	if tc:IsFacedown() or not tc:IsCanBeSynchroMaterial() then
  		return false
  	end
  	c:RegisterFlagEffect(id, 0, 0, 1)
  	local mg = Group.FromCards(c, tc)
  	local res = Duel.IsExistingMatchingCard(s.synfilter, tp, LOCATION_EXTRA, 0, 1, nil, mg)
  	c:ResetFlagEffect(id)
  	return res
  end
  function s.synfilter(c, mg)
  	return c:IsAttribute(ATTRIBUTE_WIND) and c:IsSynchroSummonable(nil, mg)
  end
  function s.sptg(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, e:GetHandler(), tp)
  	end
  	if chk == 0 then
  		return Duel.IsExistingTarget(s.filter, tp, 0, LOCATION_MZONE, 1, nil, e:GetHandler(), tp)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_FACEUP)
  	Duel.SelectTarget(tp, s.filter, tp, 0, LOCATION_MZONE, 1, 1, nil, e:GetHandler(), tp)
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, LOCATION_EXTRA)
  end
  function s.spop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	local tc = Duel.GetFirstTarget()
  	if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
  		c:RegisterFlagEffect(id, RESET_EVENT + RESETS_STANDARD, 0, 1)
  		local mg = Group.FromCards(c, tc)
  		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
  		local g = Duel.SelectMatchingCard(tp, s.synfilter, tp, LOCATION_EXTRA, 0, 1, 1, nil, mg)
  		local sc = g:GetFirst()
  		if sc then
  			Duel.SynchroSummon(tp, sc, nil, mg)
  		else
  			c:ResetFlagEffect(id)
  		end
  	end
  end
  
  