name: Evil
card_text: 1 Fiend monster + 1 Rock monster
  Must be Special Summoned with "Dark Fusion". The original ATK of this card becomes the combined original ATK of the materials used for its Fusion Summon. When this card declares an attack: You can change all Defense Position monsters your opponent controls to face-up Attack Position. (Flip effects are not activated at this time.)
external_ids: local CARD_ID_0 = 94820406 --Dark Fusion
  
lua: local CARD_ID_0 = 94820406 --Dark Fusion
  local s, id, o = GetID()
  function s.initial_effect(c)
  	aux.AddCodeList(c, CARD_ID_0)
  	--fusion material
  	c:EnableReviveLimit()
  	aux.AddFusionProcFun2(c, aux.FilterBoolFunction(Card.IsRace, RACE_FIEND), aux.FilterBoolFunction(Card.IsRace, RACE_ROCK), true)
  	--spsummon condition
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_SINGLE)
  	e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
  	e2:SetCode(EFFECT_SPSUMMON_CONDITION)
  	e2:SetValue(aux.DarkFusionLimit)
  	c:RegisterEffect(e2)
  	--atk
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_SINGLE)
  	e3:SetCode(EFFECT_MATERIAL_CHECK)
  	e3:SetValue(s.matcheck)
  	c:RegisterEffect(e3)
  	--Pos Change
  	local e3 = Effect.CreateEffect(c)
  	e3:SetCategory(CATEGORY_POSITION)
  	e3:SetDescription(aux.Stringid(id, 0))
  	e3:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e3:SetCode(EVENT_ATTACK_ANNOUNCE)
  	e3:SetTarget(s.postg)
  	e3:SetOperation(s.posop)
  	c:RegisterEffect(e3)
  end
  s.dark_calling = true
  function s.matcheck(e, c)
  	local g = c:GetMaterial()
  	local s = 0
  	local tc = g:GetFirst()
  	while tc do
  		local a = tc:GetBaseAttack()
  		s = s + a
  		tc = g:GetNext()
  	end
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_SET_BASE_ATTACK)
  	e1:SetValue(s)
  	e1:SetReset(RESET_EVENT + RESETS_STANDARD - RESET_TOFIELD + RESET_DISABLE)
  	c:RegisterEffect(e1)
  end
  function s.postg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.IsExistingMatchingCard(Card.IsDefensePos, tp, 0, LOCATION_MZONE, 1, nil)
  	end
  	local g = Duel.GetMatchingGroup(Card.IsDefensePos, tp, 0, LOCATION_MZONE, nil)
  	Duel.SetOperationInfo(0, CATEGORY_POSITION, g, g:GetCount(), 0, 0)
  end
  function s.posop(e, tp, eg, ep, ev, re, r, rp)
  	local g = Duel.GetMatchingGroup(Card.IsDefensePos, tp, 0, LOCATION_MZONE, nil)
  	Duel.ChangePosition(g, 0, 0, POS_FACEUP_ATTACK, POS_FACEUP_ATTACK, true)
  end
  
  
source_text: Evil
  1 Fiend monster + 1 Rock monster
  Must be Special Summoned with "Dark Fusion". The original ATK of this card becomes the combined original ATK of the materials used for its Fusion Summon. When this card declares an attack: You can change all Defense Position monsters your opponent controls to face-up Attack Position. (Flip effects are not activated at this time.)
target_text: -- Evil
  local CARD_ID_0 = 94820406 --Dark Fusion
  local s, id, o = GetID()
  function s.initial_effect(c)
  	aux.AddCodeList(c, CARD_ID_0)
  	--fusion material
  	c:EnableReviveLimit()
  	aux.AddFusionProcFun2(c, aux.FilterBoolFunction(Card.IsRace, RACE_FIEND), aux.FilterBoolFunction(Card.IsRace, RACE_ROCK), true)
  	--spsummon condition
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_SINGLE)
  	e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
  	e2:SetCode(EFFECT_SPSUMMON_CONDITION)
  	e2:SetValue(aux.DarkFusionLimit)
  	c:RegisterEffect(e2)
  	--atk
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_SINGLE)
  	e3:SetCode(EFFECT_MATERIAL_CHECK)
  	e3:SetValue(s.matcheck)
  	c:RegisterEffect(e3)
  	--Pos Change
  	local e3 = Effect.CreateEffect(c)
  	e3:SetCategory(CATEGORY_POSITION)
  	e3:SetDescription(aux.Stringid(id, 0))
  	e3:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e3:SetCode(EVENT_ATTACK_ANNOUNCE)
  	e3:SetTarget(s.postg)
  	e3:SetOperation(s.posop)
  	c:RegisterEffect(e3)
  end
  s.dark_calling = true
  function s.matcheck(e, c)
  	local g = c:GetMaterial()
  	local s = 0
  	local tc = g:GetFirst()
  	while tc do
  		local a = tc:GetBaseAttack()
  		s = s + a
  		tc = g:GetNext()
  	end
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_SET_BASE_ATTACK)
  	e1:SetValue(s)
  	e1:SetReset(RESET_EVENT + RESETS_STANDARD - RESET_TOFIELD + RESET_DISABLE)
  	c:RegisterEffect(e1)
  end
  function s.postg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.IsExistingMatchingCard(Card.IsDefensePos, tp, 0, LOCATION_MZONE, 1, nil)
  	end
  	local g = Duel.GetMatchingGroup(Card.IsDefensePos, tp, 0, LOCATION_MZONE, nil)
  	Duel.SetOperationInfo(0, CATEGORY_POSITION, g, g:GetCount(), 0, 0)
  end
  function s.posop(e, tp, eg, ep, ev, re, r, rp)
  	local g = Duel.GetMatchingGroup(Card.IsDefensePos, tp, 0, LOCATION_MZONE, nil)
  	Duel.ChangePosition(g, 0, 0, POS_FACEUP_ATTACK, POS_FACEUP_ATTACK, true)
  end
  
  