name: Vision
card_text: Fusion Summon 1 "HERO" Fusion Monster from your Extra Deck, using monsters from your hand or field as Fusion Material. You can also use up to 2 monsters in your Spell & Trap Zone that are treated as Continuous Traps as Fusion Material, by banishing them. You can only activate 1 "Vision Fusion" per turn.
external_ids: local SETCARD_ID_0 = 0x8 --HERO
  
lua: local SETCARD_ID_0 = 0x8 --HERO
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = FusionSpell.CreateSummonEffect(c, {
  		fusfilter = s.fusfilter,
  		pre_select_mat_location = LOCATION_HAND | LOCATION_MZONE | LOCATION_SZONE,
  		fusion_spell_matfilter = s.fusion_spell_matfilter,
  		mat_operation_code_map = {
  			{ [LOCATION_SZONE] = FusionSpell.FUSION_OPERATION_BANISH },
  			{ [0xff] = FusionSpell.FUSION_OPERATION_GRAVE },
  		},
  		additional_fcheck = s.fcheck,
  	})
  	e1:SetCountLimit(1, id + EFFECT_COUNT_CODE_OATH)
  	c:RegisterEffect(e1)
  end
  
  function s.fusfilter(c)
  	return c:IsSetCard(SETCARD_ID_0)
  end
  
  function s.fusion_spell_matfilter(c)
  	if c:IsLocation(LOCATION_SZONE) and not c:IsAllTypes(TYPE_CONTINUOUS | TYPE_TRAP) then
  		return false
  	end
  	return true
  end
  
  function s.fcheck(tp, mg, fc, mg_all)
  	local mg_szone = mg:Filter(function(c)
  		return c:IsLocation(LOCATION_SZONE)
  	end, nil)
  	--- no more than 2
  	if #mg_szone > 2 then
  		return false
  	end
  	return true
  end
  
  
source_text: Vision
  Fusion Summon 1 "HERO" Fusion Monster from your Extra Deck, using monsters from your hand or field as Fusion Material. You can also use up to 2 monsters in your Spell & Trap Zone that are treated as Continuous Traps as Fusion Material, by banishing them. You can only activate 1 "Vision Fusion" per turn.
target_text: -- Vision
  local SETCARD_ID_0 = 0x8 --HERO
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = FusionSpell.CreateSummonEffect(c, {
  		fusfilter = s.fusfilter,
  		pre_select_mat_location = LOCATION_HAND | LOCATION_MZONE | LOCATION_SZONE,
  		fusion_spell_matfilter = s.fusion_spell_matfilter,
  		mat_operation_code_map = {
  			{ [LOCATION_SZONE] = FusionSpell.FUSION_OPERATION_BANISH },
  			{ [0xff] = FusionSpell.FUSION_OPERATION_GRAVE },
  		},
  		additional_fcheck = s.fcheck,
  	})
  	e1:SetCountLimit(1, id + EFFECT_COUNT_CODE_OATH)
  	c:RegisterEffect(e1)
  end
  
  function s.fusfilter(c)
  	return c:IsSetCard(SETCARD_ID_0)
  end
  
  function s.fusion_spell_matfilter(c)
  	if c:IsLocation(LOCATION_SZONE) and not c:IsAllTypes(TYPE_CONTINUOUS | TYPE_TRAP) then
  		return false
  	end
  	return true
  end
  
  function s.fcheck(tp, mg, fc, mg_all)
  	local mg_szone = mg:Filter(function(c)
  		return c:IsLocation(LOCATION_SZONE)
  	end, nil)
  	--- no more than 2
  	if #mg_szone > 2 then
  		return false
  	end
  	return true
  end
  
  