Skip to content

Duel.GetFieldCard ​

Signature ​

lua
Duel.GetFieldCard(int player, int location, int sequence) -> Card|nil

Description ​

Returns the card at player, location, and sequence, or nil if that slot is empty or invalid. The binding also returns nil while the card at that slot is in Summoning or Special Summon step status. Field Zone sequence 0 maps to the Field Zone, and Pendulum Zone sequences 0 and 1 only return cards currently marked as Pendulum Zone cards.

Parameters ​

  • player int
  • location int
  • sequence int

Returns ​

  • Card|nil

Source ​

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

Guided Examples ​

Learn how to use this function in context:

Used By ​

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

  • Detected in 75 indexed script(s).
  • Search this function in the Script Explorer with Duel.GetFieldCard.
CardIDScriptDetected Calls
Pendulum Evolution55795155Scripts/c55795155.lua4
El Shaddoll Apkallone50907446Scripts/c50907446.lua2
Ghostrick Renovation61818176Scripts/c61818176.lua1
Ursarctic Polari27693363Scripts/c27693363.lua1
Camelot, Realm of Noble Knights and Noble Arms15635751Scripts/c15635751.lua1
Yummy★Snatchy30581601Scripts/c30581601.lua1
El Shaddoll Meshachrer32467459Scripts/c32467459.lua2
Sea Stealth Attack19089195Scripts/c19089195.lua1
Favorite Hero11881272Scripts/c11881272.lua1
Yummy☆Surprise29369059Scripts/c29369059.lua1
Triamid Dancer69529337Scripts/c69529337.lua1
Odd-Eyes Pendulum Dragon, Four Heavenly Dragons75787708Scripts/c75787708.lua2
Fire King Sanctuary65305978Scripts/c65305978.lua1
Numeron Wall42352091Scripts/c42352091.lua1
Wind Unicorn Parallel, the Dracoslayer39016067Scripts/c39016067.lua2
PenduLuMoon66150724Scripts/c66150724.lua4
Thousand Umbral Horror2932235Scripts/c2932235.lua1
The Sacred Waters in the Sky26684111Scripts/c26684111.lua1
Tenyinfinity77946022Scripts/c77946022.lua1
Triamid Master32912040Scripts/c32912040.lua1
Odd-Eyes Phantasma Dragon21770839Scripts/c21770839.lua2
Dream Mirror Recap81038234Scripts/c81038234.lua1
Super Quantal Alphan Spike72332074Scripts/c72332074.lua1
Enneacraft Reset19504025Scripts/c19504025.lua1
...and 51 more

Script Examples ​

Pendulum Evolution (55795155) ​

Source: Scripts/c55795155.lua

lua
	if chk==0 then
		local c=e:GetHandler()
		local lpz=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
		local rpz=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
		if lpz==nil or rpz==nil then return false end

El Shaddoll Apkallone (50907446) ​

Source: Scripts/c50907446.lua

lua
	local mg=g:Filter(c50907446.FShaddollFilter,nil,c)
	local tp=e:GetHandlerPlayer()
	local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
	local exg=nil
	if fc and fc:IsHasEffect(81788994) and fc:IsCanRemoveCounter(tp,0x16,3,REASON_EFFECT) then

Ghostrick Renovation (61818176) ​

Source: Scripts/c61818176.lua

lua
end
function c61818176.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
	local tc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
	if chkc then return false end
	if chk==0 then return tc and tc:IsFaceup() and tc:IsSetCard(0x8d) and tc:IsAbleToHand() and tc:IsCanBeEffectTarget(e) end