name: Tierra,
card_text: Cannot be Normal Summoned/Set. Must be Special Summoned (from your hand) by shuffling 10 other cards with different names from your hand and/or field into the Deck and/or Extra Deck, and cannot be Special Summoned by other ways. This card's Special Summon cannot be negated. If this card is Special Summoned: Shuffle all cards into the Deck, except this card, from each player's hand, field, Graveyard, and face-up Pendulum Monsters from the Extra Deck. Neither player can activate cards or effects in response to this effect's activation.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	c:EnableReviveLimit()
  	--special summon
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetCode(EFFECT_SPSUMMON_PROC)
  	e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
  	e1:SetRange(LOCATION_HAND)
  	e1:SetCondition(s.spcon)
  	e1:SetTarget(s.sptg)
  	e1:SetOperation(s.spop)
  	c:RegisterEffect(e1)
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_SINGLE)
  	e2:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON)
  	e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
  	c:RegisterEffect(e2)
  	--cannot special summon
  	local e3 = Effect.CreateEffect(c)
  	e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
  	e3:SetType(EFFECT_TYPE_SINGLE)
  	e3:SetCode(EFFECT_SPSUMMON_CONDITION)
  	c:RegisterEffect(e3)
  	--to deck
  	local e4 = Effect.CreateEffect(c)
  	e4:SetDescription(aux.Stringid(id, 0))
  	e4:SetCategory(CATEGORY_TODECK)
  	e4:SetType(EFFECT_TYPE_TRIGGER_F + EFFECT_TYPE_SINGLE)
  	e4:SetCode(EVENT_SPSUMMON_SUCCESS)
  	e4:SetTarget(s.tdtg)
  	e4:SetOperation(s.tdop)
  	c:RegisterEffect(e4)
  end
  function s.spcon(e, c)
  	if c == nil then
  		return true
  	end
  	local tp = c:GetControler()
  	local g = Duel.GetMatchingGroup(Card.IsAbleToDeckOrExtraAsCost, tp, LOCATION_HAND + LOCATION_ONFIELD, 0, c)
  	aux.GCheckAdditional = aux.dncheck
  	local res = g:CheckSubGroup(aux.mzctcheck, 10, 10, tp)
  	aux.GCheckAdditional = nil
  	return res
  end
  function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk, c)
  	local g = Duel.GetMatchingGroup(Card.IsAbleToDeckOrExtraAsCost, tp, LOCATION_HAND + LOCATION_ONFIELD, 0, c)
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TODECK)
  	aux.GCheckAdditional = aux.dncheck
  	local sg = g:SelectSubGroup(tp, aux.mzctcheck, true, 10, 10, tp)
  	aux.GCheckAdditional = nil
  	if sg then
  		sg:KeepAlive()
  		e:SetLabelObject(sg)
  		return true
  	else
  		return false
  	end
  end
  function s.spop(e, tp, eg, ep, ev, re, r, rp, c)
  	local g = e:GetLabelObject()
  	local cg = g:Filter(Card.IsFacedown, nil)
  	if cg:GetCount() > 0 then
  		Duel.ConfirmCards(1 - tp, cg)
  	end
  	Duel.SendtoDeck(g, nil, SEQ_DECKSHUFFLE, REASON_SPSUMMON)
  	g:DeleteGroup()
  end
  function s.tdfilter(c)
  	return (c:IsLocation(0x1e) or (c:IsFaceup() and c:IsType(TYPE_PENDULUM))) and c:IsAbleToDeck()
  end
  function s.tdtg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return true
  	end
  	local g = Duel.GetMatchingGroup(s.tdfilter, tp, 0x5e, 0x5e, e:GetHandler())
  	Duel.SetOperationInfo(0, CATEGORY_TODECK, g, g:GetCount(), 0, 0x5e)
  	Duel.SetChainLimit(aux.FALSE)
  end
  function s.tdop(e, tp, eg, ep, ev, re, r, rp)
  	local g = Duel.GetMatchingGroup(s.tdfilter, tp, 0x5e, 0x5e, aux.ExceptThisCard(e))
  	if aux.NecroValleyNegateCheck(g) then
  		return
  	end
  	Duel.SendtoDeck(g, nil, SEQ_DECKSHUFFLE, REASON_EFFECT)
  end
  
  
