name: King
card_text: You can Tribute 1 face-up "Moja" you control to Special Summon this card from your hand or Graveyard. There can only be 1 face-up "King of the Beasts" on the field.
external_ids: local CARD_ID_0 = 94878265 --Moja
  
lua: local CARD_ID_0 = 94878265 --Moja
  local s, id, o = GetID()
  function s.initial_effect(c)
  	c:SetUniqueOnField(1, 1, id)
  	--special summon
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
  	e1:SetType(EFFECT_TYPE_IGNITION)
  	e1:SetRange(LOCATION_HAND + LOCATION_GRAVE)
  	e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
  	e1:SetCost(s.spcost)
  	e1:SetTarget(s.sptg)
  	e1:SetOperation(s.spop)
  	c:RegisterEffect(e1)
  end
  function s.cfilter(c, ft, tp)
  	return c:IsFaceup() and c:IsCode(CARD_ID_0) and (ft > 0 or (c:IsControler(tp) and c:GetSequence() < 5))
  end
  function s.spcost(e, tp, eg, ep, ev, re, r, rp, chk)
  	local ft = Duel.GetLocationCount(tp, LOCATION_MZONE)
  	if chk == 0 then
  		return ft > -1 and Duel.CheckReleaseGroup(tp, s.cfilter, 1, nil, ft, tp)
  	end
  	local g = Duel.SelectReleaseGroup(tp, s.cfilter, 1, 1, nil, ft, tp)
  	Duel.Release(g, REASON_COST)
  end
  function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return e:GetHandler():IsCanBeSpecialSummoned(e, 0, tp, false, false)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, e:GetHandler(), 1, 0, 0)
  end
  function s.spop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	if not c:IsRelateToEffect(e) then
  		return
  	end
  	Duel.SpecialSummon(c, 0, tp, tp, false, false, POS_FACEUP)
  end
  
  
source_text: King
  You can Tribute 1 face-up "Moja" you control to Special Summon this card from your hand or Graveyard. There can only be 1 face-up "King of the Beasts" on the field.
target_text: -- King
  local CARD_ID_0 = 94878265 --Moja
  local s, id, o = GetID()
  function s.initial_effect(c)
  	c:SetUniqueOnField(1, 1, id)
  	--special summon
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
  	e1:SetType(EFFECT_TYPE_IGNITION)
  	e1:SetRange(LOCATION_HAND + LOCATION_GRAVE)
  	e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
  	e1:SetCost(s.spcost)
  	e1:SetTarget(s.sptg)
  	e1:SetOperation(s.spop)
  	c:RegisterEffect(e1)
  end
  function s.cfilter(c, ft, tp)
  	return c:IsFaceup() and c:IsCode(CARD_ID_0) and (ft > 0 or (c:IsControler(tp) and c:GetSequence() < 5))
  end
  function s.spcost(e, tp, eg, ep, ev, re, r, rp, chk)
  	local ft = Duel.GetLocationCount(tp, LOCATION_MZONE)
  	if chk == 0 then
  		return ft > -1 and Duel.CheckReleaseGroup(tp, s.cfilter, 1, nil, ft, tp)
  	end
  	local g = Duel.SelectReleaseGroup(tp, s.cfilter, 1, 1, nil, ft, tp)
  	Duel.Release(g, REASON_COST)
  end
  function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return e:GetHandler():IsCanBeSpecialSummoned(e, 0, tp, false, false)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, e:GetHandler(), 1, 0, 0)
  end
  function s.spop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	if not c:IsRelateToEffect(e) then
  		return
  	end
  	Duel.SpecialSummon(c, 0, tp, tp, false, false, POS_FACEUP)
  end
  
  