Skip to content

Card.CancelToGrave ​

Signature ​

lua
Card.CancelToGrave(Card c, [bool cancel]) -> void

Description ​

Cancels the confirmed-to-Graveyard state for c. If cancel is false, sets that state again. This state is used for non-continuous Spell/Trap Cards activated on the field before they leave the field; while set, they cannot return to the hand or Deck and are sent to the Graveyard when the Chain ends. Use this helper to keep such cards on the field, as with Swords of Revealing Light or Scrap-Iron Scarecrow.

Parameters ​

  • c Card
  • cancel bool optional - default: true

Source ​

  • D:\Programs\GitHub\ygopro-core\libcard.cpp:3706

Guided Examples ​

Learn how to use this function in context:

Used By ​

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

  • Detected in 115 indexed script(s).
  • Search this function in the Script Explorer with Card.CancelToGrave.
CardIDScriptDetected Calls
Salamandra with Chain62091148Scripts/c62091148.lua2
Converging Wishes20007374Scripts/c20007374.lua2
Graydle Split75361204Scripts/c75361204.lua2
Number 38: Hope Harbinger Dragon Titanic Galaxy63767246Scripts/c63767246.lua1
Amaze Attraction Wonder Wheel93473606Scripts/c93473606.lua2
Max Metalmorph89812483Scripts/c89812483.lua2
The Phantom Knights' Rank-Up-Magic Launch3298689Scripts/c3298689.lua1
Amaze Attraction Thrill Train36591747Scripts/c36591747.lua2
Scrap-Iron Sacred Statue85520170Scripts/c85520170.lua1
Red Cocoon2542230Scripts/c2542230.lua2
Mirror Barrier95915457Scripts/c95915457.lua2
Hyper-Rank-Up-Magic Ultimate Force87818869Scripts/c87818869.lua1
Shichi-Go-San11035075Scripts/c11035075.lua2
Gergonne's End59490397Scripts/c59490397.lua2
Malefic Force68721020Scripts/c68721020.lua2
The Glitter of Raise Moon9362643Scripts/c9362643.lua1
Limit Code86607583Scripts/c86607583.lua2
Goblin's Crazy Beast71100270Scripts/c71100270.lua1
Amaze Attraction Cyclo-Coaster66984907Scripts/c66984907.lua2
DoomZ Destruction80320877Scripts/c80320877.lua2
Epurrely Beauty98049934Scripts/c98049934.lua1
Laevatein, Generaider Boss of Shadows74615388Scripts/c74615388.lua1
Assault Spirits87043568Scripts/c87043568.lua2
Goblin Biker Grand Pileup90946420Scripts/c90946420.lua1
...and 91 more

Script Examples ​

Salamandra with Chain (62091148) ​

Source: Scripts/c62091148.lua

lua
	if cid~=e:GetLabel() then return end
	if e:GetOwner():IsRelateToChain(ev) then
		e:GetOwner():CancelToGrave(false)
	end
end

Converging Wishes (20007374) ​

Source: Scripts/c20007374.lua

lua
	if cid~=e:GetLabel() then return end
	if e:GetOwner():IsRelateToChain(ev) then
		e:GetOwner():CancelToGrave(false)
	end
end

Graydle Split (75361204) ​

Source: Scripts/c75361204.lua

lua
	if cid~=e:GetLabel() then return end
	if e:GetOwner():IsRelateToChain(ev) then
		e:GetOwner():CancelToGrave(false)
	end
end