name: Goblin
card_text: While you control another Fiend monster, monsters cannot attack this card. This card's ATK/DEF become the number of other Fiend monsters on the field x 1000.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--cannot be battle target
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
  	e1:SetCondition(s.ccon)
  	e1:SetValue(aux.imval1)
  	c:RegisterEffect(e1)
  	--atk,def
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_SINGLE)
  	e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetCode(EFFECT_SET_ATTACK)
  	e2:SetValue(s.val)
  	c:RegisterEffect(e2)
  	local e3 = e2:Clone()
  	e3:SetCode(EFFECT_SET_DEFENSE)
  	c:RegisterEffect(e3)
  end
  function s.filter(c)
  	return c:IsFaceup() and c:IsRace(RACE_FIEND)
  end
  function s.ccon(e)
  	return Duel.IsExistingMatchingCard(s.filter, e:GetHandler():GetControler(), LOCATION_MZONE, 0, 1, e:GetHandler())
  end
  function s.val(e, c)
  	return Duel.GetMatchingGroupCount(s.filter, c:GetControler(), LOCATION_MZONE, LOCATION_MZONE, c) * 1000
  end
  
  
source_text: Goblin
  While you control another Fiend monster, monsters cannot attack this card. This card's ATK/DEF become the number of other Fiend monsters on the field x 1000.
target_text: -- Goblin
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--cannot be battle target
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
  	e1:SetCondition(s.ccon)
  	e1:SetValue(aux.imval1)
  	c:RegisterEffect(e1)
  	--atk,def
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_SINGLE)
  	e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetCode(EFFECT_SET_ATTACK)
  	e2:SetValue(s.val)
  	c:RegisterEffect(e2)
  	local e3 = e2:Clone()
  	e3:SetCode(EFFECT_SET_DEFENSE)
  	c:RegisterEffect(e3)
  end
  function s.filter(c)
  	return c:IsFaceup() and c:IsRace(RACE_FIEND)
  end
  function s.ccon(e)
  	return Duel.IsExistingMatchingCard(s.filter, e:GetHandler():GetControler(), LOCATION_MZONE, 0, 1, e:GetHandler())
  end
  function s.val(e, c)
  	return Duel.GetMatchingGroupCount(s.filter, c:GetControler(), LOCATION_MZONE, LOCATION_MZONE, c) * 1000
  end
  
  