name: Super
card_text: This card can be used to Ritual Summon any "Black Luster Soldier" Ritual Monster. You must also Tribute monsters from your hand or field whose total Levels exactly equal 8. During your Main Phase, except the turn this card was sent to the GY: You can banish this card, 1 LIGHT monster, and 1 DARK monster from your GY; Special Summon 1 "Black Luster Soldier" Ritual Monster from your hand, ignoring its Summoning conditions. You can only use this effect of "Super Soldier Ritual" once per turn.
external_ids: local SETCARD_ID_0 = 0x10cf --Black
  
lua: local SETCARD_ID_0 = 0x10cf --Black
  local s, id, o = GetID()
  function s.initial_effect(c)
  	aux.AddRitualProcEqual(c, s.ritual_filter)
  	--spsummon
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
  	e1:SetType(EFFECT_TYPE_IGNITION)
  	e1:SetRange(LOCATION_GRAVE)
  	e1:SetCountLimit(1, id)
  	e1:SetCondition(aux.exccon)
  	e1:SetCost(s.spcost)
  	e1:SetTarget(s.sptg)
  	e1:SetOperation(s.spop)
  	c:RegisterEffect(e1)
  end
  function s.ritual_filter(c)
  	return c:IsType(TYPE_RITUAL) and c:IsSetCard(SETCARD_ID_0)
  end
  function s.cfilter(c, att)
  	return c:IsAttribute(att) and c:IsAbleToRemoveAsCost()
  end
  function s.spcost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return e:GetHandler():IsAbleToRemoveAsCost()
  			and Duel.IsExistingMatchingCard(s.cfilter, tp, LOCATION_GRAVE, 0, 1, nil, ATTRIBUTE_LIGHT)
  			and Duel.IsExistingMatchingCard(s.cfilter, tp, LOCATION_GRAVE, 0, 1, nil, ATTRIBUTE_DARK)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_REMOVE)
  	local g1 = Duel.SelectMatchingCard(tp, s.cfilter, tp, LOCATION_GRAVE, 0, 1, 1, nil, ATTRIBUTE_LIGHT)
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_REMOVE)
  	local g2 = Duel.SelectMatchingCard(tp, s.cfilter, tp, LOCATION_GRAVE, 0, 1, 1, nil, ATTRIBUTE_DARK)
  	g1:Merge(g2)
  	g1:AddCard(e:GetHandler())
  	Duel.Remove(g1, POS_FACEUP, REASON_COST)
  end
  function s.spfilter(c, e, tp)
  	return c:IsSetCard(SETCARD_ID_0) and c:IsType(TYPE_RITUAL) and c:IsCanBeSpecialSummoned(e, 0, tp, true, 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
  		return
  	end
  	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, true, false, POS_FACEUP)
  	end
  end
  
  
source_text: Super
  This card can be used to Ritual Summon any "Black Luster Soldier" Ritual Monster. You must also Tribute monsters from your hand or field whose total Levels exactly equal 8. During your Main Phase, except the turn this card was sent to the GY: You can banish this card, 1 LIGHT monster, and 1 DARK monster from your GY; Special Summon 1 "Black Luster Soldier" Ritual Monster from your hand, ignoring its Summoning conditions. You can only use this effect of "Super Soldier Ritual" once per turn.
target_text: -- Super
  local SETCARD_ID_0 = 0x10cf --Black
  local s, id, o = GetID()
  function s.initial_effect(c)
  	aux.AddRitualProcEqual(c, s.ritual_filter)
  	--spsummon
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
  	e1:SetType(EFFECT_TYPE_IGNITION)
  	e1:SetRange(LOCATION_GRAVE)
  	e1:SetCountLimit(1, id)
  	e1:SetCondition(aux.exccon)
  	e1:SetCost(s.spcost)
  	e1:SetTarget(s.sptg)
  	e1:SetOperation(s.spop)
  	c:RegisterEffect(e1)
  end
  function s.ritual_filter(c)
  	return c:IsType(TYPE_RITUAL) and c:IsSetCard(SETCARD_ID_0)
  end
  function s.cfilter(c, att)
  	return c:IsAttribute(att) and c:IsAbleToRemoveAsCost()
  end
  function s.spcost(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return e:GetHandler():IsAbleToRemoveAsCost()
  			and Duel.IsExistingMatchingCard(s.cfilter, tp, LOCATION_GRAVE, 0, 1, nil, ATTRIBUTE_LIGHT)
  			and Duel.IsExistingMatchingCard(s.cfilter, tp, LOCATION_GRAVE, 0, 1, nil, ATTRIBUTE_DARK)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_REMOVE)
  	local g1 = Duel.SelectMatchingCard(tp, s.cfilter, tp, LOCATION_GRAVE, 0, 1, 1, nil, ATTRIBUTE_LIGHT)
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_REMOVE)
  	local g2 = Duel.SelectMatchingCard(tp, s.cfilter, tp, LOCATION_GRAVE, 0, 1, 1, nil, ATTRIBUTE_DARK)
  	g1:Merge(g2)
  	g1:AddCard(e:GetHandler())
  	Duel.Remove(g1, POS_FACEUP, REASON_COST)
  end
  function s.spfilter(c, e, tp)
  	return c:IsSetCard(SETCARD_ID_0) and c:IsType(TYPE_RITUAL) and c:IsCanBeSpecialSummoned(e, 0, tp, true, 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
  		return
  	end
  	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, true, false, POS_FACEUP)
  	end
  end
  
  