Skip to content

Duel.NegateActivation ​

Signature ​

lua
Duel.NegateActivation(int chainc) -> bool

Description ​

Attempts to negate the activation of a Chain Link and returns true only if the activation was successfully negated. Use it in a resolving negation operation after checking activation legality, commonly with Duel.IsChainNegatable. Gate follow-up actions such as destroy, banish, or send to the GY behind the boolean return. Use Duel.NegateEffect for "negate that effect" text where the activation itself is not negated.

How To Use It ​

Use this during resolution for effects that negate the activation of a Chain Link.

lua
if Duel.NegateActivation(ev) then
    Duel.Destroy(rc,REASON_EFFECT)
end

Gate follow-up actions behind the boolean return. Use Duel.NegateEffect when the effect is negated but the activation itself is not.

Parameters ​

  • chainc int - Chain Link number to negate, commonly ev in an EVENT_CHAINING operation.

Returns ​

  • bool - true if the activation was negated; false if the Chain Link cannot be negated or the negation fails.

Source ​

  • D:\Programs\GitHub\ygopro-core\libduel.cpp:4929

Guided Examples ​

Learn how to use this function in context:

Used By ​

Generated from the local Scripts/ folder and cards.cdb.

  • Detected in 391 indexed script(s).
  • Search this function in the Script Explorer with Duel.NegateActivation.
CardIDScriptDetected Calls
Enneacraft - Atil.SPIA71801447Scripts/c71801447.lua1
Shooting Majestic Star Dragon40939228Scripts/c40939228.lua1
Red-Eyes Slash Dragon21140872Scripts/c21140872.lua1
A-to-Z-Dragon Buster Cannon65172015Scripts/c65172015.lua1
Frightfur March74416026Scripts/c74416026.lua1
Enneacraft - Atori.MAR54842941Scripts/c54842941.lua1
Dragon Master Magia12381100Scripts/c12381100.lua1
Ursarctic Grand Chariot80086070Scripts/c80086070.lua1
Endymion, the Mighty Master of Magic3611830Scripts/c3611830.lua1
Arms of Genex Return Zero61775475Scripts/c61775475.lua1
Emperor Charles the Great97864322Scripts/c97864322.lua1
Toadally Awesome90809975Scripts/c90809975.lua1
All-Eyes Phantom Dragon70335319Scripts/c70335319.lua1
Arcana Force EX - The Light Ruler5861892Scripts/c5861892.lua1
Drytron Meteonis DA Draconids56863746Scripts/c56863746.lua1
Machina Ruinforce46033517Scripts/c46033517.lua1
Loki, Lord of the Aesir67098114Scripts/c67098114.lua1
Fire King Avatar Arvata18621798Scripts/c18621798.lua1
Immortal Phoenix Gearfried22091647Scripts/c22091647.lua1
PSY-Framegear Gamma38814750Scripts/c38814750.lua1
PSY-Framegear Delta74203495Scripts/c74203495.lua1
PSY-Framegear Epsilon1697104Scripts/c1697104.lua1
Red-Eyes Dark Dragoon37818794Scripts/c37818794.lua1
Whisker Blitzclique85523502Scripts/c85523502.lua1
...and 367 more

Script Examples ​

Enneacraft - Atil.SPIA (71801447) ​

Source: Scripts/c71801447.lua

lua
	for i=1,ev do
		local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
		if tgp~=tp and Duel.NegateActivation(i) then
			local tc=te:GetHandler()
			if tc:IsRelateToEffect(e) and tc:IsRelateToChain(i) then

Shooting Majestic Star Dragon (40939228) ​

Source: Scripts/c40939228.lua

lua
			Duel.RegisterEffect(e1,tp)
		end
		if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
			Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
		end

Red-Eyes Slash Dragon (21140872) ​

Source: Scripts/c21140872.lua

lua
end
function c21140872.ngop(e,tp,eg,ep,ev,re,r,rp)
	if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
		Duel.Destroy(eg,REASON_EFFECT)
	end