name: Majestic
card_text: You can Normal Summon this card without Tributing. If you do, during the End Phase: Send it to the Graveyard.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--summon with no tribute
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_SUMMON_PROC)
  	e1:SetCondition(s.ntcon)
  	e1:SetOperation(s.ntop)
  	c:RegisterEffect(e1)
  end
  function s.ntcon(e, c, minc)
  	if c == nil then
  		return true
  	end
  	return minc == 0 and c:IsLevelAbove(5) and Duel.GetLocationCount(c:GetControler(), LOCATION_MZONE) > 0
  end
  function s.ntop(e, tp, eg, ep, ev, re, r, rp, c)
  	--to grave
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 1))
  	e1:SetCategory(CATEGORY_TOGRAVE)
  	e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_F)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetCountLimit(1)
  	e1:SetCode(EVENT_PHASE + PHASE_END)
  	e1:SetTarget(s.tgtg)
  	e1:SetOperation(s.tgop)
  	e1:SetReset(RESET_EVENT + 0xc6e0000)
  	c:RegisterEffect(e1)
  end
  function s.tgtg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return true
  	end
  	Duel.SetOperationInfo(0, CATEGORY_TOGRAVE, e:GetHandler(), 1, 0, 0)
  end
  function s.tgop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	if c:IsRelateToEffect(e) and c:IsFaceup() then
  		Duel.SendtoGrave(c, REASON_EFFECT)
  	end
  end
  
  
source_text: Majestic
  You can Normal Summon this card without Tributing. If you do, during the End Phase: Send it to the Graveyard.
target_text: -- Majestic
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--summon with no tribute
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_SUMMON_PROC)
  	e1:SetCondition(s.ntcon)
  	e1:SetOperation(s.ntop)
  	c:RegisterEffect(e1)
  end
  function s.ntcon(e, c, minc)
  	if c == nil then
  		return true
  	end
  	return minc == 0 and c:IsLevelAbove(5) and Duel.GetLocationCount(c:GetControler(), LOCATION_MZONE) > 0
  end
  function s.ntop(e, tp, eg, ep, ev, re, r, rp, c)
  	--to grave
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 1))
  	e1:SetCategory(CATEGORY_TOGRAVE)
  	e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_F)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetCountLimit(1)
  	e1:SetCode(EVENT_PHASE + PHASE_END)
  	e1:SetTarget(s.tgtg)
  	e1:SetOperation(s.tgop)
  	e1:SetReset(RESET_EVENT + 0xc6e0000)
  	c:RegisterEffect(e1)
  end
  function s.tgtg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return true
  	end
  	Duel.SetOperationInfo(0, CATEGORY_TOGRAVE, e:GetHandler(), 1, 0, 0)
  end
  function s.tgop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	if c:IsRelateToEffect(e) and c:IsFaceup() then
  		Duel.SendtoGrave(c, REASON_EFFECT)
  	end
  end
  
  