Duel.IsPlayerCanDraw
Signature
lua
Duel.IsPlayerCanDraw(int player, [int count]) -> boolDescription
Checks whether player can draw count cards.
Parameters
playerintcountintoptional - 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.
| Card | ID | Script | Detected Calls |
|---|---|---|---|
| Levia-Dragoon - Daedalus | 78579058 | Scripts/c78579058.lua | 1 |
| Pere-Zenet Em Heru | 46273941 | Scripts/c46273941.lua | 1 |
| Junoldo the Shadespirit Power Patron | 10266279 | Scripts/c10266279.lua | 1 |
| A Bao A Qu, the Lightless Shadow | 4731783 | Scripts/c4731783.lua | 1 |
| Magikey Dragon - Andrabime | 71159974 | Scripts/c71159974.lua | 1 |
| Ojamassimilation | 2390019 | Scripts/c2390019.lua | 1 |
| Triamid Pulse | 96100333 | Scripts/c96100333.lua | 1 |
| Abyss-steam | 63941169 | Scripts/c63941169.lua | 1 |
| Flower Cardian Moonflowerviewing | 33541430 | Scripts/c33541430.lua | 1 |
| Ojamatch | 38395123 | Scripts/c38395123.lua | 1 |
| Inzektor Picofalena | 97273514 | Scripts/c97273514.lua | 1 |
| Witchcrafter Pittore | 95245544 | Scripts/c95245544.lua | 1 |
| Fallen Paradise of the Sacred Beasts | 65861210 | Scripts/c65861210.lua | 1 |
| Amaze Attraction Wonder Wheel | 93473606 | Scripts/c93473606.lua | 1 |
| Vernusylph of the Thawing Mountains | 9238125 | Scripts/c9238125.lua | 1 |
| Genex Ally Triarm | 17760003 | Scripts/c17760003.lua | 1 |
| Megalith Anastasis | 29876299 | Scripts/c29876299.lua | 1 |
| Fabled Realm's Revival | 57775790 | Scripts/c57775790.lua | 1 |
| Ryu-Ge Rivalry | 81549048 | Scripts/c81549048.lua | 1 |
| Rank-Up-Magic Zexal Force | 36224040 | Scripts/c36224040.lua | 1 |
| Yummy★Redemption | 65853758 | Scripts/c65853758.lua | 1 |
| Shuffle Reborn | 14816688 | Scripts/c14816688.lua | 1 |
| Melodious Concerto | 31458630 | Scripts/c31458630.lua | 1 |
| Abyssrhine, the Atlantean Spirit | 17080584 | Scripts/c17080584.lua | 1 |
| ...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)