name: Dinoster
card_text: 1 "Dracoslayer" Pendulum Monster + 1 Pendulum Monster
  Must first be Special Summoned (from your Extra Deck) by Tributing the above cards you control. Pendulum Monster Cards in your Monster Zones and Pendulum Zones cannot be destroyed by battle or your opponent's card effects. Once per turn: You can Special Summon 1 "Dracoslayer" Pendulum Monster from your hand or GY, but it cannot be used as a Fusion Material.
external_ids: local SETCARD_ID_0 = 0xc7 --Dracoslayer
  
lua: local SETCARD_ID_0 = 0xc7 --Dracoslayer
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--fusion material
  	c:EnableReviveLimit()
  	aux.AddFusionProcFun2(
  		c,
  		aux.FilterBoolFunction(Card.IsFusionType, TYPE_PENDULUM),
  		aux.AND(aux.FilterBoolFunction(Card.IsFusionType, TYPE_PENDULUM), aux.FilterBoolFunction(Card.IsFusionSetCard, SETCARD_ID_0)),
  		false
  	)
  	aux.AddContactFusionProcedure(c, aux.FilterBoolFunction(Card.IsReleasable, REASON_SPSUMMON), LOCATION_MZONE, 0, Duel.Release, REASON_SPSUMMON + REASON_MATERIAL)
  	--spsummon condition
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
  	e1:SetCode(EFFECT_SPSUMMON_CONDITION)
  	e1:SetValue(s.splimit)
  	c:RegisterEffect(e1)
  	--spsummon
  	local e3 = Effect.CreateEffect(c)
  	e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
  	e3:SetType(EFFECT_TYPE_IGNITION)
  	e3:SetRange(LOCATION_MZONE)
  	e3:SetCountLimit(1)
  	e3:SetTarget(s.sptg)
  	e3:SetOperation(s.spop2)
  	c:RegisterEffect(e3)
  	--indes
  	local e4 = Effect.CreateEffect(c)
  	e4:SetType(EFFECT_TYPE_FIELD)
  	e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
  	e4:SetRange(LOCATION_MZONE)
  	e4:SetTargetRange(LOCATION_MZONE + LOCATION_PZONE, 0)
  	e4:SetTarget(s.indtg)
  	e4:SetValue(1)
  	c:RegisterEffect(e4)
  	local e5 = Effect.CreateEffect(c)
  	e5:SetType(EFFECT_TYPE_FIELD)
  	e5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
  	e5:SetRange(LOCATION_MZONE)
  	e5:SetTargetRange(LOCATION_MZONE + LOCATION_PZONE, 0)
  	e5:SetTarget(s.indtg)
  	e5:SetValue(aux.tgoval)
  	c:RegisterEffect(e5)
  end
  function s.splimit(e, se, sp, st)
  	return e:GetHandler():GetLocation() ~= LOCATION_EXTRA
  end
  function s.spfilter(c, e, tp)
  	return c:IsSetCard(SETCARD_ID_0) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e, 0, tp, false, 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 + LOCATION_GRAVE, 0, 1, nil, e, tp)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, LOCATION_HAND + LOCATION_GRAVE)
  end
  function s.spop2(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, aux.NecroValleyFilter(s.spfilter), tp, LOCATION_HAND + LOCATION_GRAVE, 0, 1, 1, nil, e, tp)
  	local tc = g:GetFirst()
  	if tc then
  		Duel.SpecialSummon(tc, 0, tp, tp, false, false, POS_FACEUP)
  		local e1 = Effect.CreateEffect(e:GetHandler())
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
  		e1:SetValue(1)
  		e1:SetReset(RESET_EVENT + RESETS_STANDARD)
  		tc:RegisterEffect(e1)
  	end
  end
  function s.indtg(e, c)
  	return c:IsType(TYPE_PENDULUM)
  end
  
  
source_text: Dinoster
  1 "Dracoslayer" Pendulum Monster + 1 Pendulum Monster
  Must first be Special Summoned (from your Extra Deck) by Tributing the above cards you control. Pendulum Monster Cards in your Monster Zones and Pendulum Zones cannot be destroyed by battle or your opponent's card effects. Once per turn: You can Special Summon 1 "Dracoslayer" Pendulum Monster from your hand or GY, but it cannot be used as a Fusion Material.
target_text: -- Dinoster
  local SETCARD_ID_0 = 0xc7 --Dracoslayer
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--fusion material
  	c:EnableReviveLimit()
  	aux.AddFusionProcFun2(
  		c,
  		aux.FilterBoolFunction(Card.IsFusionType, TYPE_PENDULUM),
  		aux.AND(aux.FilterBoolFunction(Card.IsFusionType, TYPE_PENDULUM), aux.FilterBoolFunction(Card.IsFusionSetCard, SETCARD_ID_0)),
  		false
  	)
  	aux.AddContactFusionProcedure(c, aux.FilterBoolFunction(Card.IsReleasable, REASON_SPSUMMON), LOCATION_MZONE, 0, Duel.Release, REASON_SPSUMMON + REASON_MATERIAL)
  	--spsummon condition
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
  	e1:SetCode(EFFECT_SPSUMMON_CONDITION)
  	e1:SetValue(s.splimit)
  	c:RegisterEffect(e1)
  	--spsummon
  	local e3 = Effect.CreateEffect(c)
  	e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
  	e3:SetType(EFFECT_TYPE_IGNITION)
  	e3:SetRange(LOCATION_MZONE)
  	e3:SetCountLimit(1)
  	e3:SetTarget(s.sptg)
  	e3:SetOperation(s.spop2)
  	c:RegisterEffect(e3)
  	--indes
  	local e4 = Effect.CreateEffect(c)
  	e4:SetType(EFFECT_TYPE_FIELD)
  	e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
  	e4:SetRange(LOCATION_MZONE)
  	e4:SetTargetRange(LOCATION_MZONE + LOCATION_PZONE, 0)
  	e4:SetTarget(s.indtg)
  	e4:SetValue(1)
  	c:RegisterEffect(e4)
  	local e5 = Effect.CreateEffect(c)
  	e5:SetType(EFFECT_TYPE_FIELD)
  	e5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
  	e5:SetRange(LOCATION_MZONE)
  	e5:SetTargetRange(LOCATION_MZONE + LOCATION_PZONE, 0)
  	e5:SetTarget(s.indtg)
  	e5:SetValue(aux.tgoval)
  	c:RegisterEffect(e5)
  end
  function s.splimit(e, se, sp, st)
  	return e:GetHandler():GetLocation() ~= LOCATION_EXTRA
  end
  function s.spfilter(c, e, tp)
  	return c:IsSetCard(SETCARD_ID_0) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e, 0, tp, false, 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 + LOCATION_GRAVE, 0, 1, nil, e, tp)
  	end
  	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, LOCATION_HAND + LOCATION_GRAVE)
  end
  function s.spop2(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, aux.NecroValleyFilter(s.spfilter), tp, LOCATION_HAND + LOCATION_GRAVE, 0, 1, 1, nil, e, tp)
  	local tc = g:GetFirst()
  	if tc then
  		Duel.SpecialSummon(tc, 0, tp, tp, false, false, POS_FACEUP)
  		local e1 = Effect.CreateEffect(e:GetHandler())
  		e1:SetType(EFFECT_TYPE_SINGLE)
  		e1:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
  		e1:SetValue(1)
  		e1:SetReset(RESET_EVENT + RESETS_STANDARD)
  		tc:RegisterEffect(e1)
  	end
  end
  function s.indtg(e, c)
  	return c:IsType(TYPE_PENDULUM)
  end
  
  