name: Attraffic
card_text: If your opponent controls 3 or more monsters, they cannot declare an attack.
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)
  	--cannot attack
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD)
  	e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
  	e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e2:SetRange(LOCATION_SZONE)
  	e2:SetTargetRange(0, 1)
  	e2:SetCondition(s.atcon)
  	c:RegisterEffect(e2)
  end
  function s.atcon(e)
  	return Duel.GetFieldGroupCount(e:GetHandlerPlayer(), 0, LOCATION_MZONE) >= 3
  end
  
  
source_text: Attraffic
  If your opponent controls 3 or more monsters, they cannot declare an attack.
target_text: -- Attraffic
  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)
  	--cannot attack
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD)
  	e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
  	e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e2:SetRange(LOCATION_SZONE)
  	e2:SetTargetRange(0, 1)
  	e2:SetCondition(s.atcon)
  	c:RegisterEffect(e2)
  end
  function s.atcon(e)
  	return Duel.GetFieldGroupCount(e:GetHandlerPlayer(), 0, LOCATION_MZONE) >= 3
  end
  
  