Duel.SendtoDeck
Signature
Duel.SendtoDeck(Card|Group targets, [int|nil player], int seq, int reason, [int reason_player], [bool send_activating]) -> intDescription
Returns targets to the Deck or Extra Deck for reason and returns the number of cards moved. If player is nil, each card returns to its owner. Use sequence constants such as SEQ_DECKTOP, SEQ_DECKBOTTOM, or SEQ_DECKSHUFFLE to control placement. Check the return value when a later action depends on the cards actually reaching the Deck or Extra Deck.
How To Use It
Use this for returning cards to the Main Deck or Extra Deck.
player can be nil for the normal return destination. seq controls placement: SEQ_DECKTOP, SEQ_DECKBOTTOM, or SEQ_DECKSHUFFLE.
if #g>0 then
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
endCheck the return value when a later part of the effect depends on a card actually reaching the Deck or Extra Deck.
Related Functions
Parameters
targetsCard|Groupplayerint|niloptionalseqintreasonintreason_playerintoptionalsend_activatingbooloptional
Returns
int
Source
D:\Programs\GitHub\ygopro-core\libduel.cpp:4862
Guided Examples
Learn how to use this function in context:
Used By
Generated from the local Scripts/ folder and cards.cdb.
- Detected in 926 indexed script(s).
- Search this function in the Script Explorer with
Duel.SendtoDeck.
Script Examples
Salamandra with Chain (62091148)
Source: Scripts/c62091148.lua
Duel.HintSelection(gg)
end
Duel.SendtoDeck(mat1,nil,SEQ_DECKSHUFFLE,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)Astrograph Sorcerer, the Starfrost Magician (48171151)
Source: Scripts/c48171151.lua
Duel.HintSelection(cg)
end
Duel.SendtoDeck(mat,nil,SEQ_DECKSHUFFLE,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)Pendulum Evolution (55795155)
Source: Scripts/c55795155.lua
e:SetLabel(g:GetFirst():GetCode())
Duel.ConfirmCards(1-tp,g)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end