name: Flash
card_text: Fusion Summon 1 Fusion Monster from your Extra Deck, using monsters you control as Fusion Material. Destroy it during the End Phase.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = FusionSpell.CreateSummonEffect(c, {
  		pre_select_mat_location = LOCATION_MZONE,
  		stage_x_operation = s.stage_x_operation,
  	})
  	e1:SetHintTiming(0, TIMINGS_CHECK_MONSTER + TIMING_END_PHASE)
  	c:RegisterEffect(e1)
  end
  
  function s.stage_x_operation(e, tc, tp, stage)
  	if stage == FusionSpell.STAGE_BEFORE_SUMMON_COMPLETE then
  		local fid = e:GetHandler():GetFieldID()
  		tc:RegisterFlagEffect(id, RESET_EVENT + RESETS_STANDARD, 0, 1, fid)
  		local e1 = Effect.CreateEffect(e:GetHandler())
  		e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  		e1:SetCode(EVENT_PHASE + PHASE_END)
  		e1:SetCountLimit(1)
  		e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
  		e1:SetLabel(fid)
  		e1:SetLabelObject(tc)
  		e1:SetCondition(s.descon)
  		e1:SetOperation(s.desop)
  		Duel.RegisterEffect(e1, tp)
  	end
  end
  
  function s.descon(e, tp, eg, ep, ev, re, r, rp)
  	local tc = e:GetLabelObject()
  	if tc:GetFlagEffectLabel(id) ~= e:GetLabel() then
  		e:Reset()
  		return false
  	else
  		return true
  	end
  end
  
  function s.desop(e, tp, eg, ep, ev, re, r, rp)
  	Duel.Hint(HINT_CARD, 0, id)
  	Duel.Destroy(e:GetLabelObject(), REASON_EFFECT)
  end
  
  
source_text: Flash
  Fusion Summon 1 Fusion Monster from your Extra Deck, using monsters you control as Fusion Material. Destroy it during the End Phase.
target_text: -- Flash
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = FusionSpell.CreateSummonEffect(c, {
  		pre_select_mat_location = LOCATION_MZONE,
  		stage_x_operation = s.stage_x_operation,
  	})
  	e1:SetHintTiming(0, TIMINGS_CHECK_MONSTER + TIMING_END_PHASE)
  	c:RegisterEffect(e1)
  end
  
  function s.stage_x_operation(e, tc, tp, stage)
  	if stage == FusionSpell.STAGE_BEFORE_SUMMON_COMPLETE then
  		local fid = e:GetHandler():GetFieldID()
  		tc:RegisterFlagEffect(id, RESET_EVENT + RESETS_STANDARD, 0, 1, fid)
  		local e1 = Effect.CreateEffect(e:GetHandler())
  		e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  		e1:SetCode(EVENT_PHASE + PHASE_END)
  		e1:SetCountLimit(1)
  		e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
  		e1:SetLabel(fid)
  		e1:SetLabelObject(tc)
  		e1:SetCondition(s.descon)
  		e1:SetOperation(s.desop)
  		Duel.RegisterEffect(e1, tp)
  	end
  end
  
  function s.descon(e, tp, eg, ep, ev, re, r, rp)
  	local tc = e:GetLabelObject()
  	if tc:GetFlagEffectLabel(id) ~= e:GetLabel() then
  		e:Reset()
  		return false
  	else
  		return true
  	end
  end
  
  function s.desop(e, tp, eg, ep, ev, re, r, rp)
  	Duel.Hint(HINT_CARD, 0, id)
  	Duel.Destroy(e:GetLabelObject(), REASON_EFFECT)
  end
  
  