name: Steam
card_text: During your opponent's Main Phase, you can (Quick Effect): Immediately after this effect resolves, Synchro Summon using this card you control.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--synchro effect
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
  	e1:SetType(EFFECT_TYPE_QUICK_O)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetHintTiming(0, TIMINGS_CHECK_MONSTER + TIMING_MAIN_END)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetCondition(s.sccon)
  	e1:SetTarget(s.sctarg)
  	e1:SetOperation(s.scop)
  	c:RegisterEffect(e1)
  end
  function s.sccon(e, tp, eg, ep, ev, re, r, rp)
  	return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetTurnPlayer() ~= tp and (Duel.GetCurrentPhase() == PHASE_MAIN1 or Duel.GetCurrentPhase() == PHASE_MAIN2)
  end
  function s.sctarg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable, tp, LOCATION_EXTRA, 0, 1, nil, e:GetHandler())
  	end
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, LOCATION_EXTRA)
  end
  function s.scop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	if c:IsControler(1 - tp) or not c:IsRelateToEffect(e) or c:IsFacedown() then
  		return
  	end
  	local g = Duel.GetMatchingGroup(Card.IsSynchroSummonable, tp, LOCATION_EXTRA, 0, nil, c)
  	if g:GetCount() > 0 then
  		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
  		local sg = g:Select(tp, 1, 1, nil)
  		Duel.SynchroSummon(tp, sg:GetFirst(), c)
  	end
  end
  
  
source_text: Steam
  During your opponent's Main Phase, you can (Quick Effect): Immediately after this effect resolves, Synchro Summon using this card you control.
target_text: -- Steam
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--synchro effect
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
  	e1:SetType(EFFECT_TYPE_QUICK_O)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetHintTiming(0, TIMINGS_CHECK_MONSTER + TIMING_MAIN_END)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetCondition(s.sccon)
  	e1:SetTarget(s.sctarg)
  	e1:SetOperation(s.scop)
  	c:RegisterEffect(e1)
  end
  function s.sccon(e, tp, eg, ep, ev, re, r, rp)
  	return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetTurnPlayer() ~= tp and (Duel.GetCurrentPhase() == PHASE_MAIN1 or Duel.GetCurrentPhase() == PHASE_MAIN2)
  end
  function s.sctarg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable, tp, LOCATION_EXTRA, 0, 1, nil, e:GetHandler())
  	end
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, LOCATION_EXTRA)
  end
  function s.scop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	if c:IsControler(1 - tp) or not c:IsRelateToEffect(e) or c:IsFacedown() then
  		return
  	end
  	local g = Duel.GetMatchingGroup(Card.IsSynchroSummonable, tp, LOCATION_EXTRA, 0, nil, c)
  	if g:GetCount() > 0 then
  		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
  		local sg = g:Select(tp, 1, 1, nil)
  		Duel.SynchroSummon(tp, sg:GetFirst(), c)
  	end
  end
  
  