Skip to content

Duel.IsPlayerCanDraw ​

Signature ​

lua
Duel.IsPlayerCanDraw(int player, [int count]) -> bool

Description ​

Checks whether player can draw count cards.

Parameters ​

  • player int
  • count int optional - default: 0

Returns ​

  • bool

Source ​

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

Guided Examples ​

Learn how to use this function in context:

Used By ​

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

  • Detected in 669 indexed script(s).
  • Search this function in the Script Explorer with Duel.IsPlayerCanDraw.
CardIDScriptDetected Calls
Levia-Dragoon - Daedalus78579058Scripts/c78579058.lua1
Pere-Zenet Em Heru46273941Scripts/c46273941.lua1
Junoldo the Shadespirit Power Patron10266279Scripts/c10266279.lua1
A Bao A Qu, the Lightless Shadow4731783Scripts/c4731783.lua1
Magikey Dragon - Andrabime71159974Scripts/c71159974.lua1
Ojamassimilation2390019Scripts/c2390019.lua1
Triamid Pulse96100333Scripts/c96100333.lua1
Abyss-steam63941169Scripts/c63941169.lua1
Flower Cardian Moonflowerviewing33541430Scripts/c33541430.lua1
Ojamatch38395123Scripts/c38395123.lua1
Inzektor Picofalena97273514Scripts/c97273514.lua1
Witchcrafter Pittore95245544Scripts/c95245544.lua1
Fallen Paradise of the Sacred Beasts65861210Scripts/c65861210.lua1
Amaze Attraction Wonder Wheel93473606Scripts/c93473606.lua1
Vernusylph of the Thawing Mountains9238125Scripts/c9238125.lua1
Genex Ally Triarm17760003Scripts/c17760003.lua1
Megalith Anastasis29876299Scripts/c29876299.lua1
Fabled Realm's Revival57775790Scripts/c57775790.lua1
Ryu-Ge Rivalry81549048Scripts/c81549048.lua1
Rank-Up-Magic Zexal Force36224040Scripts/c36224040.lua1
Yummy★Redemption65853758Scripts/c65853758.lua1
Shuffle Reborn14816688Scripts/c14816688.lua1
Melodious Concerto31458630Scripts/c31458630.lua1
Abyssrhine, the Atlantean Spirit17080584Scripts/c17080584.lua1
...and 645 more

Script Examples ​

Levia-Dragoon - Daedalus (78579058) ​

Source: Scripts/c78579058.lua

lua
	if chk==0 then
		local h=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
		return h>0 and Duel.IsPlayerCanDraw(1-tp,h)
	end
	Duel.SetOperationInfo(0,CATEGORY_HANDES_OPPO,nil,0,1-tp,1)

Pere-Zenet Em Heru (46273941) ​

Source: Scripts/c46273941.lua

lua
end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
	if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
	Duel.SetTargetPlayer(tp)
	Duel.SetTargetParam(1)

Junoldo the Shadespirit Power Patron (10266279) ​

Source: Scripts/c10266279.lua

lua
end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
	if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
	Duel.SetTargetPlayer(tp)
	Duel.SetTargetParam(2)