name: Supreme
card_text: You can Fusion Summon Fusion Monsters that must be Special Summoned with "Dark Fusion", with effects other than "Dark Fusion". Once per turn, during damage calculation, if your Fiend monster battles an opponent's monster: You can send 1 "Evil HERO" monster from your Deck or Extra Deck to the GY; your monster gains ATK equal to the Level of the monster sent to the GY x 200, until the end of this turn (even if this card leaves the field).
external_ids: local CARD_ID_0 = 94820406 --Dark Fusion
  local SETCARD_ID_0 = 0x6008 --Evil
  
lua: local CARD_ID_0 = 94820406 --Dark Fusion
  local SETCARD_ID_0 = 0x6008 --Evil
  local s, id, o = GetID()
  function s.initial_effect(c)
  	aux.AddCodeList(c, CARD_ID_0)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	c:RegisterEffect(e1)
  	--fusion
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD)
  	e2:SetRange(LOCATION_FZONE)
  	e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e2:SetCode(id)
  	e2:SetTargetRange(1, 0)
  	c:RegisterEffect(e2)
  	--atk
  	local e3 = Effect.CreateEffect(c)
  	e3:SetDescription(aux.Stringid(id, 0))
  	e3:SetCategory(CATEGORY_ATKCHANGE)
  	e3:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O)
  	e3:SetRange(LOCATION_FZONE)
  	e3:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
  	e3:SetCountLimit(1)
  	e3:SetCondition(s.atkcon)
  	e3:SetCost(s.atkcost)
  	e3:SetOperation(s.atkop)
  	c:RegisterEffect(e3)
  end
  function s.atkcon(e, tp, eg, ep, ev, re, r, rp)
  	local tc = Duel.GetAttacker()
  	local bc = Duel.GetAttackTarget()
  	if not bc then
  		return false
  	end
  	if tc:IsControler(1 - tp) then
  		tc = bc
  	end
  	e:SetLabelObject(tc)
  	return tc:IsFaceup() and tc:IsRace(RACE_FIEND)
  end
  function s.atkfilter(c)
  	return c:IsType(TYPE_MONSTER) and c:IsSetCard(SETCARD_ID_0) and c:IsLevelAbove(0) and c:IsAbleToGraveAsCost()
  end
  function s.atkcost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.IsExistingMatchingCard(s.atkfilter, tp, LOCATION_DECK + LOCATION_EXTRA, 0, 1, nil)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TOGRAVE)
  	local g = Duel.SelectMatchingCard(tp, s.atkfilter, tp, LOCATION_DECK + LOCATION_EXTRA, 0, 1, 1, nil)
  	Duel.SendtoGrave(g, REASON_COST)
  	e:SetLabel(g:GetFirst():GetLevel())
  end
  function s.atkop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	local tc = e:GetLabelObject()
  	if tc:IsRelateToBattle() and tc:IsFaceup() and tc:IsControler(tp) then
  		local e1 = Effect.CreateEffect(c)
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetCode(EFFECT_UPDATE_ATTACK)
  		e1:SetValue(e:GetLabel() * 200)
  		e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END)
  		tc:RegisterEffect(e1)
  	end
  end
  
  
source_text: Supreme
  You can Fusion Summon Fusion Monsters that must be Special Summoned with "Dark Fusion", with effects other than "Dark Fusion". Once per turn, during damage calculation, if your Fiend monster battles an opponent's monster: You can send 1 "Evil HERO" monster from your Deck or Extra Deck to the GY; your monster gains ATK equal to the Level of the monster sent to the GY x 200, until the end of this turn (even if this card leaves the field).
target_text: -- Supreme
  local CARD_ID_0 = 94820406 --Dark Fusion
  local SETCARD_ID_0 = 0x6008 --Evil
  local s, id, o = GetID()
  function s.initial_effect(c)
  	aux.AddCodeList(c, CARD_ID_0)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	c:RegisterEffect(e1)
  	--fusion
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD)
  	e2:SetRange(LOCATION_FZONE)
  	e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e2:SetCode(id)
  	e2:SetTargetRange(1, 0)
  	c:RegisterEffect(e2)
  	--atk
  	local e3 = Effect.CreateEffect(c)
  	e3:SetDescription(aux.Stringid(id, 0))
  	e3:SetCategory(CATEGORY_ATKCHANGE)
  	e3:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O)
  	e3:SetRange(LOCATION_FZONE)
  	e3:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
  	e3:SetCountLimit(1)
  	e3:SetCondition(s.atkcon)
  	e3:SetCost(s.atkcost)
  	e3:SetOperation(s.atkop)
  	c:RegisterEffect(e3)
  end
  function s.atkcon(e, tp, eg, ep, ev, re, r, rp)
  	local tc = Duel.GetAttacker()
  	local bc = Duel.GetAttackTarget()
  	if not bc then
  		return false
  	end
  	if tc:IsControler(1 - tp) then
  		tc = bc
  	end
  	e:SetLabelObject(tc)
  	return tc:IsFaceup() and tc:IsRace(RACE_FIEND)
  end
  function s.atkfilter(c)
  	return c:IsType(TYPE_MONSTER) and c:IsSetCard(SETCARD_ID_0) and c:IsLevelAbove(0) and c:IsAbleToGraveAsCost()
  end
  function s.atkcost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.IsExistingMatchingCard(s.atkfilter, tp, LOCATION_DECK + LOCATION_EXTRA, 0, 1, nil)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TOGRAVE)
  	local g = Duel.SelectMatchingCard(tp, s.atkfilter, tp, LOCATION_DECK + LOCATION_EXTRA, 0, 1, 1, nil)
  	Duel.SendtoGrave(g, REASON_COST)
  	e:SetLabel(g:GetFirst():GetLevel())
  end
  function s.atkop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	local tc = e:GetLabelObject()
  	if tc:IsRelateToBattle() and tc:IsFaceup() and tc:IsControler(tp) then
  		local e1 = Effect.CreateEffect(c)
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetCode(EFFECT_UPDATE_ATTACK)
  		e1:SetValue(e:GetLabel() * 200)
  		e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END)
  		tc:RegisterEffect(e1)
  	end
  end
  
  