Skip to content

Duel.NegateEffect ​

Signature ​

lua
Duel.NegateEffect(int chainc, [bool forced]) -> bool

Description ​

Attempts to negate the effect of a Chain Link without necessarily negating its activation, and returns true if the effect was successfully negated. Use this for text such as "negate that effect". The optional forced argument requests a forced disable. Use Duel.NegateActivation for activation negation and Duel.NegateSummon for Summon negation; those are different game events.

How To Use It ​

Use this during resolution for effects that negate the effect of a Chain Link without treating the activation as negated.

lua
if Duel.NegateEffect(ev) then
    -- follow-up that requires the effect to be negated
end

The optional forced argument is passed to the core disable-chain check. Activation-negation cards should usually use Duel.NegateActivation instead.

Parameters ​

  • chainc int - Chain Link number whose effect should be negated.
  • forced bool optional - Optional forced-disable request.

Returns ​

  • bool - true if the Chain Link's effect was negated; false if it cannot be negated or the negation fails.

Source ​

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

Guided Examples ​

Learn how to use this function in context:

Used By ​

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

  • Detected in 272 indexed script(s).
  • Search this function in the Script Explorer with Duel.NegateEffect.
CardIDScriptDetected Calls
Enneacraft - Asta.PIXEA28454232Scripts/c28454232.lua1
W:P Fancy Ball4993187Scripts/c4993187.lua1
Awakening of the Sacred Beasts53701259Scripts/c53701259.lua1
Zoroa, the Magistus Verethragna37260677Scripts/c37260677.lua1
Nervedo the Shadebeast Power Patron17473466Scripts/c17473466.lua1
Beyond the Pendulum22125101Scripts/c22125101.lua1
Number 38: Hope Harbinger Dragon Titanic Galaxy63767246Scripts/c63767246.lua1
Shimmering Shatterer of the Sacred Beasts3441553Scripts/c3441553.lua1
Supply Soldier of the Indestructible Insects23738096Scripts/c23738096.lua1
Millennium-Eyes Restrict41578483Scripts/c41578483.lua1
Tensei Ryu-Ge Anva56322832Scripts/c56322832.lua1
Gilti-Gearfried the Magical Steel Knight49161188Scripts/c49161188.lua1
Mind Scan34298391Scripts/c34298391.lua1
D/D/D Duo-Dawn King Kali Yuga15939229Scripts/c15939229.lua1
Solfachord Solfegia84693918Scripts/c84693918.lua1
Horoscope Sorcerer, the Stargazer Magician1186447Scripts/c1186447.lua1
Odd-Eyes Pendulumgraph Dragon66425726Scripts/c66425726.lua1
Dinomist Rex63251695Scripts/c63251695.lua1
Cubic Mandala8837932Scripts/c8837932.lua1
Arrow of Regulus60439482Scripts/c60439482.lua1
PenduLuMoon66150724Scripts/c66150724.lua1
Penguin Sword69792699Scripts/c69792699.lua1
Parasite Paranoid14457896Scripts/c14457896.lua1
Volcanic Inferno84138874Scripts/c84138874.lua1
...and 248 more

Script Examples ​

Enneacraft - Asta.PIXEA (28454232) ​

Source: Scripts/c28454232.lua

lua
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
	if Duel.NegateEffect(ev)
		and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil,POS_FACEDOWN)
		and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then

W:P Fancy Ball (4993187) ​

Source: Scripts/c4993187.lua

lua
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
	if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToChain(ev) then
		Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
	end

Awakening of the Sacred Beasts (53701259) ​

Source: Scripts/c53701259.lua

lua
end
function c53701259.disop(e,tp,eg,ep,ev,re,r,rp)
	Duel.NegateEffect(ev)
end
function c53701259.rmtg(e,c)