name: High
card_text: This card can be used to Ritual Summon any Ritual Monster from your Deck. You must also Tribute Normal Monsters from your hand whose total Levels equal the Level of the Ritual Monster you Ritual Summon. Shuffle that Ritual Monster into the Deck during your opponent's End Phase. You can only activate 1 "High Ritual Art" per turn.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetCountLimit(1, id + EFFECT_COUNT_CODE_OATH)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  end
  function s.matfilter(c)
  	return c:IsType(TYPE_NORMAL) and not c:IsLocation(LOCATION_MZONE)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		local mg = Duel.GetRitualMaterial(tp):Filter(s.matfilter, nil)
  		return Duel.IsExistingMatchingCard(aux.RitualUltimateFilter, tp, LOCATION_DECK, 0, 1, nil, nil, e, tp, mg, nil, Card.GetLevel, "Equal")
  	end
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, LOCATION_DECK)
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	::cancel::
  	local mg = Duel.GetRitualMaterial(tp):Filter(s.matfilter, nil)
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
  	local g = Duel.SelectMatchingCard(tp, aux.RitualUltimateFilter, tp, LOCATION_DECK, 0, 1, 1, nil, nil, e, tp, mg, nil, Card.GetLevel, "Equal")
  	local tc = g:GetFirst()
  	if tc then
  		mg = mg:Filter(Card.IsCanBeRitualMaterial, tc, tc)
  		if tc.mat_filter then
  			mg = mg:Filter(tc.mat_filter, tc, tp)
  		else
  			mg:RemoveCard(tc)
  		end
  		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_RELEASE)
  		aux.GCheckAdditional = aux.RitualCheckAdditional(tc, tc:GetLevel(), "Equal")
  		local mat = mg:SelectSubGroup(tp, aux.RitualCheck, true, 1, tc:GetLevel(), tp, tc, tc:GetLevel(), "Equal")
  		aux.GCheckAdditional = nil
  		if not mat then
  			goto cancel
  		end
  		tc:SetMaterial(mat)
  		Duel.ReleaseRitualMaterial(mat)
  		Duel.BreakEffect()
  		if Duel.SpecialSummonStep(tc, SUMMON_TYPE_RITUAL, tp, tp, false, true, POS_FACEUP) then
  			local fid = e:GetHandler():GetFieldID()
  			tc:RegisterFlagEffect(id, RESET_EVENT + RESETS_STANDARD, 0, 1, fid)
  			local e1 = Effect.CreateEffect(e:GetHandler())
  			e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  			e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
  			e1:SetCode(EVENT_PHASE + PHASE_END)
  			e1:SetCountLimit(1)
  			e1:SetLabel(fid)
  			e1:SetLabelObject(tc)
  			e1:SetCondition(s.tdcon)
  			e1:SetOperation(s.tdop)
  			Duel.RegisterEffect(e1, tp)
  			tc:CompleteProcedure()
  		end
  		Duel.SpecialSummonComplete()
  	end
  end
  function s.tdcon(e, tp, eg, ep, ev, re, r, rp)
  	if Duel.GetTurnPlayer() ~= 1 - tp then
  		return false
  	end
  	local tc = e:GetLabelObject()
  	if tc:GetFlagEffectLabel(id) == e:GetLabel() then
  		return true
  	else
  		e:Reset()
  		return false
  	end
  end
  function s.tdop(e, tp, eg, ep, ev, re, r, rp)
  	local tc = e:GetLabelObject()
  	Duel.SendtoDeck(tc, nil, SEQ_DECKSHUFFLE, REASON_EFFECT)
  end
  
  
source_text: High
  This card can be used to Ritual Summon any Ritual Monster from your Deck. You must also Tribute Normal Monsters from your hand whose total Levels equal the Level of the Ritual Monster you Ritual Summon. Shuffle that Ritual Monster into the Deck during your opponent's End Phase. You can only activate 1 "High Ritual Art" per turn.
target_text: -- High
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetCountLimit(1, id + EFFECT_COUNT_CODE_OATH)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  end
  function s.matfilter(c)
  	return c:IsType(TYPE_NORMAL) and not c:IsLocation(LOCATION_MZONE)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		local mg = Duel.GetRitualMaterial(tp):Filter(s.matfilter, nil)
  		return Duel.IsExistingMatchingCard(aux.RitualUltimateFilter, tp, LOCATION_DECK, 0, 1, nil, nil, e, tp, mg, nil, Card.GetLevel, "Equal")
  	end
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, LOCATION_DECK)
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	::cancel::
  	local mg = Duel.GetRitualMaterial(tp):Filter(s.matfilter, nil)
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
  	local g = Duel.SelectMatchingCard(tp, aux.RitualUltimateFilter, tp, LOCATION_DECK, 0, 1, 1, nil, nil, e, tp, mg, nil, Card.GetLevel, "Equal")
  	local tc = g:GetFirst()
  	if tc then
  		mg = mg:Filter(Card.IsCanBeRitualMaterial, tc, tc)
  		if tc.mat_filter then
  			mg = mg:Filter(tc.mat_filter, tc, tp)
  		else
  			mg:RemoveCard(tc)
  		end
  		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_RELEASE)
  		aux.GCheckAdditional = aux.RitualCheckAdditional(tc, tc:GetLevel(), "Equal")
  		local mat = mg:SelectSubGroup(tp, aux.RitualCheck, true, 1, tc:GetLevel(), tp, tc, tc:GetLevel(), "Equal")
  		aux.GCheckAdditional = nil
  		if not mat then
  			goto cancel
  		end
  		tc:SetMaterial(mat)
  		Duel.ReleaseRitualMaterial(mat)
  		Duel.BreakEffect()
  		if Duel.SpecialSummonStep(tc, SUMMON_TYPE_RITUAL, tp, tp, false, true, POS_FACEUP) then
  			local fid = e:GetHandler():GetFieldID()
  			tc:RegisterFlagEffect(id, RESET_EVENT + RESETS_STANDARD, 0, 1, fid)
  			local e1 = Effect.CreateEffect(e:GetHandler())
  			e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  			e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
  			e1:SetCode(EVENT_PHASE + PHASE_END)
  			e1:SetCountLimit(1)
  			e1:SetLabel(fid)
  			e1:SetLabelObject(tc)
  			e1:SetCondition(s.tdcon)
  			e1:SetOperation(s.tdop)
  			Duel.RegisterEffect(e1, tp)
  			tc:CompleteProcedure()
  		end
  		Duel.SpecialSummonComplete()
  	end
  end
  function s.tdcon(e, tp, eg, ep, ev, re, r, rp)
  	if Duel.GetTurnPlayer() ~= 1 - tp then
  		return false
  	end
  	local tc = e:GetLabelObject()
  	if tc:GetFlagEffectLabel(id) == e:GetLabel() then
  		return true
  	else
  		e:Reset()
  		return false
  	end
  end
  function s.tdop(e, tp, eg, ep, ev, re, r, rp)
  	local tc = e:GetLabelObject()
  	Duel.SendtoDeck(tc, nil, SEQ_DECKSHUFFLE, REASON_EFFECT)
  end
  
  