Skip to content

Duel.DiscardDeck ​

Signature ​

lua
Duel.DiscardDeck(int player, int count, int reason) -> int

Description ​

Sends count cards from the top of player's Deck to the Graveyard for reason, and returns the number actually moved.

Parameters ​

  • player int
  • count int
  • reason int

Returns ​

  • int

Source ​

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

Guided Examples ​

Learn how to use this function in context:

Used By ​

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

  • Detected in 137 indexed script(s).
  • Search this function in the Script Explorer with Duel.DiscardDeck.
CardIDScriptDetected Calls
Enlightenment Dragon46186135Scripts/c46186135.lua1
Tearlaments Scheiren572850Scripts/c572850.lua1
Tearlaments Havnis37961969Scripts/c37961969.lua1
Deep Sea Minstrel71978434Scripts/c71978434.lua1
Tearlaments Merrli74078255Scripts/c74078255.lua1
Cyberse Clock Dragon42717221Scripts/c42717221.lua1
Naturia Mole Cricket93454062Scripts/c93454062.lua1
Tearlaments Kitkallos92731385Scripts/c92731385.lua1
Deep Sea Sentry45483489Scripts/c45483489.lua1
Speedroid Gum Prize70939418Scripts/c70939418.lua1
Laundry Trap79371769Scripts/c79371769.lua1
The Zombie Vampire73082255Scripts/c73082255.lua2
Curious, the Lightsworn Dominion98095162Scripts/c98095162.lua1
Agido the Ancient Sentinel62320425Scripts/c62320425.lua1
Minerva, the Athenian Lightsworn18843291Scripts/c18843291.lua1
Deep Sea Artisan8495780Scripts/c8495780.lua1
Virtual World City - Kauwloon14886190Scripts/c14886190.lua1
Clear Phantom70717628Scripts/c70717628.lua1
Wrecker Panda28139785Scripts/c28139785.lua1
Michael, the Arch-Lightsworn4779823Scripts/c4779823.lua1
Minerva, the Exalted Lightsworn30100551Scripts/c30100551.lua2
Jain, Twilightsworn General84673417Scripts/c84673417.lua1
Naturia Ladybug19605133Scripts/c19605133.lua1
Slash Draw71344451Scripts/c71344451.lua1
...and 113 more

Script Examples ​

Enlightenment Dragon (46186135) ​

Source: Scripts/c46186135.lua

lua
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
	Duel.DiscardDeck(tp,4,REASON_EFFECT)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)

Tearlaments Scheiren (572850) ​

Source: Scripts/c572850.lua

lua
			and Duel.IsPlayerCanDiscardDeck(tp,1) then
			Duel.BreakEffect()
			Duel.DiscardDeck(tp,3,REASON_EFFECT)
		end
	end

Tearlaments Havnis (37961969) ​

Source: Scripts/c37961969.lua

lua
function c37961969.tgop(e,tp,eg,ep,ev,re,r,rp)
	if e:GetHandler():IsRelateToEffect(e) and Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)>0 then
		Duel.DiscardDeck(tp,3,REASON_EFFECT)
	end
end