Skip to content

Duel.ReturnToField ​

Signature ​

lua
Duel.ReturnToField(Card c, [int pos], [int zone]) -> bool|nil

Description ​

Returns a card temporarily removed from the field to its previous controller and previous location. pos defaults to the previous position and zone defaults to 0xff. If c was not removed for REASON_TEMPORARY, the binding returns no Lua value; otherwise it yields and returns whether the move succeeded. Use this only for temporary removal lifecycles, not as a generic way to place cards on the field.

How To Use It ​

Use this to close a real temporary-banish lifecycle. The card should have left the field with Duel.Remove(..., REASON_EFFECT+REASON_TEMPORARY) or an equivalent temporary removal reason.

lua
if Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)>0 then
    e1:SetLabelObject(tc)
end

local rc=e:GetLabelObject()
if rc then
    Duel.ReturnToField(rc)
end

Do not use this as a generic field-placement helper. Use Duel.SpecialSummon, Duel.SSet, Duel.MSet, Duel.Equip, or Duel.MoveToField for ordinary placement actions.

Parameters ​

  • c Card
  • pos int optional - default: previous position
  • zone int optional - default: 0xff

Returns ​

  • bool|nil - Success flag, or nil if c was not temporarily removed from the field.

Source ​

  • D:\Programs\GitHub\ygopro-core\libduel.cpp:4883

Guided Examples ​

Learn how to use this function in context:

Used By ​

Generated from the local Scripts/ folder and cards.cdb.

  • Detected in 91 indexed script(s).
  • Search this function in the Script Explorer with Duel.ReturnToField.
CardIDScriptDetected Calls
PSY-Framelord Omega74586817Scripts/c74586817.lua1
Shooting Majestic Star Dragon40939228Scripts/c40939228.lua1
PSY-Framelord Zeta37192109Scripts/c37192109.lua1
W:P Fancy Ball4993187Scripts/c4993187.lua1
A Bao A Qu, the Lightless Shadow4731783Scripts/c4731783.lua1
Cerynemesia, Mystical Beast of the Forest43632709Scripts/c43632709.lua1
Flowering Etoile the Melodious Magnificat83793721Scripts/c83793721.lua2
Angelica, Princess of Noble Arms36320744Scripts/c36320744.lua1
Ecclesia and the Dark Dragon78397661Scripts/c78397661.lua1
S:P Little Knight29301450Scripts/c29301450.lua2
Sea Stealth Attack19089195Scripts/c19089195.lua1
The Weather Painter Moonbow95515518Scripts/c95515518.lua1
Ghoti Fury65898344Scripts/c65898344.lua2
Galaxy-Eyes Photon Dragon93717133Scripts/c93717133.lua1
Timebreaker Magician80335817Scripts/c80335817.lua2
Sleipnir the Runick Mane74659582Scripts/c74659582.lua1
Bunny Ear Enthusiast39643167Scripts/c39643167.lua1
Galaxy-Eyes Photon Change Dragon54725177Scripts/c54725177.lua1
Mekk-Knight Purple Nightfall28692962Scripts/c28692962.lua1
Destiny HERO - Doom Overlord62542673Scripts/c62542673.lua1
Marincess Cascade27012990Scripts/c27012990.lua1
Amaze Attraction Thrill Train36591747Scripts/c36591747.lua1
Time Thief Redoer55285840Scripts/c55285840.lua1
Zefra Metaltron85216896Scripts/c85216896.lua1
...and 67 more

Script Examples ​

PSY-Framelord Omega (74586817) ​

Source: Scripts/c74586817.lua

lua
	while tc do
		if tc==e:GetHandler() then
			Duel.ReturnToField(tc)
		else
			Duel.SendtoHand(tc,tc:GetPreviousControler(),REASON_EFFECT)

Shooting Majestic Star Dragon (40939228) ​

Source: Scripts/c40939228.lua

lua
end
function c40939228.retop(e,tp,eg,ep,ev,re,r,rp)
	Duel.ReturnToField(e:GetLabelObject())
end

PSY-Framelord Zeta (37192109) ​

Source: Scripts/c37192109.lua

lua
	local tc=sg:GetFirst()
	while tc do
		Duel.ReturnToField(tc)
		tc=sg:GetNext()
	end