Invoked
"Aleister the Invoker" + 1 LIGHT monster
Once per turn, when a Spell/Trap Card, or monster effect, is activated (Quick Effect): You can send the same type of card (Monster, Spell, or Trap) from your hand to the GY; negate the activation, and if you do, banish that card.
local CARD_ID_0 = 86120751 --Aleister the Invoker

local CARD_ID_0 = 86120751 --Aleister the Invoker
local s, id, o = GetID()
function s.initial_effect(c)
	--fusion material
	c:EnableReviveLimit()
	aux.AddFusionProcCodeFun(c, CARD_ID_0, aux.FilterBoolFunction(Card.IsFusionAttribute, ATTRIBUTE_LIGHT), 1, true, true)
	--negate
	local e1 = Effect.CreateEffect(c)
	e1:SetDescription(aux.Stringid(id, 0))
	e1:SetCategory(CATEGORY_NEGATE + CATEGORY_REMOVE)
	e1:SetType(EFFECT_TYPE_QUICK_O)
	e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP + EFFECT_FLAG_DAMAGE_CAL)
	e1:SetCode(EVENT_CHAINING)
	e1:SetRange(LOCATION_MZONE)
	e1:SetCountLimit(1)
	e1:SetCondition(s.negcon)
	e1:SetCost(s.negcost)
	e1:SetTarget(aux.nbtg)
	e1:SetOperation(s.negop)
	c:RegisterEffect(e1)
end
function s.negcon(e, tp, eg, ep, ev, re, r, rp)
	return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev)
end
function s.cfilter(c, rtype)
	return c:IsType(rtype) and c:IsAbleToGraveAsCost()
end
function s.negcost(e, tp, eg, ep, ev, re, r, rp, chk)
	local rtype = bit.band(re:GetActiveType(), 0x7)
	if chk == 0 then
		return Duel.IsExistingMatchingCard(s.cfilter, tp, LOCATION_HAND, 0, 1, nil, rtype)
	end
	Duel.DiscardHand(tp, s.cfilter, 1, 1, REASON_COST, nil, rtype)
end
function s.negop(e, tp, eg, ep, ev, re, r, rp)
	if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
		Duel.Remove(eg, POS_FACEUP, REASON_EFFECT)
	end
end


Invoked
"Aleister the Invoker" + 1 LIGHT monster
Once per turn, when a Spell/Trap Card, or monster effect, is activated (Quick Effect): You can send the same type of card (Monster, Spell, or Trap) from your hand to the GY; negate the activation, and if you do, banish that card.
-- Invoked
local CARD_ID_0 = 86120751 --Aleister the Invoker
local s, id, o = GetID()
function s.initial_effect(c)
	--fusion material
	c:EnableReviveLimit()
	aux.AddFusionProcCodeFun(c, CARD_ID_0, aux.FilterBoolFunction(Card.IsFusionAttribute, ATTRIBUTE_LIGHT), 1, true, true)
	--negate
	local e1 = Effect.CreateEffect(c)
	e1:SetDescription(aux.Stringid(id, 0))
	e1:SetCategory(CATEGORY_NEGATE + CATEGORY_REMOVE)
	e1:SetType(EFFECT_TYPE_QUICK_O)
	e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP + EFFECT_FLAG_DAMAGE_CAL)
	e1:SetCode(EVENT_CHAINING)
	e1:SetRange(LOCATION_MZONE)
	e1:SetCountLimit(1)
	e1:SetCondition(s.negcon)
	e1:SetCost(s.negcost)
	e1:SetTarget(aux.nbtg)
	e1:SetOperation(s.negop)
	c:RegisterEffect(e1)
end
function s.negcon(e, tp, eg, ep, ev, re, r, rp)
	return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev)
end
function s.cfilter(c, rtype)
	return c:IsType(rtype) and c:IsAbleToGraveAsCost()
end
function s.negcost(e, tp, eg, ep, ev, re, r, rp, chk)
	local rtype = bit.band(re:GetActiveType(), 0x7)
	if chk == 0 then
		return Duel.IsExistingMatchingCard(s.cfilter, tp, LOCATION_HAND, 0, 1, nil, rtype)
	end
	Duel.DiscardHand(tp, s.cfilter, 1, 1, REASON_COST, nil, rtype)
end
function s.negop(e, tp, eg, ep, ev, re, r, rp)
	if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
		Duel.Remove(eg, POS_FACEUP, REASON_EFFECT)
	end
end

