name: Fusion
card_text: This card can be used as a substitute for any 1 Fusion Material whose name is specifically listed on the Fusion Monster Card, but the other Fusion Material(s) must be correct. Cannot be used as Fusion Material otherwise. If this card is Special Summoned (except during the Damage Step): You can Fusion Summon 1 Fusion Monster from your Extra Deck, using monsters you control as Fusion Materials, including this card.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--fusion substitute
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_FUSION_SUBSTITUTE)
  	e1:SetCondition(s.subcon)
  	c:RegisterEffect(e1)
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_SINGLE)
  	e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
  	e2:SetCode(id)
  	c:RegisterEffect(e2)
  	--fusion summon
  	local e3 = FusionSpell.CreateSummonEffect(c, {
  		pre_select_mat_location = LOCATION_MZONE,
  		gc = s.gc,
  	})
  	e3:SetDescription(aux.Stringid(id, 0))
  	e3:SetCategory(CATEGORY_SPECIAL_SUMMON + CATEGORY_FUSION_SUMMON)
  	e3:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e3:SetProperty(EFFECT_FLAG_DELAY)
  	e3:SetCode(EVENT_SPSUMMON_SUCCESS)
  	e3:SetRange(LOCATION_MZONE)
  	e3:SetCondition(s.spcon)
  	c:RegisterEffect(e3)
  end
  
  function s.subcon(e)
  	return e:GetHandler():IsLocation(LOCATION_HAND + LOCATION_MZONE + LOCATION_GRAVE)
  end
  
  function s.spcon(e, tp, eg, ep, ev, re, r, rp)
  	local ph = Duel.GetCurrentPhase()
  	return ph ~= PHASE_DAMAGE and ph ~= PHASE_DAMAGE_CAL
  end
  
  function s.gc(e)
  	return e:GetHandler()
  end
  
  
source_text: Fusion
  This card can be used as a substitute for any 1 Fusion Material whose name is specifically listed on the Fusion Monster Card, but the other Fusion Material(s) must be correct. Cannot be used as Fusion Material otherwise. If this card is Special Summoned (except during the Damage Step): You can Fusion Summon 1 Fusion Monster from your Extra Deck, using monsters you control as Fusion Materials, including this card.
target_text: -- Fusion
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--fusion substitute
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_FUSION_SUBSTITUTE)
  	e1:SetCondition(s.subcon)
  	c:RegisterEffect(e1)
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_SINGLE)
  	e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
  	e2:SetCode(id)
  	c:RegisterEffect(e2)
  	--fusion summon
  	local e3 = FusionSpell.CreateSummonEffect(c, {
  		pre_select_mat_location = LOCATION_MZONE,
  		gc = s.gc,
  	})
  	e3:SetDescription(aux.Stringid(id, 0))
  	e3:SetCategory(CATEGORY_SPECIAL_SUMMON + CATEGORY_FUSION_SUMMON)
  	e3:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e3:SetProperty(EFFECT_FLAG_DELAY)
  	e3:SetCode(EVENT_SPSUMMON_SUCCESS)
  	e3:SetRange(LOCATION_MZONE)
  	e3:SetCondition(s.spcon)
  	c:RegisterEffect(e3)
  end
  
  function s.subcon(e)
  	return e:GetHandler():IsLocation(LOCATION_HAND + LOCATION_MZONE + LOCATION_GRAVE)
  end
  
  function s.spcon(e, tp, eg, ep, ev, re, r, rp)
  	local ph = Duel.GetCurrentPhase()
  	return ph ~= PHASE_DAMAGE and ph ~= PHASE_DAMAGE_CAL
  end
  
  function s.gc(e)
  	return e:GetHandler()
  end
  
  