Duel.NegateActivation
Signature
Duel.NegateActivation(int chainc) -> boolDescription
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.
if Duel.NegateActivation(ev) then
Duel.Destroy(rc,REASON_EFFECT)
endGate follow-up actions behind the boolean return. Use Duel.NegateEffect when the effect is negated but the activation itself is not.
Related Functions
Parameters
chaincint- 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:
- Methods for Affecting Cards
- Chain Timing And Activation Windows
- Common Script Errors And Debugging
- Counter Traps
- Negation And Immunity
- Trap Card Patterns
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.
| Card | ID | Script | Detected Calls |
|---|---|---|---|
| Enneacraft - Atil.SPIA | 71801447 | Scripts/c71801447.lua | 1 |
| Shooting Majestic Star Dragon | 40939228 | Scripts/c40939228.lua | 1 |
| Red-Eyes Slash Dragon | 21140872 | Scripts/c21140872.lua | 1 |
| A-to-Z-Dragon Buster Cannon | 65172015 | Scripts/c65172015.lua | 1 |
| Frightfur March | 74416026 | Scripts/c74416026.lua | 1 |
| Enneacraft - Atori.MAR | 54842941 | Scripts/c54842941.lua | 1 |
| Dragon Master Magia | 12381100 | Scripts/c12381100.lua | 1 |
| Ursarctic Grand Chariot | 80086070 | Scripts/c80086070.lua | 1 |
| Endymion, the Mighty Master of Magic | 3611830 | Scripts/c3611830.lua | 1 |
| Arms of Genex Return Zero | 61775475 | Scripts/c61775475.lua | 1 |
| Emperor Charles the Great | 97864322 | Scripts/c97864322.lua | 1 |
| Toadally Awesome | 90809975 | Scripts/c90809975.lua | 1 |
| All-Eyes Phantom Dragon | 70335319 | Scripts/c70335319.lua | 1 |
| Arcana Force EX - The Light Ruler | 5861892 | Scripts/c5861892.lua | 1 |
| Drytron Meteonis DA Draconids | 56863746 | Scripts/c56863746.lua | 1 |
| Machina Ruinforce | 46033517 | Scripts/c46033517.lua | 1 |
| Loki, Lord of the Aesir | 67098114 | Scripts/c67098114.lua | 1 |
| Fire King Avatar Arvata | 18621798 | Scripts/c18621798.lua | 1 |
| Immortal Phoenix Gearfried | 22091647 | Scripts/c22091647.lua | 1 |
| PSY-Framegear Gamma | 38814750 | Scripts/c38814750.lua | 1 |
| PSY-Framegear Delta | 74203495 | Scripts/c74203495.lua | 1 |
| PSY-Framegear Epsilon | 1697104 | Scripts/c1697104.lua | 1 |
| Red-Eyes Dark Dragoon | 37818794 | Scripts/c37818794.lua | 1 |
| Whisker Blitzclique | 85523502 | Scripts/c85523502.lua | 1 |
| ...and 367 more |
Script Examples
Enneacraft - Atil.SPIA (71801447)
Source: Scripts/c71801447.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) thenShooting Majestic Star Dragon (40939228)
Source: Scripts/c40939228.lua
Duel.RegisterEffect(e1,tp)
end
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
endRed-Eyes Slash Dragon (21140872)
Source: Scripts/c21140872.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