Duel.Remove
Signature
Duel.Remove(Card|Group targets, int pos, int reason, [int reason_player]) -> intDescription
Banishes targets in position pos for reason and returns the number of cards actually banished. If reason includes REASON_TEMPORARY, the banish is treated as temporary and the card can later be returned with Duel.ReturnToField. Use POS_FACEDOWN only when the effect requires a face-down banish; ordinary banish effects usually use POS_FACEUP.
How To Use It
Use this for banishing cards. The second argument is the banished position, usually POS_FACEUP or POS_FACEDOWN.
if c:IsRelateToEffect(e) then
Duel.Remove(c,POS_FACEUP,REASON_EFFECT)
endFor temporary banish effects, scripts commonly include REASON_TEMPORARY; those cards can later be returned with Duel.ReturnToField.
Related Functions
Parameters
targetsCard|Groupposintreasonintreason_playerintoptional
Returns
int
Source
D:\Programs\GitHub\ygopro-core\libduel.cpp:4859
Guided Examples
Learn how to use this function in context:
- Methods for Affecting Cards
- Fusion Procedure Guide
- Functions That Move Cards Across Locations
- Special Summon-Only Monster Guide
Used By
Generated from the local Scripts/ folder and cards.cdb.
- Detected in 1663 indexed script(s).
- Search this function in the Script Explorer with
Duel.Remove.
Script Examples
Lady's Dragonmaid (48658295)
Source: Scripts/c48658295.lua
local sg=e:GetLabelObject()
c:SetMaterial(sg)
Duel.Remove(sg,POS_FACEUP,REASON_COST)
end
function s.spfilter(c,e,tp)Astrograph Sorcerer (76794549)
Source: Scripts/c76794549.lua
local sg=mg:SelectSubGroupEach(tp,c76794549.hnchecks,false,c76794549.hngoal,e,tp,c)
sg:AddCard(c)
Duel.Remove(sg,POS_FACEUP,REASON_COST)
end
function c76794549.hntg(e,tp,eg,ep,ev,re,r,rp,chk)Accel Synchro Stardust Dragon (30983281)
Source: Scripts/c30983281.lua
local te=rc:IsHasEffect(84012625,tp)
if te then
Duel.Remove(rc,POS_FACEUP,REASON_COST+REASON_REPLACE)
else
Duel.Release(rc,REASON_COST)