name: Dimension
card_text: Banish from your hand, field, and/or GY, the Fusion Materials that are listed on a "Phantasm" Fusion Monster, then Special Summon that Fusion Monster from your Extra Deck, ignoring its Summoning conditions. You take no battle damage from attacks involving the monster Special Summoned by this effect. If you control "Uria, Lord of Searing Flames", "Hamon, Lord of Striking Thunder", or "Raviel, Lord of Phantasms", your opponent cannot activate cards or effects in response to this card's activation.
external_ids: local CARD_ID_0 = 69890967 --Raviel, Lord of Phantasms
  local CARD_ID_1 = 32491822 --Hamon, Lord of Striking Thunder
  local CARD_ID_2 = 6007213 --Uria, Lord of Searing Flames
  local SETCARD_ID_0 = 0x144 --Phantasm
  
lua: local CARD_ID_0 = 69890967 --Raviel, Lord of Phantasms
  local CARD_ID_1 = 32491822 --Hamon, Lord of Striking Thunder
  local CARD_ID_2 = 6007213 --Uria, Lord of Searing Flames
  local SETCARD_ID_0 = 0x144 --Phantasm
  local s, id, o = GetID()
  function s.initial_effect(c)
  	aux.AddCodeList(c, CARD_ID_2, CARD_ID_1, CARD_ID_0)
  	--activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_REMOVE + CATEGORY_SPECIAL_SUMMON)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  end
  function s.filter1(c, e)
  	return c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
  end
  function s.filter2(c, e, tp, m, chkf)
  	return c:IsSetCard(SETCARD_ID_0) and c:IsCanBeSpecialSummoned(e, 0, tp, true, false) and c:CheckFusionMaterial(m, nil, chkf, true)
  end
  function s.chfilter(c)
  	return c:IsFaceup() and c:IsCode(CARD_ID_2, CARD_ID_1, CARD_ID_0)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		local chkf = tp | 0x200
  		local mg = Duel.GetMatchingGroup(s.filter1, tp, LOCATION_HAND + LOCATION_MZONE + LOCATION_GRAVE, 0, nil, e)
  		return Duel.IsExistingMatchingCard(s.filter2, tp, LOCATION_EXTRA, 0, 1, nil, e, tp, mg, chkf)
  	end
  	if e:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsExistingMatchingCard(s.chfilter, tp, LOCATION_ONFIELD, 0, 1, nil) then
  		Duel.SetChainLimit(s.chainlm)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_REMOVE, nil, 0, tp, LOCATION_HAND + LOCATION_MZONE + LOCATION_GRAVE)
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, LOCATION_EXTRA)
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	local chkf = tp | 0x200
  	local mg = Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter1), tp, LOCATION_HAND + LOCATION_MZONE + LOCATION_GRAVE, 0, nil, e)
  	local sg = Duel.GetMatchingGroup(s.filter2, tp, LOCATION_EXTRA, 0, nil, e, tp, mg, chkf)
  	if sg:GetCount() > 0 then
  		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
  		local tg = sg:Select(tp, 1, 1, nil)
  		local tc = tg:GetFirst()
  		local mat = Duel.SelectFusionMaterial(tp, tc, mg, nil, chkf, true)
  		Duel.Remove(mat, POS_FACEUP, REASON_EFFECT)
  		Duel.BreakEffect()
  		if Duel.SpecialSummonStep(tc, 0, tp, tp, true, false, POS_FACEUP) then
  			local e1 = Effect.CreateEffect(e:GetHandler())
  			e1:SetType(EFFECT_TYPE_SINGLE)
  			e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
  			e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
  			e1:SetRange(LOCATION_MZONE)
  			e1:SetReset(RESET_EVENT + RESETS_STANDARD)
  			e1:SetCondition(s.damcon)
  			e1:SetValue(1)
  			e1:SetOwnerPlayer(tp)
  			tc:RegisterEffect(e1)
  			local e2 = e1:Clone()
  			e2:SetCode(EFFECT_NO_BATTLE_DAMAGE)
  			e2:SetCondition(s.damcon2)
  			tc:RegisterEffect(e2)
  		end
  		Duel.SpecialSummonComplete()
  	end
  end
  function s.damcon(e)
  	return e:GetHandlerPlayer() == e:GetOwnerPlayer()
  end
  function s.damcon2(e)
  	return 1 - e:GetHandlerPlayer() == e:GetOwnerPlayer()
  end
  function s.chainlm(e, ep, tp)
  	return tp == ep
  end
  
  
