name: Orcust
card_text: You can banish this card from your GY; Special Summon 1 "Orcust" monster from your hand, except "Orcust Brass Bombard", also you cannot Special Summon for the rest of this turn, except DARK monsters. You can only use this effect of "Orcust Brass Bombard" once per turn.
external_ids: local CARD_ID_0 = 90351981 --Orcustrated Babel
  local SETCARD_ID_0 = 0x11b --Orcust
  
lua: local CARD_ID_0 = 90351981 --Orcustrated Babel
  local SETCARD_ID_0 = 0x11b --Orcust
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--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_GRAVE)
  	e1:SetCountLimit(1, id)
  	e1:SetCost(aux.bfgcost)
  	e1:SetCondition(s.spcon1)
  	e1:SetTarget(s.sptg)
  	e1:SetOperation(s.spop)
  	c:RegisterEffect(e1)
  	local e2 = e1:Clone()
  	e2:SetType(EFFECT_TYPE_QUICK_O)
  	e2:SetCode(EVENT_FREE_CHAIN)
  	e2:SetHintTiming(0, TIMING_END_PHASE)
  	e2:SetCondition(s.spcon2)
  	c:RegisterEffect(e2)
  end
  function s.spcon1(e, tp, eg, ep, ev, re, r, rp)
  	return not aux.IsCanBeQuickEffect(e:GetHandler(), tp, CARD_ID_0)
  end
  function s.spcon2(e, tp, eg, ep, ev, re, r, rp)
  	return aux.IsCanBeQuickEffect(e:GetHandler(), tp, CARD_ID_0)
  end
  function s.spfilter(c, e, tp)
  	return c:IsSetCard(SETCARD_ID_0) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e, 0, tp, false, false)
  end
  function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and Duel.IsExistingMatchingCard(s.spfilter, tp, LOCATION_HAND, 0, 1, nil, e, tp)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, LOCATION_HAND)
  end
  function s.spop(e, tp, eg, ep, ev, re, r, rp)
  	if Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 then
  		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
  		local g = Duel.SelectMatchingCard(tp, s.spfilter, tp, LOCATION_HAND, 0, 1, 1, nil, e, tp)
  		if g:GetCount() > 0 then
  			Duel.SpecialSummon(g, 0, tp, tp, false, false, POS_FACEUP)
  		end
  	end
  	local e1 = Effect.CreateEffect(e:GetHandler())
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
  	e1:SetTargetRange(1, 0)
  	e1:SetTarget(s.splimit)
  	e1:SetReset(RESET_PHASE + PHASE_END)
  	Duel.RegisterEffect(e1, tp)
  end
  function s.splimit(e, c)
  	return not c:IsAttribute(ATTRIBUTE_DARK)
  end
  
  
source_text: Orcust
  You can banish this card from your GY; Special Summon 1 "Orcust" monster from your hand, except "Orcust Brass Bombard", also you cannot Special Summon for the rest of this turn, except DARK monsters. You can only use this effect of "Orcust Brass Bombard" once per turn.
target_text: -- Orcust
  local CARD_ID_0 = 90351981 --Orcustrated Babel
  local SETCARD_ID_0 = 0x11b --Orcust
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--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_GRAVE)
  	e1:SetCountLimit(1, id)
  	e1:SetCost(aux.bfgcost)
  	e1:SetCondition(s.spcon1)
  	e1:SetTarget(s.sptg)
  	e1:SetOperation(s.spop)
  	c:RegisterEffect(e1)
  	local e2 = e1:Clone()
  	e2:SetType(EFFECT_TYPE_QUICK_O)
  	e2:SetCode(EVENT_FREE_CHAIN)
  	e2:SetHintTiming(0, TIMING_END_PHASE)
  	e2:SetCondition(s.spcon2)
  	c:RegisterEffect(e2)
  end
  function s.spcon1(e, tp, eg, ep, ev, re, r, rp)
  	return not aux.IsCanBeQuickEffect(e:GetHandler(), tp, CARD_ID_0)
  end
  function s.spcon2(e, tp, eg, ep, ev, re, r, rp)
  	return aux.IsCanBeQuickEffect(e:GetHandler(), tp, CARD_ID_0)
  end
  function s.spfilter(c, e, tp)
  	return c:IsSetCard(SETCARD_ID_0) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e, 0, tp, false, false)
  end
  function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and Duel.IsExistingMatchingCard(s.spfilter, tp, LOCATION_HAND, 0, 1, nil, e, tp)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, LOCATION_HAND)
  end
  function s.spop(e, tp, eg, ep, ev, re, r, rp)
  	if Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 then
  		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
  		local g = Duel.SelectMatchingCard(tp, s.spfilter, tp, LOCATION_HAND, 0, 1, 1, nil, e, tp)
  		if g:GetCount() > 0 then
  			Duel.SpecialSummon(g, 0, tp, tp, false, false, POS_FACEUP)
  		end
  	end
  	local e1 = Effect.CreateEffect(e:GetHandler())
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
  	e1:SetTargetRange(1, 0)
  	e1:SetTarget(s.splimit)
  	e1:SetReset(RESET_PHASE + PHASE_END)
  	Duel.RegisterEffect(e1, tp)
  end
  function s.splimit(e, c)
  	return not c:IsAttribute(ATTRIBUTE_DARK)
  end
  
  