name: Transcendosaurus
card_text: 1 Tuner + 1+ non-Tuner monsters
  Cannot be destroyed by battle. Dinosaur monsters you control that were Special Summoned from the GY cannot be destroyed by your opponent's card effects, also your opponent cannot target them with card effects. If this card is destroyed: You can shuffle 1 Normal Monster from your GY into the Deck, then you can Special Summon this card. You can only use this effect of "Transcendosaurus Glaciasaurus" once per turn.
lua: local s, id, o = GetID()
  function s.initial_effect(c)
  	--synchro summon
  	aux.AddSynchroProcedure(c, nil, aux.NonTuner(nil), 1)
  	c:EnableReviveLimit()
  	--indes
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
  	e1:SetValue(1)
  	c:RegisterEffect(e1)
  	--cannot be target
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD)
  	e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetTargetRange(LOCATION_MZONE, 0)
  	e2:SetTarget(s.indestg)
  	e2:SetValue(aux.indoval)
  	c:RegisterEffect(e2)
  	local e3 = e2:Clone()
  	e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
  	e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
  	e3:SetValue(aux.tgoval)
  	c:RegisterEffect(e3)
  	--special summon or self
  	local e4 = Effect.CreateEffect(c)
  	e4:SetDescription(aux.Stringid(id, 0))
  	e4:SetCategory(CATEGORY_TODECK + CATEGORY_SPECIAL_SUMMON)
  	e4:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e4:SetProperty(EFFECT_FLAG_DELAY)
  	e4:SetCode(EVENT_DESTROYED)
  	e4:SetCountLimit(1, id)
  	e4:SetTarget(s.tdtg)
  	e4:SetOperation(s.tdop)
  	c:RegisterEffect(e4)
  end
  function s.indestg(e, c)
  	return c:IsRace(RACE_DINOSAUR) and c:IsFaceup() and c:IsSummonLocation(LOCATION_GRAVE)
  end
  function s.tdfilter(c)
  	return c:IsType(TYPE_NORMAL) and c:IsAbleToDeck()
  end
  function s.tdtg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.IsExistingMatchingCard(s.tdfilter, tp, LOCATION_GRAVE, 0, 1, nil)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_TODECK, nil, 1, tp, LOCATION_GRAVE)
  	if e:GetActivateLocation() == LOCATION_GRAVE then
  		e:SetCategory(CATEGORY_TODECK + CATEGORY_SPECIAL_SUMMON + CATEGORY_GRAVE_SPSUMMON)
  	else
  		e:SetCategory(CATEGORY_TODECK + CATEGORY_SPECIAL_SUMMON)
  	end
  end
  function s.tdop(e, tp, eg, ep, ev, re, r, rp)
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TODECK)
  	local g = Duel.SelectMatchingCard(tp, s.tdfilter, tp, LOCATION_GRAVE, 0, 1, 1, nil)
  	if #g > 0 then
  		local c = e:GetHandler()
  		if
  			Duel.SendtoDeck(g, nil, SEQ_DECKSHUFFLE, REASON_EFFECT) > 0
  			and g:FilterCount(Card.IsLocation, nil, LOCATION_DECK) > 0
  			and c:IsRelateToEffect(e)
  			and Duel.GetLocationCount(tp, LOCATION_MZONE) > 0
  			and c:IsCanBeSpecialSummoned(e, 0, tp, false, false)
  			and Duel.SelectYesNo(tp, aux.Stringid(id, 1))
  		then
  			Duel.BreakEffect()
  			Duel.SpecialSummon(c, 0, tp, tp, false, false, POS_FACEUP)
  		end
  	end
  end
  
  
source_text: Transcendosaurus
  1 Tuner + 1+ non-Tuner monsters
  Cannot be destroyed by battle. Dinosaur monsters you control that were Special Summoned from the GY cannot be destroyed by your opponent's card effects, also your opponent cannot target them with card effects. If this card is destroyed: You can shuffle 1 Normal Monster from your GY into the Deck, then you can Special Summon this card. You can only use this effect of "Transcendosaurus Glaciasaurus" once per turn.
target_text: -- Transcendosaurus
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--synchro summon
  	aux.AddSynchroProcedure(c, nil, aux.NonTuner(nil), 1)
  	c:EnableReviveLimit()
  	--indes
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
  	e1:SetRange(LOCATION_MZONE)
  	e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
  	e1:SetValue(1)
  	c:RegisterEffect(e1)
  	--cannot be target
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD)
  	e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetTargetRange(LOCATION_MZONE, 0)
  	e2:SetTarget(s.indestg)
  	e2:SetValue(aux.indoval)
  	c:RegisterEffect(e2)
  	local e3 = e2:Clone()
  	e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
  	e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
  	e3:SetValue(aux.tgoval)
  	c:RegisterEffect(e3)
  	--special summon or self
  	local e4 = Effect.CreateEffect(c)
  	e4:SetDescription(aux.Stringid(id, 0))
  	e4:SetCategory(CATEGORY_TODECK + CATEGORY_SPECIAL_SUMMON)
  	e4:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
  	e4:SetProperty(EFFECT_FLAG_DELAY)
  	e4:SetCode(EVENT_DESTROYED)
  	e4:SetCountLimit(1, id)
  	e4:SetTarget(s.tdtg)
  	e4:SetOperation(s.tdop)
  	c:RegisterEffect(e4)
  end
  function s.indestg(e, c)
  	return c:IsRace(RACE_DINOSAUR) and c:IsFaceup() and c:IsSummonLocation(LOCATION_GRAVE)
  end
  function s.tdfilter(c)
  	return c:IsType(TYPE_NORMAL) and c:IsAbleToDeck()
  end
  function s.tdtg(e, tp, eg, ep, ev, re, r, rp, chk)
  	if chk == 0 then
  		return Duel.IsExistingMatchingCard(s.tdfilter, tp, LOCATION_GRAVE, 0, 1, nil)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_TODECK, nil, 1, tp, LOCATION_GRAVE)
  	if e:GetActivateLocation() == LOCATION_GRAVE then
  		e:SetCategory(CATEGORY_TODECK + CATEGORY_SPECIAL_SUMMON + CATEGORY_GRAVE_SPSUMMON)
  	else
  		e:SetCategory(CATEGORY_TODECK + CATEGORY_SPECIAL_SUMMON)
  	end
  end
  function s.tdop(e, tp, eg, ep, ev, re, r, rp)
  	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TODECK)
  	local g = Duel.SelectMatchingCard(tp, s.tdfilter, tp, LOCATION_GRAVE, 0, 1, 1, nil)
  	if #g > 0 then
  		local c = e:GetHandler()
  		if
  			Duel.SendtoDeck(g, nil, SEQ_DECKSHUFFLE, REASON_EFFECT) > 0
  			and g:FilterCount(Card.IsLocation, nil, LOCATION_DECK) > 0
  			and c:IsRelateToEffect(e)
  			and Duel.GetLocationCount(tp, LOCATION_MZONE) > 0
  			and c:IsCanBeSpecialSummoned(e, 0, tp, false, false)
  			and Duel.SelectYesNo(tp, aux.Stringid(id, 1))
  		then
  			Duel.BreakEffect()
  			Duel.SpecialSummon(c, 0, tp, tp, false, false, POS_FACEUP)
  		end
  	end
  end
  
  