name: Maju
card_text: The ATK of this card becomes equal to the combined original ATK of the 2 monsters you Tributed for the Tribute Summon of this card.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--tribute check
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_MATERIAL_CHECK)
  	e1:SetValue(s.valcheck)
  	c:RegisterEffect(e1)
  	--give atk effect only when summon
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_SINGLE)
  	e2:SetCode(EFFECT_SUMMON_COST)
  	e2:SetOperation(s.facechk)
  	e2:SetLabelObject(e1)
  	c:RegisterEffect(e2)
  end
  function s.valcheck(e, c)
  	local g = c:GetMaterial()
  	local tc = g:GetFirst()
  	local atk = 0
  	while tc do
  		local catk = tc:GetTextAttack()
  		atk = atk + (catk >= 0 and catk or 0)
  		tc = g:GetNext()
  	end
  	if e:GetLabel() == 1 then
  		e:SetLabel(0)
  		local e1 = Effect.CreateEffect(c)
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetCode(EFFECT_SET_ATTACK)
  		e1:SetValue(atk)
  		e1:SetReset(RESET_EVENT + 0xff0000)
  		c:RegisterEffect(e1)
  	end
  end
  function s.facechk(e, tp, eg, ep, ev, re, r, rp)
  	e:GetLabelObject():SetLabel(1)
  end
  
  
source_text: Maju
  The ATK of this card becomes equal to the combined original ATK of the 2 monsters you Tributed for the Tribute Summon of this card.
target_text: -- Maju
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--tribute check
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_MATERIAL_CHECK)
  	e1:SetValue(s.valcheck)
  	c:RegisterEffect(e1)
  	--give atk effect only when summon
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_SINGLE)
  	e2:SetCode(EFFECT_SUMMON_COST)
  	e2:SetOperation(s.facechk)
  	e2:SetLabelObject(e1)
  	c:RegisterEffect(e2)
  end
  function s.valcheck(e, c)
  	local g = c:GetMaterial()
  	local tc = g:GetFirst()
  	local atk = 0
  	while tc do
  		local catk = tc:GetTextAttack()
  		atk = atk + (catk >= 0 and catk or 0)
  		tc = g:GetNext()
  	end
  	if e:GetLabel() == 1 then
  		e:SetLabel(0)
  		local e1 = Effect.CreateEffect(c)
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetCode(EFFECT_SET_ATTACK)
  		e1:SetValue(atk)
  		e1:SetReset(RESET_EVENT + 0xff0000)
  		c:RegisterEffect(e1)
  	end
  end
  function s.facechk(e, tp, eg, ep, ev, re, r, rp)
  	e:GetLabelObject():SetLabel(1)
  end
  
  