Duel.IsPlayerCanDiscardDeckAsCost
Signature
lua
Duel.IsPlayerCanDiscardDeckAsCost(int player, int count) -> boolDescription
Checks whether player can send count cards from the top of the Deck to the Graveyard as a cost.
Parameters
playerintcountint
Returns
bool
Source
D:\Programs\GitHub\ygopro-core\libduel.cpp:5046
Guided Examples
Learn how to use this function in context:
Used By
Generated from the local Scripts/ folder and cards.cdb.
- Detected in 26 indexed script(s).
- Search this function in the Script Explorer with
Duel.IsPlayerCanDiscardDeckAsCost.
| Card | ID | Script | Detected Calls |
|---|---|---|---|
| Deep Sea Minstrel | 71978434 | Scripts/c71978434.lua | 1 |
| Naturia Mole Cricket | 93454062 | Scripts/c93454062.lua | 1 |
| Deep Sea Sentry | 45483489 | Scripts/c45483489.lua | 1 |
| Deep Sea Artisan | 8495780 | Scripts/c8495780.lua | 1 |
| Naturia Ladybug | 19605133 | Scripts/c19605133.lua | 1 |
| Dante, Traveler of the Burning Abyss | 83531441 | Scripts/c83531441.lua | 2 |
| Driangle, Dragon of the Dark Deep | 98248208 | Scripts/c98248208.lua | 1 |
| Mythical Bestiary | 38325384 | Scripts/c38325384.lua | 1 |
| Rainbow Neos | 86346643 | Scripts/c86346643.lua | 1 |
| Celestia, Lightsworn Angel | 94381039 | Scripts/c94381039.lua | 1 |
| Naturia Sunflower | 7478431 | Scripts/c7478431.lua | 1 |
| Cupid Volley | 11851647 | Scripts/c11851647.lua | 2 |
| Naturia Vein | 16940215 | Scripts/c16940215.lua | 1 |
| Naturia Horneedle | 84905691 | Scripts/c84905691.lua | 1 |
| Orbital Hydralander | 44009443 | Scripts/c44009443.lua | 1 |
| Card Blocker | 42256406 | Scripts/c42256406.lua | 2 |
| Naturia Exterio | 99916754 | Scripts/c99916754.lua | 1 |
| Card Trooper | 85087012 | Scripts/c85087012.lua | 2 |
| Naturia Beast | 33198837 | Scripts/c33198837.lua | 1 |
| Hidden Armory | 52105192 | Scripts/c52105192.lua | 1 |
| Laval Blaster | 11834972 | Scripts/c11834972.lua | 2 |
| Battlin' Boxing Spirits | 36916401 | Scripts/c36916401.lua | 1 |
| Lightsworn Barrier | 22201234 | Scripts/c22201234.lua | 1 |
| Naturia Rock | 54161401 | Scripts/c54161401.lua | 1 |
| ...and 2 more |
Script Examples
Deep Sea Minstrel (71978434)
Source: Scripts/c71978434.lua
lua
end
function c71978434.tdcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,3) end
Duel.DiscardDeck(tp,3,REASON_COST)
endNaturia Mole Cricket (93454062)
Source: Scripts/c93454062.lua
lua
local c=e:GetHandler()
local fe=Duel.IsPlayerAffectedByEffect(tp,29942771)
local b1=fe and Duel.IsPlayerCanDiscardDeckAsCost(tp,2) and Duel.GetMZoneCount(tp)>0
local b2=c:IsReleasable() and Duel.GetMZoneCount(tp,c)>0
if chk==0 then return b1 or b2 endDeep Sea Sentry (45483489)
Source: Scripts/c45483489.lua
lua
end
function c45483489.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,2) end
Duel.DiscardDeck(tp,2,REASON_COST)
end