The
Send 1 "Darklord" monster from your hand or face-up from your field to the GY; negate the effects of 1 Effect Monster on the field until the end of this turn, and if you do, gain LP equal to its ATK. You can only activate 1 "The Sanctified Darklord" per turn.
local SETCARD_ID_0 = 0xef --Darklord

local SETCARD_ID_0 = 0xef --Darklord
local s, id, o = GetID()
function s.initial_effect(c)
	--Activate
	local e1 = Effect.CreateEffect(c)
	e1:SetCategory(CATEGORY_DISABLE + CATEGORY_RECOVER)
	e1:SetType(EFFECT_TYPE_ACTIVATE)
	e1:SetCode(EVENT_FREE_CHAIN)
	e1:SetCountLimit(1, id + EFFECT_COUNT_CODE_OATH)
	e1:SetCost(s.cost)
	e1:SetTarget(s.target)
	e1:SetOperation(s.activate)
	c:RegisterEffect(e1)
end
function s.costfilter(c)
	return c:IsSetCard(SETCARD_ID_0)
		and c:IsType(TYPE_MONSTER)
		and (c:IsLocation(LOCATION_HAND) or c:IsFaceup())
		and c:IsAbleToGraveAsCost()
		and Duel.IsExistingMatchingCard(aux.NegateEffectMonsterFilter, 0, LOCATION_MZONE, LOCATION_MZONE, 1, c)
end
function s.cost(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return Duel.IsExistingMatchingCard(s.costfilter, tp, LOCATION_HAND + LOCATION_MZONE, 0, 1, nil)
	end
	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TOGRAVE)
	local g = Duel.SelectMatchingCard(tp, s.costfilter, tp, LOCATION_HAND + LOCATION_MZONE, 0, 1, 1, nil)
	Duel.SendtoGrave(g, REASON_COST)
end
function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return Duel.IsExistingMatchingCard(aux.NegateEffectMonsterFilter, tp, LOCATION_MZONE, LOCATION_MZONE, 1, nil)
	end
	Duel.SetOperationInfo(0, CATEGORY_DISABLE, nil, 1, 0, 0)
end
function s.activate(e, tp, eg, ep, ev, re, r, rp)
	local exc = nil
	if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
		exc = e:GetHandler()
	end
	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_DISABLE)
	local g = Duel.SelectMatchingCard(tp, aux.NegateEffectMonsterFilter, tp, LOCATION_MZONE, LOCATION_MZONE, 1, 1, exc)
	local tc = g:GetFirst()
	if tc and not tc:IsImmuneToEffect(e) then
		Duel.NegateRelatedChain(tc, RESET_TURN_SET)
		local e1 = Effect.CreateEffect(e:GetHandler())
		e1:SetType(EFFECT_TYPE_SINGLE)
		e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
		e1:SetCode(EFFECT_DISABLE)
		e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END)
		tc:RegisterEffect(e1)
		local e2 = Effect.CreateEffect(e:GetHandler())
		e2:SetType(EFFECT_TYPE_SINGLE)
		e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
		e2:SetCode(EFFECT_DISABLE_EFFECT)
		e2:SetValue(RESET_TURN_SET)
		e2:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END)
		tc:RegisterEffect(e2)
		Duel.AdjustInstantly(tc)
		local atk = tc:GetAttack()
		if atk > 0 then
			Duel.Recover(tp, atk, REASON_EFFECT)
		end
	end
end


The
Send 1 "Darklord" monster from your hand or face-up from your field to the GY; negate the effects of 1 Effect Monster on the field until the end of this turn, and if you do, gain LP equal to its ATK. You can only activate 1 "The Sanctified Darklord" per turn.
-- The
local SETCARD_ID_0 = 0xef --Darklord
local s, id, o = GetID()
function s.initial_effect(c)
	--Activate
	local e1 = Effect.CreateEffect(c)
	e1:SetCategory(CATEGORY_DISABLE + CATEGORY_RECOVER)
	e1:SetType(EFFECT_TYPE_ACTIVATE)
	e1:SetCode(EVENT_FREE_CHAIN)
	e1:SetCountLimit(1, id + EFFECT_COUNT_CODE_OATH)
	e1:SetCost(s.cost)
	e1:SetTarget(s.target)
	e1:SetOperation(s.activate)
	c:RegisterEffect(e1)
end
function s.costfilter(c)
	return c:IsSetCard(SETCARD_ID_0)
		and c:IsType(TYPE_MONSTER)
		and (c:IsLocation(LOCATION_HAND) or c:IsFaceup())
		and c:IsAbleToGraveAsCost()
		and Duel.IsExistingMatchingCard(aux.NegateEffectMonsterFilter, 0, LOCATION_MZONE, LOCATION_MZONE, 1, c)
end
function s.cost(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return Duel.IsExistingMatchingCard(s.costfilter, tp, LOCATION_HAND + LOCATION_MZONE, 0, 1, nil)
	end
	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TOGRAVE)
	local g = Duel.SelectMatchingCard(tp, s.costfilter, tp, LOCATION_HAND + LOCATION_MZONE, 0, 1, 1, nil)
	Duel.SendtoGrave(g, REASON_COST)
end
function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return Duel.IsExistingMatchingCard(aux.NegateEffectMonsterFilter, tp, LOCATION_MZONE, LOCATION_MZONE, 1, nil)
	end
	Duel.SetOperationInfo(0, CATEGORY_DISABLE, nil, 1, 0, 0)
end
function s.activate(e, tp, eg, ep, ev, re, r, rp)
	local exc = nil
	if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
		exc = e:GetHandler()
	end
	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_DISABLE)
	local g = Duel.SelectMatchingCard(tp, aux.NegateEffectMonsterFilter, tp, LOCATION_MZONE, LOCATION_MZONE, 1, 1, exc)
	local tc = g:GetFirst()
	if tc and not tc:IsImmuneToEffect(e) then
		Duel.NegateRelatedChain(tc, RESET_TURN_SET)
		local e1 = Effect.CreateEffect(e:GetHandler())
		e1:SetType(EFFECT_TYPE_SINGLE)
		e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
		e1:SetCode(EFFECT_DISABLE)
		e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END)
		tc:RegisterEffect(e1)
		local e2 = Effect.CreateEffect(e:GetHandler())
		e2:SetType(EFFECT_TYPE_SINGLE)
		e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
		e2:SetCode(EFFECT_DISABLE_EFFECT)
		e2:SetValue(RESET_TURN_SET)
		e2:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END)
		tc:RegisterEffect(e2)
		Duel.AdjustInstantly(tc)
		local atk = tc:GetAttack()
		if atk > 0 then
			Duel.Recover(tp, atk, REASON_EFFECT)
		end
	end
end

