name: Evigishki
card_text: You can Ritual Summon this card with any "Gishki" Ritual Spell Card. When this card is Ritual Summoned: Look at up to 2 random cards in your opponent's hand, then shuffle 1 of them into the Deck.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	c:EnableReviveLimit()
  	--confirm
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_TODECK)
  	e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_F)
  	e1:SetCode(EVENT_SPSUMMON_SUCCESS)
  	e1:SetCondition(s.condition)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.operation)
  	c:RegisterEffect(e1)
  end
  function s.condition(e, tp, eg, ep, ev, re, r, rp)
  	return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return true
  	end
  	Duel.SetOperationInfo(0, CATEGORY_TODECK, nil, 1, 0, LOCATION_HAND)
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	local ct = Duel.GetFieldGroupCount(tp, 0, LOCATION_HAND)
  	if ct == 0 then
  		return
  	end
  	local ac = 1
  	if ct > 1 then
  		Duel.Hint(HINT_SELECTMSG, tp, aux.Stringid(id, 1))
  		ac = Duel.AnnounceNumber(tp, 1, 2)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_CONFIRM)
  	local g = Duel.GetFieldGroup(tp, 0, LOCATION_HAND):RandomSelect(tp, ac)
  	Duel.ConfirmCards(tp, g)
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TODECK)
  	local sg = g:Select(tp, 1, 1, nil)
  	Duel.SendtoDeck(sg, nil, SEQ_DECKSHUFFLE, REASON_EFFECT)
  	Duel.ShuffleHand(1 - tp)
  end
  
  
source_text: Evigishki
  You can Ritual Summon this card with any "Gishki" Ritual Spell Card. When this card is Ritual Summoned: Look at up to 2 random cards in your opponent's hand, then shuffle 1 of them into the Deck.
target_text: -- Evigishki
  local s, id, o = GetID()
  function s.initial_effect(c)
  	c:EnableReviveLimit()
  	--confirm
  	local e1 = Effect.CreateEffect(c)
  	e1:SetDescription(aux.Stringid(id, 0))
  	e1:SetCategory(CATEGORY_TODECK)
  	e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_F)
  	e1:SetCode(EVENT_SPSUMMON_SUCCESS)
  	e1:SetCondition(s.condition)
  	e1:SetTarget(s.target)
  	e1:SetOperation(s.operation)
  	c:RegisterEffect(e1)
  end
  function s.condition(e, tp, eg, ep, ev, re, r, rp)
  	return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
  end
  function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return true
  	end
  	Duel.SetOperationInfo(0, CATEGORY_TODECK, nil, 1, 0, LOCATION_HAND)
  end
  function s.operation(e, tp, eg, ep, ev, re, r, rp)
  	local ct = Duel.GetFieldGroupCount(tp, 0, LOCATION_HAND)
  	if ct == 0 then
  		return
  	end
  	local ac = 1
  	if ct > 1 then
  		Duel.Hint(HINT_SELECTMSG, tp, aux.Stringid(id, 1))
  		ac = Duel.AnnounceNumber(tp, 1, 2)
  	end
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_CONFIRM)
  	local g = Duel.GetFieldGroup(tp, 0, LOCATION_HAND):RandomSelect(tp, ac)
  	Duel.ConfirmCards(tp, g)
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TODECK)
  	local sg = g:Select(tp, 1, 1, nil)
  	Duel.SendtoDeck(sg, nil, SEQ_DECKSHUFFLE, REASON_EFFECT)
  	Duel.ShuffleHand(1 - tp)
  end
  
  