name: Cave
card_text: Cannot be Normal Summoned while you control a monster. This card cannot declare an attack unless you control another Dragon-Type monster.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--sumlimit
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_CANNOT_SUMMON)
  	e1:SetCondition(s.sumcon)
  	c:RegisterEffect(e1)
  	--atklimit
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_SINGLE)
  	e2:SetCode(EFFECT_CANNOT_ATTACK)
  	e2:SetCondition(s.atkcon)
  	c:RegisterEffect(e2)
  end
  function s.sumcon(e)
  	return Duel.GetFieldGroupCount(e:GetHandlerPlayer(), LOCATION_MZONE, 0) > 0
  end
  function s.afilter(c)
  	return c:IsFaceup() and c:IsRace(RACE_DRAGON)
  end
  function s.atkcon(e)
  	return not Duel.IsExistingMatchingCard(s.afilter, e:GetHandlerPlayer(), LOCATION_MZONE, 0, 1, e:GetHandler())
  end
  
  
source_text: Cave
  Cannot be Normal Summoned while you control a monster. This card cannot declare an attack unless you control another Dragon-Type monster.
target_text: -- Cave
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--sumlimit
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_CANNOT_SUMMON)
  	e1:SetCondition(s.sumcon)
  	c:RegisterEffect(e1)
  	--atklimit
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_SINGLE)
  	e2:SetCode(EFFECT_CANNOT_ATTACK)
  	e2:SetCondition(s.atkcon)
  	c:RegisterEffect(e2)
  end
  function s.sumcon(e)
  	return Duel.GetFieldGroupCount(e:GetHandlerPlayer(), LOCATION_MZONE, 0) > 0
  end
  function s.afilter(c)
  	return c:IsFaceup() and c:IsRace(RACE_DRAGON)
  end
  function s.atkcon(e)
  	return not Duel.IsExistingMatchingCard(s.afilter, e:GetHandlerPlayer(), LOCATION_MZONE, 0, 1, e:GetHandler())
  end
  
  