name: Vehicroid
card_text: Fusion Summon 1 "Vehicroid" Fusion Monster from your Extra Deck, using monsters from your hand or field as Fusion Materials, and if you do, it cannot be destroyed by card effects, and its effects cannot be negated.
external_ids: local SETCARD_ID_0 = 0x1016 --Vehicroid
  
lua: local SETCARD_ID_0 = 0x1016 --Vehicroid
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--fusion summon
  	FusionSpell.RegisterSummonEffect(c, {
  		fusfilter = s.fusfilter,
  		stage_x_operation = s.stage_x_operation,
  	})
  end
  
  function s.fusfilter(c)
  	return c:IsSetCard(SETCARD_ID_0)
  end
  
  function s.stage_x_operation(e, tc, tp, stage)
  	if stage == FusionSpell.STAGE_BEFORE_SUMMON_COMPLETE then
  		local c = e:GetHandler()
  		local e1 = Effect.CreateEffect(c)
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
  		e1:SetValue(1)
  		e1:SetReset(RESET_EVENT + RESETS_STANDARD)
  		tc:RegisterEffect(e1, true)
  		local e2 = Effect.CreateEffect(c)
  		e2:SetType(EFFECT_TYPE_SINGLE)
  		e2:SetCode(EFFECT_CANNOT_DISABLE)
  		e2:SetReset(RESET_EVENT + RESETS_STANDARD)
  		tc:RegisterEffect(e2, true)
  		local e3 = Effect.CreateEffect(c)
  		e3:SetType(EFFECT_TYPE_FIELD)
  		e3:SetCode(EFFECT_CANNOT_DISEFFECT)
  		e3:SetRange(LOCATION_MZONE)
  		e3:SetValue(s.efilter)
  		e3:SetReset(RESET_EVENT + RESETS_STANDARD)
  		tc:RegisterEffect(e3, true)
  	end
  end
  
  function s.efilter(e, ct)
  	local te = Duel.GetChainInfo(ct, CHAININFO_TRIGGERING_EFFECT)
  	return te:GetHandler() == e:GetHandler()
  end
  
  
source_text: Vehicroid
  Fusion Summon 1 "Vehicroid" Fusion Monster from your Extra Deck, using monsters from your hand or field as Fusion Materials, and if you do, it cannot be destroyed by card effects, and its effects cannot be negated.
target_text: -- Vehicroid
  local SETCARD_ID_0 = 0x1016 --Vehicroid
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--fusion summon
  	FusionSpell.RegisterSummonEffect(c, {
  		fusfilter = s.fusfilter,
  		stage_x_operation = s.stage_x_operation,
  	})
  end
  
  function s.fusfilter(c)
  	return c:IsSetCard(SETCARD_ID_0)
  end
  
  function s.stage_x_operation(e, tc, tp, stage)
  	if stage == FusionSpell.STAGE_BEFORE_SUMMON_COMPLETE then
  		local c = e:GetHandler()
  		local e1 = Effect.CreateEffect(c)
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
  		e1:SetValue(1)
  		e1:SetReset(RESET_EVENT + RESETS_STANDARD)
  		tc:RegisterEffect(e1, true)
  		local e2 = Effect.CreateEffect(c)
  		e2:SetType(EFFECT_TYPE_SINGLE)
  		e2:SetCode(EFFECT_CANNOT_DISABLE)
  		e2:SetReset(RESET_EVENT + RESETS_STANDARD)
  		tc:RegisterEffect(e2, true)
  		local e3 = Effect.CreateEffect(c)
  		e3:SetType(EFFECT_TYPE_FIELD)
  		e3:SetCode(EFFECT_CANNOT_DISEFFECT)
  		e3:SetRange(LOCATION_MZONE)
  		e3:SetValue(s.efilter)
  		e3:SetReset(RESET_EVENT + RESETS_STANDARD)
  		tc:RegisterEffect(e3, true)
  	end
  end
  
  function s.efilter(e, ct)
  	local te = Duel.GetChainInfo(ct, CHAININFO_TRIGGERING_EFFECT)
  	return te:GetHandler() == e:GetHandler()
  end
  
  