name: Zombie
card_text: All monsters on the field and in the GYs become Zombie monsters. Neither player can Tribute Summon monsters, except Zombie monsters.
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)
  	--race
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD)
  	e2:SetRange(LOCATION_FZONE)
  	e2:SetTargetRange(LOCATION_MZONE, LOCATION_MZONE)
  	e2:SetCode(EFFECT_CHANGE_RACE)
  	e2:SetValue(RACE_ZOMBIE)
  	c:RegisterEffect(e2)
  	local e2g = e2:Clone()
  	e2g:SetTargetRange(LOCATION_GRAVE, LOCATION_GRAVE)
  	e2g:SetCondition(s.gravecon)
  	c:RegisterEffect(e2g)
  	--summon limit
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_FIELD)
  	e3:SetRange(LOCATION_FZONE)
  	e3:SetCode(EFFECT_CANNOT_SUMMON)
  	e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e3:SetTargetRange(1, 1)
  	e3:SetTarget(s.sumlimit)
  	c:RegisterEffect(e3)
  	local e4 = e3:Clone()
  	e4:SetCode(EFFECT_CANNOT_MSET)
  	c:RegisterEffect(e4)
  	--
  	local e5 = Effect.CreateEffect(c)
  	e5:SetType(EFFECT_TYPE_FIELD)
  	e5:SetCode(EFFECT_CHANGE_GRAVE_RACE)
  	e5:SetRange(LOCATION_FZONE)
  	e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e5:SetTargetRange(1, 1)
  	e5:SetCondition(s.gravecon)
  	e5:SetValue(RACE_ZOMBIE)
  	c:RegisterEffect(e5)
  end
  function s.sumlimit(e, c, tp, sumtp)
  	return bit.band(sumtp, SUMMON_TYPE_ADVANCE) == SUMMON_TYPE_ADVANCE and c:GetRace() ~= RACE_ZOMBIE
  end
  function s.gravecon(e)
  	local tp = e:GetHandlerPlayer()
  	return not Duel.IsPlayerAffectedByEffect(tp, EFFECT_NECRO_VALLEY) and not Duel.IsPlayerAffectedByEffect(1 - tp, EFFECT_NECRO_VALLEY)
  end
  
  
source_text: Zombie
  All monsters on the field and in the GYs become Zombie monsters. Neither player can Tribute Summon monsters, except Zombie monsters.
target_text: -- Zombie
  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)
  	--race
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD)
  	e2:SetRange(LOCATION_FZONE)
  	e2:SetTargetRange(LOCATION_MZONE, LOCATION_MZONE)
  	e2:SetCode(EFFECT_CHANGE_RACE)
  	e2:SetValue(RACE_ZOMBIE)
  	c:RegisterEffect(e2)
  	local e2g = e2:Clone()
  	e2g:SetTargetRange(LOCATION_GRAVE, LOCATION_GRAVE)
  	e2g:SetCondition(s.gravecon)
  	c:RegisterEffect(e2g)
  	--summon limit
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_FIELD)
  	e3:SetRange(LOCATION_FZONE)
  	e3:SetCode(EFFECT_CANNOT_SUMMON)
  	e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e3:SetTargetRange(1, 1)
  	e3:SetTarget(s.sumlimit)
  	c:RegisterEffect(e3)
  	local e4 = e3:Clone()
  	e4:SetCode(EFFECT_CANNOT_MSET)
  	c:RegisterEffect(e4)
  	--
  	local e5 = Effect.CreateEffect(c)
  	e5:SetType(EFFECT_TYPE_FIELD)
  	e5:SetCode(EFFECT_CHANGE_GRAVE_RACE)
  	e5:SetRange(LOCATION_FZONE)
  	e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e5:SetTargetRange(1, 1)
  	e5:SetCondition(s.gravecon)
  	e5:SetValue(RACE_ZOMBIE)
  	c:RegisterEffect(e5)
  end
  function s.sumlimit(e, c, tp, sumtp)
  	return bit.band(sumtp, SUMMON_TYPE_ADVANCE) == SUMMON_TYPE_ADVANCE and c:GetRace() ~= RACE_ZOMBIE
  end
  function s.gravecon(e)
  	local tp = e:GetHandlerPlayer()
  	return not Duel.IsPlayerAffectedByEffect(tp, EFFECT_NECRO_VALLEY) and not Duel.IsPlayerAffectedByEffect(1 - tp, EFFECT_NECRO_VALLEY)
  end
  
  