Skip to content

Duel.IsPlayerCanDiscardDeck ​

Signature ​

lua
Duel.IsPlayerCanDiscardDeck(int player, int count) -> bool

Description ​

Checks whether player can send count cards from the top of the Deck to the Graveyard.

Parameters ​

  • player int
  • count int

Returns ​

  • bool

Source ​

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

Guided Examples ​

Learn how to use this function in context:

Used By ​

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

  • Detected in 107 indexed script(s).
  • Search this function in the Script Explorer with Duel.IsPlayerCanDiscardDeck.
CardIDScriptDetected Calls
Tearlaments Scheiren572850Scripts/c572850.lua2
Tearlaments Havnis37961969Scripts/c37961969.lua1
Sylvan Dancepione21903613Scripts/c21903613.lua2
Tearlaments Merrli74078255Scripts/c74078255.lua1
Ma'at18631392Scripts/c18631392.lua2
Cyberse Clock Dragon42717221Scripts/c42717221.lua1
Tearlaments Kitkallos92731385Scripts/c92731385.lua1
Chaos Ruler, the Chaotic Magical Dragon3040496Scripts/c3040496.lua2
Akashic Magician28776350Scripts/c28776350.lua2
Speedroid Gum Prize70939418Scripts/c70939418.lua1
Kelbek the Ancient Vanguard25926710Scripts/c25926710.lua2
Laundry Trap79371769Scripts/c79371769.lua1
Alsei, the Sylvan High Protector10406322Scripts/c10406322.lua2
The Zombie Vampire73082255Scripts/c73082255.lua2
Sylvan Princessprout20579538Scripts/c20579538.lua2
Super Quantal Fairy Alphan58753372Scripts/c58753372.lua2
Agido the Ancient Sentinel62320425Scripts/c62320425.lua4
Tsuchigumo, the Poisonous Mayakashi77092311Scripts/c77092311.lua2
Crystal Boon85766789Scripts/c85766789.lua1
Minerva, the Athenian Lightsworn18843291Scripts/c18843291.lua1
Paleozoic Anomalocaris61307542Scripts/c61307542.lua2
Sylvan Princessprite33909817Scripts/c33909817.lua2
Virtual World City - Kauwloon14886190Scripts/c14886190.lua1
Sylvan Lotuswain73136204Scripts/c73136204.lua2
...and 83 more

Script Examples ​

Tearlaments Scheiren (572850) ​

Source: Scripts/c572850.lua

lua
	if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
		and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
		and Duel.IsPlayerCanDiscardDeck(tp,3)
		and Duel.IsExistingMatchingCard(c572850.tgfilter,tp,LOCATION_HAND,0,1,c) end
	Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3)

Tearlaments Havnis (37961969) ​

Source: Scripts/c37961969.lua

lua
	if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
		and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
		and Duel.IsPlayerCanDiscardDeck(tp,3) end
	Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3)
	Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)

Sylvan Dancepione (21903613) ​

Source: Scripts/c21903613.lua

lua
end
function c21903613.target(e,tp,eg,ep,ev,re,r,rp,chk)
	if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end
end
function c21903613.spfilter(c,e,tp)