name: Level
card_text: If there are no monsters on the field, you can Normal Summon this card as a Level 2 monster. If your opponent controls a monster and you control no monsters, you can Special Summon this card (from your hand) as a Level 4 monster.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--summon
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_SUMMON_PROC)
  	e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
  	e1:SetCondition(s.sumcon)
  	e1:SetOperation(s.sumop)
  	c:RegisterEffect(e1)
  	--special summon
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD)
  	e2:SetCode(EFFECT_SPSUMMON_PROC)
  	e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
  	e2:SetRange(LOCATION_HAND)
  	e2:SetCondition(s.spcon)
  	e2:SetOperation(s.spop)
  	c:RegisterEffect(e2)
  end
  function s.sumcon(e, c, minc)
  	if c == nil then
  		return true
  	end
  	local tp = c:GetControler()
  	return minc == 0 and Duel.GetFieldGroupCount(tp, LOCATION_MZONE, LOCATION_MZONE) == 0 and Duel.GetLocationCount(tp, LOCATION_MZONE) > 0
  end
  function s.sumop(e, tp, eg, ep, ev, re, r, rp, c)
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_CHANGE_LEVEL)
  	e1:SetValue(2)
  	e1:SetReset(RESET_EVENT + 0xff0000)
  	c:RegisterEffect(e1)
  end
  function s.spcon(e, c)
  	if c == nil then
  		return true
  	end
  	local tp = c:GetControler()
  	return Duel.GetFieldGroupCount(tp, LOCATION_MZONE, 0) == 0 and Duel.GetFieldGroupCount(tp, 0, LOCATION_MZONE) > 0 and Duel.GetLocationCount(tp, LOCATION_MZONE) > 0
  end
  function s.spop(e, tp, eg, ep, ev, re, r, rp, c)
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_CHANGE_LEVEL)
  	e1:SetValue(4)
  	e1:SetReset(RESET_EVENT + 0xff0000)
  	c:RegisterEffect(e1)
  end
  
  
source_text: Level
  If there are no monsters on the field, you can Normal Summon this card as a Level 2 monster. If your opponent controls a monster and you control no monsters, you can Special Summon this card (from your hand) as a Level 4 monster.
target_text: -- Level
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--summon
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_SUMMON_PROC)
  	e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
  	e1:SetCondition(s.sumcon)
  	e1:SetOperation(s.sumop)
  	c:RegisterEffect(e1)
  	--special summon
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD)
  	e2:SetCode(EFFECT_SPSUMMON_PROC)
  	e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
  	e2:SetRange(LOCATION_HAND)
  	e2:SetCondition(s.spcon)
  	e2:SetOperation(s.spop)
  	c:RegisterEffect(e2)
  end
  function s.sumcon(e, c, minc)
  	if c == nil then
  		return true
  	end
  	local tp = c:GetControler()
  	return minc == 0 and Duel.GetFieldGroupCount(tp, LOCATION_MZONE, LOCATION_MZONE) == 0 and Duel.GetLocationCount(tp, LOCATION_MZONE) > 0
  end
  function s.sumop(e, tp, eg, ep, ev, re, r, rp, c)
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_CHANGE_LEVEL)
  	e1:SetValue(2)
  	e1:SetReset(RESET_EVENT + 0xff0000)
  	c:RegisterEffect(e1)
  end
  function s.spcon(e, c)
  	if c == nil then
  		return true
  	end
  	local tp = c:GetControler()
  	return Duel.GetFieldGroupCount(tp, LOCATION_MZONE, 0) == 0 and Duel.GetFieldGroupCount(tp, 0, LOCATION_MZONE) > 0 and Duel.GetLocationCount(tp, LOCATION_MZONE) > 0
  end
  function s.spop(e, tp, eg, ep, ev, re, r, rp, c)
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_CHANGE_LEVEL)
  	e1:SetValue(4)
  	e1:SetReset(RESET_EVENT + 0xff0000)
  	c:RegisterEffect(e1)
  end
  
  