name: Solidarity
card_text: If you have only 1 original Type of monster in your Graveyard, all monsters you control with the same Type gain 800 ATK.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	c:RegisterEffect(e1)
  	--atk up
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD)
  	e2:SetCode(EFFECT_UPDATE_ATTACK)
  	e2:SetRange(LOCATION_SZONE)
  	e2:SetTargetRange(LOCATION_MZONE, 0)
  	e2:SetTarget(s.tg)
  	e2:SetValue(800)
  	c:RegisterEffect(e2)
  end
  function s.tg(e, c)
  	local tp = e:GetHandlerPlayer()
  	local g = Duel.GetMatchingGroup(Card.IsType, tp, LOCATION_GRAVE, 0, nil, TYPE_MONSTER)
  	if g:GetCount() == 0 or g:GetClassCount(Card.GetOriginalRace) > 1 then
  		return false
  	end
  	return c:IsRace(g:GetFirst():GetOriginalRace())
  end
  
  
source_text: Solidarity
  If you have only 1 original Type of monster in your Graveyard, all monsters you control with the same Type gain 800 ATK.
target_text: -- Solidarity
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	c:RegisterEffect(e1)
  	--atk up
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD)
  	e2:SetCode(EFFECT_UPDATE_ATTACK)
  	e2:SetRange(LOCATION_SZONE)
  	e2:SetTargetRange(LOCATION_MZONE, 0)
  	e2:SetTarget(s.tg)
  	e2:SetValue(800)
  	c:RegisterEffect(e2)
  end
  function s.tg(e, c)
  	local tp = e:GetHandlerPlayer()
  	local g = Duel.GetMatchingGroup(Card.IsType, tp, LOCATION_GRAVE, 0, nil, TYPE_MONSTER)
  	if g:GetCount() == 0 or g:GetClassCount(Card.GetOriginalRace) > 1 then
  		return false
  	end
  	return c:IsRace(g:GetFirst():GetOriginalRace())
  end
  
  