Duel.SortDecktop
Signature
lua
Duel.SortDecktop(int sort_player, int target_player, int count) -> voidDescription
Lets sort_player reorder the top count cards of target_player's Main Deck. Both players must be valid and count must be at least 1. If count is larger than the remaining Deck size, the processor only sorts the available top cards.
Parameters
sort_playerinttarget_playerintcountint
Source
D:\Programs\GitHub\ygopro-core\libduel.cpp:4893
Guided Examples
Learn how to use this function in context:
Used By
Generated from the local Scripts/ folder and cards.cdb.
- Detected in 62 indexed script(s).
- Search this function in the Script Explorer with
Duel.SortDecktop.
| Card | ID | Script | Detected Calls |
|---|---|---|---|
| Flower Cardian Peony with Butterfly | 57261568 | Scripts/c57261568.lua | 1 |
| Purrely | 25550531 | Scripts/c25550531.lua | 1 |
| Materiactor Meltthrough | 66059345 | Scripts/c66059345.lua | 1 |
| Loris, Lady of Lament | 50699850 | Scripts/c50699850.lua | 1 |
| Destiny HERO - Dominance | 69394324 | Scripts/c69394324.lua | 1 |
| Shadowreaver Knight 21 | 95506252 | Scripts/c95506252.lua | 1 |
| Materiactor Meltdown | 38669664 | Scripts/c38669664.lua | 2 |
| Magikey Mechmusket - Batosbuster | 19489718 | Scripts/c19489718.lua | 1 |
| Adamancipator Risen - Leonite | 47674738 | Scripts/c47674738.lua | 1 |
| Adamancipator Risen - Raptite | 73079836 | Scripts/c73079836.lua | 1 |
| Speedroid Fuki-Modoshi Piper | 50482813 | Scripts/c50482813.lua | 1 |
| Wannabee! | 3248469 | Scripts/c3248469.lua | 1 |
| Hydralander Orbit | 93953933 | Scripts/c93953933.lua | 2 |
| GMX Chairman Kimridge | 56034579 | Scripts/c56034579.lua | 1 |
| Morphtronic Smartfon | 15521027 | Scripts/c15521027.lua | 1 |
| Pot of Prosperity | 84211599 | Scripts/c84211599.lua | 1 |
| Way Where There's a Will | 91880660 | Scripts/c91880660.lua | 1 |
| Invincible Demise Lord | 71108540 | Scripts/c71108540.lua | 1 |
| Sylvan Lotuswain | 73136204 | Scripts/c73136204.lua | 2 |
| Recardination | 73271204 | Scripts/c73271204.lua | 1 |
| Dark Magical Circle | 47222536 | Scripts/c47222536.lua | 2 |
| SPYRAL GEAR - Drone | 4474060 | Scripts/c4474060.lua | 1 |
| Orea, the Sylvan High Arbiter | 95239444 | Scripts/c95239444.lua | 2 |
| Adamancipator Risen - Dragite | 9464441 | Scripts/c9464441.lua | 1 |
| ...and 38 more |
Script Examples
Flower Cardian Peony with Butterfly (57261568)
Source: Scripts/c57261568.lua
lua
Duel.ConfirmCards(tp,g)
local opt=Duel.SelectOption(tp,aux.Stringid(57261568,1),aux.Stringid(57261568,2))
Duel.SortDecktop(tp,1-tp,ct)
if opt==1 then
for i=1,ct doPurrely (25550531)
Source: Scripts/c25550531.lua
lua
end
if ct<=1 then return end
Duel.SortDecktop(p,p,ct)
for i=1,ct do
local mg=Duel.GetDecktopGroup(p,1)Materiactor Meltthrough (66059345)
Source: Scripts/c66059345.lua
lua
local g=Duel.GetDecktopGroup(tp,6)
if g:GetCount()>0 then
Duel.SortDecktop(tp,tp,g:GetCount())
end
end