Skip to content

Card.GetFirstCardTarget ​

Signature ​

lua
Card.GetFirstCardTarget(Card c) -> Card|nil

Description ​

Returns c's first persistent card target, or nil.

Parameters ​

  • c Card

Returns ​

  • Card|nil

Source ​

  • D:\Programs\GitHub\ygopro-core\libcard.cpp:3593

Guided Examples ​

Learn how to use this function in context:

Used By ​

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

  • Detected in 29 indexed script(s).
  • Search this function in the Script Explorer with Card.GetFirstCardTarget.
CardIDScriptDetected Calls
Goblin Freefall Squad85123771Scripts/c85123771.lua1
Altergeist Manifestation35146019Scripts/c35146019.lua1
Phantom Knights' Sword61936647Scripts/c61936647.lua1
Ninjitsu Art of Shadow Sealing13629812Scripts/c13629812.lua1
Borrel Regenerator6556178Scripts/c6556178.lua1
Phantom Knights' Fog Blade25542642Scripts/c25542642.lua1
Galaxy Zero97617181Scripts/c97617181.lua1
Dimension Mirage80560728Scripts/c80560728.lua3
Dimension Sphinx17787975Scripts/c17787975.lua3
Follow Wing42776855Scripts/c42776855.lua3
Moon Dance Ritual14005031Scripts/c14005031.lua3
Nightmare Wheel54704216Scripts/c54704216.lua3
Vain Betrayer94933468Scripts/c94933468.lua2
Brainwashing Beam59258334Scripts/c59258334.lua4
Cyber Phoenix3370104Scripts/c3370104.lua1
Mask of Dispel20765952Scripts/c20765952.lua3
Fulfillment of the Contract48206762Scripts/c48206762.lua1
Re-Fusion74694807Scripts/c74694807.lua1
Evil Eye Mesmerism42899204Scripts/c42899204.lua1
Limit Reverse27551Scripts/c27551.lua4
Symbol of Heritage45305419Scripts/c45305419.lua1
Shattered Axe12117532Scripts/c12117532.lua3
Gradius' Option14291024Scripts/c14291024.lua4
Premature Burial70828912Scripts/c70828912.lua1
...and 5 more

Script Examples ​

Goblin Freefall Squad (85123771) ​

Source: Scripts/c85123771.lua

lua
function s.reop(e,tp,eg,ep,ev,re,r,rp)
	local c=e:GetHandler()
	local tc=c:GetFirstCardTarget()
	Card.CancelCardTarget(c,tc)
end

Altergeist Manifestation (35146019) ​

Source: Scripts/c35146019.lua

lua
	if e:GetLabelObject():GetLabel()~=0 then return end
	local c=e:GetHandler()
	local tc=c:GetFirstCardTarget()
	if tc and tc:IsLocation(LOCATION_MZONE) then
		Duel.Destroy(tc,REASON_EFFECT)

Phantom Knights' Sword (61936647) ​

Source: Scripts/c61936647.lua

lua
	local c=e:GetHandler()
	if c:IsStatus(STATUS_DESTROY_CONFIRMED) then return false end
	local tc=c:GetFirstCardTarget()
	return tc and eg:IsContains(tc)
end