name: Infernoid
card_text: If this card is Normal or Special Summoned: You can send 1 "Infernoid" monster from your Deck to the GY, except "Infernoid Decatron", and if you do, increase this card's Level by the Level of the sent monster, and if you do that, this card's name becomes that monster's original name, and replace this effect with that monster's original effects.
external_ids: local SETCARD_ID_0 = 0xbb --Infernoid
  
lua: local SETCARD_ID_0 = 0xbb --Infernoid
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_TOGRAVE)
  	e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e1:SetCode(EVENT_SUMMON_SUCCESS)
  	e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP + EFFECT_FLAG_DELAY)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.operation)
  	c:RegisterEffect(e1)
  	local e2 = e1:Clone()
  	e2:SetCode(EVENT_SPSUMMON_SUCCESS)
  	c:RegisterEffect(e2)
  end
  function s.filter(c)
  	return c:IsSetCard(SETCARD_ID_0) and c:IsType(TYPE_MONSTER) and not c:IsCode(id) and c:IsAbleToGrave()
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return e:GetHandler():IsRelateToEffect(e) and Duel.IsExistingMatchingCard(s.filter, tp, LOCATION_DECK, 0, 1, nil)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_TOGRAVE, nil, 1, tp, LOCATION_DECK)
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TOGRAVE)
  	local g = Duel.SelectMatchingCard(tp, s.filter, tp, LOCATION_DECK, 0, 1, 1, nil)
  	local tc = g:GetFirst()
  	local c = e:GetHandler()
  	if tc and Duel.SendtoGrave(tc, REASON_EFFECT) ~= 0 and tc:IsLocation(LOCATION_GRAVE) and c:IsRelateToEffect(e) and c:IsFaceup() then
  		local code = tc:GetCode()
  		local e1 = Effect.CreateEffect(c)
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetCode(EFFECT_UPDATE_LEVEL)
  		e1:SetValue(tc:GetLevel())
  		e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_DISABLE)
  		c:RegisterEffect(e1)
  		local e2 = Effect.CreateEffect(c)
  		e2:SetType(EFFECT_TYPE_SINGLE)
  		e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
  		e2:SetCode(EFFECT_CHANGE_CODE)
  		e2:SetValue(code)
  		e2:SetReset(RESET_EVENT + RESETS_STANDARD)
  		c:RegisterEffect(e2)
  		c:CopyEffect(code, RESET_EVENT + RESETS_STANDARD, 1)
  	end
  end
  
  
source_text: Infernoid
  If this card is Normal or Special Summoned: You can send 1 "Infernoid" monster from your Deck to the GY, except "Infernoid Decatron", and if you do, increase this card's Level by the Level of the sent monster, and if you do that, this card's name becomes that monster's original name, and replace this effect with that monster's original effects.
target_text: -- Infernoid
  local SETCARD_ID_0 = 0xbb --Infernoid
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_TOGRAVE)
  	e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e1:SetCode(EVENT_SUMMON_SUCCESS)
  	e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP + EFFECT_FLAG_DELAY)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.operation)
  	c:RegisterEffect(e1)
  	local e2 = e1:Clone()
  	e2:SetCode(EVENT_SPSUMMON_SUCCESS)
  	c:RegisterEffect(e2)
  end
  function s.filter(c)
  	return c:IsSetCard(SETCARD_ID_0) and c:IsType(TYPE_MONSTER) and not c:IsCode(id) and c:IsAbleToGrave()
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return e:GetHandler():IsRelateToEffect(e) and Duel.IsExistingMatchingCard(s.filter, tp, LOCATION_DECK, 0, 1, nil)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_TOGRAVE, nil, 1, tp, LOCATION_DECK)
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TOGRAVE)
  	local g = Duel.SelectMatchingCard(tp, s.filter, tp, LOCATION_DECK, 0, 1, 1, nil)
  	local tc = g:GetFirst()
  	local c = e:GetHandler()
  	if tc and Duel.SendtoGrave(tc, REASON_EFFECT) ~= 0 and tc:IsLocation(LOCATION_GRAVE) and c:IsRelateToEffect(e) and c:IsFaceup() then
  		local code = tc:GetCode()
  		local e1 = Effect.CreateEffect(c)
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetCode(EFFECT_UPDATE_LEVEL)
  		e1:SetValue(tc:GetLevel())
  		e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_DISABLE)
  		c:RegisterEffect(e1)
  		local e2 = Effect.CreateEffect(c)
  		e2:SetType(EFFECT_TYPE_SINGLE)
  		e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
  		e2:SetCode(EFFECT_CHANGE_CODE)
  		e2:SetValue(code)
  		e2:SetReset(RESET_EVENT + RESETS_STANDARD)
  		c:RegisterEffect(e2)
  		c:CopyEffect(code, RESET_EVENT + RESETS_STANDARD, 1)
  	end
  end
  
  