Duel.GetFieldCard
Signature
lua
Duel.GetFieldCard(int player, int location, int sequence) -> Card|nilDescription
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
playerintlocationintsequenceint
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.
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 endEl 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) thenGhostrick 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