The
If this card is in your GY: You can discard 1 "Fabled" monster, and if you do, Special Summon this card, but banish it when it leaves the field. You can only use this effect of "The Fabled Abanc" once per turn.
local SETCARD_ID_0 = 0x35 --Fabled

local SETCARD_ID_0 = 0x35 --Fabled
local s, id, o = GetID()
function s.initial_effect(c)
	--spsummon
	local e1 = Effect.CreateEffect(c)
	e1:SetDescription(aux.Stringid(id, 0))
	e1:SetCategory(CATEGORY_SPECIAL_SUMMON + CATEGORY_HANDES)
	e1:SetType(EFFECT_TYPE_IGNITION)
	e1:SetRange(LOCATION_GRAVE)
	e1:SetCountLimit(1, id)
	e1:SetTarget(s.tg)
	e1:SetOperation(s.op)
	c:RegisterEffect(e1)
end
function s.dhfilter(c)
	return c:IsSetCard(SETCARD_ID_0) and c:IsType(TYPE_MONSTER) and c:IsDiscardable()
end
function s.tg(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0
			and Duel.IsExistingMatchingCard(s.dhfilter, tp, LOCATION_HAND, 0, 1, e:GetHandler())
			and e:GetHandler():IsCanBeSpecialSummoned(e, 0, tp, false, false)
	end
	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, e:GetHandler(), 1, 0, 0)
end
function s.op(e, tp, eg, ep, ev, re, r, rp)
	local g = Duel.GetMatchingGroup(s.dhfilter, tp, LOCATION_HAND, 0, nil)
	if #g < 1 then
		return
	end
	if #g == 1 then
		Duel.SendtoGrave(g, REASON_EFFECT + REASON_DISCARD)
	else
		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_DISCARD)
		local sg = g:Select(tp, 1, 1, e:GetHandler())
		Duel.SendtoGrave(sg, REASON_EFFECT + REASON_DISCARD)
	end
	local c = e:GetHandler()
	if c:IsRelateToEffect(e) and Duel.SpecialSummon(c, 0, tp, tp, false, false, POS_FACEUP) then
		local e1 = Effect.CreateEffect(c)
		e1:SetType(EFFECT_TYPE_SINGLE)
		e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
		e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
		e1:SetReset(RESET_EVENT + RESETS_REDIRECT)
		e1:SetValue(LOCATION_REMOVED)
		c:RegisterEffect(e1, true)
	end
end


The
If this card is in your GY: You can discard 1 "Fabled" monster, and if you do, Special Summon this card, but banish it when it leaves the field. You can only use this effect of "The Fabled Abanc" once per turn.
-- The
local SETCARD_ID_0 = 0x35 --Fabled
local s, id, o = GetID()
function s.initial_effect(c)
	--spsummon
	local e1 = Effect.CreateEffect(c)
	e1:SetDescription(aux.Stringid(id, 0))
	e1:SetCategory(CATEGORY_SPECIAL_SUMMON + CATEGORY_HANDES)
	e1:SetType(EFFECT_TYPE_IGNITION)
	e1:SetRange(LOCATION_GRAVE)
	e1:SetCountLimit(1, id)
	e1:SetTarget(s.tg)
	e1:SetOperation(s.op)
	c:RegisterEffect(e1)
end
function s.dhfilter(c)
	return c:IsSetCard(SETCARD_ID_0) and c:IsType(TYPE_MONSTER) and c:IsDiscardable()
end
function s.tg(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0
			and Duel.IsExistingMatchingCard(s.dhfilter, tp, LOCATION_HAND, 0, 1, e:GetHandler())
			and e:GetHandler():IsCanBeSpecialSummoned(e, 0, tp, false, false)
	end
	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, e:GetHandler(), 1, 0, 0)
end
function s.op(e, tp, eg, ep, ev, re, r, rp)
	local g = Duel.GetMatchingGroup(s.dhfilter, tp, LOCATION_HAND, 0, nil)
	if #g < 1 then
		return
	end
	if #g == 1 then
		Duel.SendtoGrave(g, REASON_EFFECT + REASON_DISCARD)
	else
		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_DISCARD)
		local sg = g:Select(tp, 1, 1, e:GetHandler())
		Duel.SendtoGrave(sg, REASON_EFFECT + REASON_DISCARD)
	end
	local c = e:GetHandler()
	if c:IsRelateToEffect(e) and Duel.SpecialSummon(c, 0, tp, tp, false, false, POS_FACEUP) then
		local e1 = Effect.CreateEffect(c)
		e1:SetType(EFFECT_TYPE_SINGLE)
		e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
		e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
		e1:SetReset(RESET_EVENT + RESETS_REDIRECT)
		e1:SetValue(LOCATION_REMOVED)
		c:RegisterEffect(e1, true)
	end
end