source_text: Dimension
  Banish from your hand, field, and/or GY, the Fusion Materials that are listed on a "Phantasm" Fusion Monster, then Special Summon that Fusion Monster from your Extra Deck, ignoring its Summoning conditions. You take no battle damage from attacks involving the monster Special Summoned by this effect. If you control "Uria, Lord of Searing Flames", "Hamon, Lord of Striking Thunder", or "Raviel, Lord of Phantasms", your opponent cannot activate cards or effects in response to this card's activation.
target_text: -- Dimension
  local CARD_ID_0 = 69890967 --Raviel, Lord of Phantasms
  local CARD_ID_1 = 32491822 --Hamon, Lord of Striking Thunder
  local CARD_ID_2 = 6007213 --Uria, Lord of Searing Flames
  local SETCARD_ID_0 = 0x144 --Phantasm
  local s, id, o = GetID()
  function s.initial_effect(c)
  	aux.AddCodeList(c, CARD_ID_2, CARD_ID_1, CARD_ID_0)
  	--activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_REMOVE + CATEGORY_SPECIAL_SUMMON)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  end
  function s.filter1(c, e)
  	return c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
  end
  function s.filter2(c, e, tp, m, chkf)
  	return c:IsSetCard(SETCARD_ID_0) and c:IsCanBeSpecialSummoned(e, 0, tp, true, false) and c:CheckFusionMaterial(m, nil, chkf, true)
  end
  function s.chfilter(c)
  	return c:IsFaceup() and c:IsCode(CARD_ID_2, CARD_ID_1, CARD_ID_0)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		local chkf = tp | 0x200
  		local mg = Duel.GetMatchingGroup(s.filter1, tp, LOCATION_HAND + LOCATION_MZONE + LOCATION_GRAVE, 0, nil, e)
  		return Duel.IsExistingMatchingCard(s.filter2, tp, LOCATION_EXTRA, 0, 1, nil, e, tp, mg, chkf)
  	end
  	if e:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsExistingMatchingCard(s.chfilter, tp, LOCATION_ONFIELD, 0, 1, nil) then
  		Duel.SetChainLimit(s.chainlm)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_REMOVE, nil, 0, tp, LOCATION_HAND + LOCATION_MZONE + LOCATION_GRAVE)
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, LOCATION_EXTRA)
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	local chkf = tp | 0x200
  	local mg = Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter1), tp, LOCATION_HAND + LOCATION_MZONE + LOCATION_GRAVE, 0, nil, e)
  	local sg = Duel.GetMatchingGroup(s.filter2, tp, LOCATION_EXTRA, 0, nil, e, tp, mg, chkf)
  	if sg:GetCount() > 0 then
  		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
  		local tg = sg:Select(tp, 1, 1, nil)
  		local tc = tg:GetFirst()
  		local mat = Duel.SelectFusionMaterial(tp, tc, mg, nil, chkf, true)
  		Duel.Remove(mat, POS_FACEUP, REASON_EFFECT)
  		Duel.BreakEffect()
  		if Duel.SpecialSummonStep(tc, 0, tp, tp, true, false, POS_FACEUP) then
  			local e1 = Effect.CreateEffect(e:GetHandler())
  			e1:SetType(EFFECT_TYPE_SINGLE)
  			e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
  			e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
  			e1:SetRange(LOCATION_MZONE)
  			e1:SetReset(RESET_EVENT + RESETS_STANDARD)
  			e1:SetCondition(s.damcon)
  			e1:SetValue(1)
  			e1:SetOwnerPlayer(tp)
  			tc:RegisterEffect(e1)
  			local e2 = e1:Clone()
  			e2:SetCode(EFFECT_NO_BATTLE_DAMAGE)
  			e2:SetCondition(s.damcon2)
  			tc:RegisterEffect(e2)
  		end
  		Duel.SpecialSummonComplete()
  	end
  end
  function s.damcon(e)
  	return e:GetHandlerPlayer() == e:GetOwnerPlayer()
  end
  function s.damcon2(e)
  	return 1 - e:GetHandlerPlayer() == e:GetOwnerPlayer()
  end
  function s.chainlm(e, ep, tp)
  	return tp == ep
  end
  
  