Draghig,
If you control a monster that is not a "Burning Abyss" monster, destroy this card. You can only use 1 of these effects of "Draghig, Malebranche of the Burning Abyss" per turn, and only once that turn.
● If you control no Spell/Trap Cards: You can Special Summon this card from your hand.
● If this card is sent to the Graveyard: You can choose 1 "Burning Abyss" card from your Deck and place it on top of your Deck.
local SETCARD_ID_0 = 0xb1 --Burning

local SETCARD_ID_0 = 0xb1 --Burning
local s, id, o = GetID()
function s.initial_effect(c)
	--self destroy
	local e1 = Effect.CreateEffect(c)
	e1:SetType(EFFECT_TYPE_SINGLE)
	e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
	e1:SetRange(LOCATION_MZONE)
	e1:SetCode(EFFECT_SELF_DESTROY)
	e1:SetCondition(s.sdcon)
	c:RegisterEffect(e1)
	--Special Summon
	local e2 = Effect.CreateEffect(c)
	e2:SetDescription(aux.Stringid(id, 0))
	e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
	e2:SetType(EFFECT_TYPE_IGNITION)
	e2:SetRange(LOCATION_HAND)
	e2:SetCountLimit(1, id)
	e2:SetCondition(s.sscon)
	e2:SetTarget(s.sstg)
	e2:SetOperation(s.ssop)
	c:RegisterEffect(e2)
	--to deck top
	local e3 = Effect.CreateEffect(c)
	e3:SetDescription(aux.Stringid(id, 1))
	e3:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
	e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP + EFFECT_FLAG_DELAY)
	e3:SetCode(EVENT_TO_GRAVE)
	e3:SetCountLimit(1, id)
	e3:SetTarget(s.dttg)
	e3:SetOperation(s.dtop)
	c:RegisterEffect(e3)
end
function s.sdfilter(c)
	return c:IsFacedown() or not c:IsSetCard(SETCARD_ID_0)
end
function s.sdcon(e)
	return Duel.IsExistingMatchingCard(s.sdfilter, e:GetHandlerPlayer(), LOCATION_MZONE, 0, 1, nil)
end
function s.filter(c)
	return c:IsType(TYPE_SPELL + TYPE_TRAP)
end
function s.sscon(e, tp, eg, ep, ev, re, r, rp)
	return not Duel.IsExistingMatchingCard(s.filter, tp, LOCATION_ONFIELD, 0, 1, nil)
end
function s.sstg(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and e:GetHandler():IsCanBeSpecialSummoned(e, 0, tp, false, false)
	end
	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, e:GetHandler(), 1, 0, 0)
end
function s.ssop(e, tp, eg, ep, ev, re, r, rp)
	local c = e:GetHandler()
	if not c:IsRelateToEffect(e) then
		return
	end
	Duel.SpecialSummon(c, 0, tp, tp, false, false, POS_FACEUP)
end
function s.dttg(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return Duel.IsExistingMatchingCard(Card.IsSetCard, tp, LOCATION_DECK, 0, 1, nil, 0xb1)
	end
end
function s.dtop(e, tp, eg, ep, ev, re, r, rp)
	Duel.Hint(HINT_SELECTMSG, tp, aux.Stringid(id, 2))
	local g = Duel.SelectMatchingCard(tp, Card.IsSetCard, tp, LOCATION_DECK, 0, 1, 1, nil, 0xb1)
	local tc = g:GetFirst()
	if tc then
		Duel.ShuffleDeck(tp)
		Duel.MoveSequence(tc, SEQ_DECKTOP)
		Duel.ConfirmDecktop(tp, 1)
	end
end


Draghig,
If you control a monster that is not a "Burning Abyss" monster, destroy this card. You can only use 1 of these effects of "Draghig, Malebranche of the Burning Abyss" per turn, and only once that turn.
● If you control no Spell/Trap Cards: You can Special Summon this card from your hand.
● If this card is sent to the Graveyard: You can choose 1 "Burning Abyss" card from your Deck and place it on top of your Deck.
-- Draghig,
local SETCARD_ID_0 = 0xb1 --Burning
local s, id, o = GetID()
function s.initial_effect(c)
	--self destroy
	local e1 = Effect.CreateEffect(c)
	e1:SetType(EFFECT_TYPE_SINGLE)
	e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
	e1:SetRange(LOCATION_MZONE)
	e1:SetCode(EFFECT_SELF_DESTROY)
	e1:SetCondition(s.sdcon)
	c:RegisterEffect(e1)
	--Special Summon
	local e2 = Effect.CreateEffect(c)
	e2:SetDescription(aux.Stringid(id, 0))
	e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
	e2:SetType(EFFECT_TYPE_IGNITION)
	e2:SetRange(LOCATION_HAND)
	e2:SetCountLimit(1, id)
	e2:SetCondition(s.sscon)
	e2:SetTarget(s.sstg)
	e2:SetOperation(s.ssop)
	c:RegisterEffect(e2)
	--to deck top
	local e3 = Effect.CreateEffect(c)
	e3:SetDescription(aux.Stringid(id, 1))
	e3:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
	e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP + EFFECT_FLAG_DELAY)
	e3:SetCode(EVENT_TO_GRAVE)
	e3:SetCountLimit(1, id)
	e3:SetTarget(s.dttg)
	e3:SetOperation(s.dtop)
	c:RegisterEffect(e3)
end
function s.sdfilter(c)
	return c:IsFacedown() or not c:IsSetCard(SETCARD_ID_0)
end
function s.sdcon(e)
	return Duel.IsExistingMatchingCard(s.sdfilter, e:GetHandlerPlayer(), LOCATION_MZONE, 0, 1, nil)
end
function s.filter(c)
	return c:IsType(TYPE_SPELL + TYPE_TRAP)
end
function s.sscon(e, tp, eg, ep, ev, re, r, rp)
	return not Duel.IsExistingMatchingCard(s.filter, tp, LOCATION_ONFIELD, 0, 1, nil)
end
function s.sstg(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and e:GetHandler():IsCanBeSpecialSummoned(e, 0, tp, false, false)
	end
	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, e:GetHandler(), 1, 0, 0)
end
function s.ssop(e, tp, eg, ep, ev, re, r, rp)
	local c = e:GetHandler()
	if not c:IsRelateToEffect(e) then
		return
	end
	Duel.SpecialSummon(c, 0, tp, tp, false, false, POS_FACEUP)
end
function s.dttg(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return Duel.IsExistingMatchingCard(Card.IsSetCard, tp, LOCATION_DECK, 0, 1, nil, 0xb1)
	end
end
function s.dtop(e, tp, eg, ep, ev, re, r, rp)
	Duel.Hint(HINT_SELECTMSG, tp, aux.Stringid(id, 2))
	local g = Duel.SelectMatchingCard(tp, Card.IsSetCard, tp, LOCATION_DECK, 0, 1, 1, nil, 0xb1)
	local tc = g:GetFirst()
	if tc then
		Duel.ShuffleDeck(tp)
		Duel.MoveSequence(tc, SEQ_DECKTOP)
		Duel.ConfirmDecktop(tp, 1)
	end
end