source_text: Tierra,
  Cannot be Normal Summoned/Set. Must be Special Summoned (from your hand) by shuffling 10 other cards with different names from your hand and/or field into the Deck and/or Extra Deck, and cannot be Special Summoned by other ways. This card's Special Summon cannot be negated. If this card is Special Summoned: Shuffle all cards into the Deck, except this card, from each player's hand, field, Graveyard, and face-up Pendulum Monsters from the Extra Deck. Neither player can activate cards or effects in response to this effect's activation.
target_text: -- Tierra,
  local s, id, o = GetID()
  function s.initial_effect(c)
  	c:EnableReviveLimit()
  	--special summon
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_FIELD)
  	e1:SetCode(EFFECT_SPSUMMON_PROC)
  	e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
  	e1:SetRange(LOCATION_HAND)
  	e1:SetCondition(s.spcon)
  	e1:SetTarget(s.sptg)
  	e1:SetOperation(s.spop)
  	c:RegisterEffect(e1)
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_SINGLE)
  	e2:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON)
  	e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
  	c:RegisterEffect(e2)
  	--cannot special summon
  	local e3 = Effect.CreateEffect(c)
  	e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
  	e3:SetType(EFFECT_TYPE_SINGLE)
  	e3:SetCode(EFFECT_SPSUMMON_CONDITION)
  	c:RegisterEffect(e3)
  	--to deck
  	local e4 = Effect.CreateEffect(c)
  	e4:SetDescription(aux.Stringid(id, 0))
  	e4:SetCategory(CATEGORY_TODECK)
  	e4:SetType(EFFECT_TYPE_TRIGGER_F + EFFECT_TYPE_SINGLE)
  	e4:SetCode(EVENT_SPSUMMON_SUCCESS)
  	e4:SetTarget(s.tdtg)
  	e4:SetOperation(s.tdop)
  	c:RegisterEffect(e4)
  end
  function s.spcon(e, c)
  	if c == nil then
  		return true
  	end
  	local tp = c:GetControler()
  	local g = Duel.GetMatchingGroup(Card.IsAbleToDeckOrExtraAsCost, tp, LOCATION_HAND + LOCATION_ONFIELD, 0, c)
  	aux.GCheckAdditional = aux.dncheck
  	local res = g:CheckSubGroup(aux.mzctcheck, 10, 10, tp)
  	aux.GCheckAdditional = nil
  	return res
  end
  function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk, c)
  	local g = Duel.GetMatchingGroup(Card.IsAbleToDeckOrExtraAsCost, tp, LOCATION_HAND + LOCATION_ONFIELD, 0, c)
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TODECK)
  	aux.GCheckAdditional = aux.dncheck
  	local sg = g:SelectSubGroup(tp, aux.mzctcheck, true, 10, 10, tp)
  	aux.GCheckAdditional = nil
  	if sg then
  		sg:KeepAlive()
  		e:SetLabelObject(sg)
  		return true
  	else
  		return false
  	end
  end
  function s.spop(e, tp, eg, ep, ev, re, r, rp, c)
  	local g = e:GetLabelObject()
  	local cg = g:Filter(Card.IsFacedown, nil)
  	if cg:GetCount() > 0 then
  		Duel.ConfirmCards(1 - tp, cg)
  	end
  	Duel.SendtoDeck(g, nil, SEQ_DECKSHUFFLE, REASON_SPSUMMON)
  	g:DeleteGroup()
  end
  function s.tdfilter(c)
  	return (c:IsLocation(0x1e) or (c:IsFaceup() and c:IsType(TYPE_PENDULUM))) and c:IsAbleToDeck()
  end
  function s.tdtg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return true
  	end
  	local g = Duel.GetMatchingGroup(s.tdfilter, tp, 0x5e, 0x5e, e:GetHandler())
  	Duel.SetOperationInfo(0, CATEGORY_TODECK, g, g:GetCount(), 0, 0x5e)
  	Duel.SetChainLimit(aux.FALSE)
  end
  function s.tdop(e, tp, eg, ep, ev, re, r, rp)
  	local g = Duel.GetMatchingGroup(s.tdfilter, tp, 0x5e, 0x5e, aux.ExceptThisCard(e))
  	if aux.NecroValleyNegateCheck(g) then
  		return
  	end
  	Duel.SendtoDeck(g, nil, SEQ_DECKSHUFFLE, REASON_EFFECT)
  end
  
  