Skip to content

Card.GetFlagEffectLabel ​

Signature ​

lua
Card.GetFlagEffectLabel(Card c, int code) -> int|nil,...?

Description ​

Returns the first label value from each flag effect with the given code on c. If c has no matching flag effect, the core returns nil. Matching flag effects with no label return 0 for that slot. If several matching markers exist, the binding returns several Lua values.

How To Use It ​

Use this when a card marker stored an integer payload.

lua
local label=c:GetFlagEffectLabel(id)
if label then
    e:SetLabel(label)
end

If no marker exists, this returns nil. If several matching markers exist, the local binding returns one label value per marker.

Parameters ​

  • c Card - Card whose single-card flag effects are inspected.
  • code int - Flag-effect code; the core masks it with MAX_CARD_ID and adds EFFECT_FLAG_EFFECT.

Returns ​

  • int|nil - First label value, or nil if no matching flag effect exists.
  • ...? - Additional integer label values from additional matching flag effects.

Source ​

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

Guided Examples ​

Learn how to use this function in context:

Used By ​

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

  • Detected in 220 indexed script(s).
  • Search this function in the Script Explorer with Card.GetFlagEffectLabel.
CardIDScriptDetected Calls
Deftero Enneacraft - "alazoneIA"92171126Scripts/c92171126.lua1
Ehther the Heavenly Monarch96570609Scripts/c96570609.lua1
Resurgam Xyz49082032Scripts/c49082032.lua1
Converging Wishes20007374Scripts/c20007374.lua1
PSY-Framelord Omega74586817Scripts/c74586817.lua1
Graydle Split75361204Scripts/c75361204.lua1
Future Fusion Nova92058902Scripts/c92058902.lua1
D/D/D/D Super-Dimensional Sovereign Emperor Zero Paradox97417863Scripts/c97417863.lua1
Shooting Majestic Star Dragon40939228Scripts/c40939228.lua1
Kewl Tune Crackle39576656Scripts/c39576656.lua2
PSY-Framelord Zeta37192109Scripts/c37192109.lua1
The Gaze of Timaeus22283204Scripts/c22283204.lua1
Rescue Hamster50485594Scripts/c50485594.lua1
Cerynemesia, Mystical Beast of the Forest43632709Scripts/c43632709.lua1
Gravity Balance37930737Scripts/c37930737.lua1
Trickstar Light Stage35371948Scripts/c35371948.lua7
Regenesis Birth27781371Scripts/c27781371.lua1
Vernusylph and the Changing Season37313338Scripts/c37313338.lua1
Performapal Trump Girl42002073Scripts/c42002073.lua1
Angelica, Princess of Noble Arms36320744Scripts/c36320744.lua1
Trickstar Light Arena63492244Scripts/c63492244.lua7
Ecclesia and the Dark Dragon78397661Scripts/c78397661.lua1
Mixeroid71340250Scripts/c71340250.lua1
Echelon of the Fire Kings38798785Scripts/c38798785.lua1
...and 196 more

Script Examples ​

Deftero Enneacraft - "alazoneIA" (92171126) ​

Source: Scripts/c92171126.lua

lua
end
function s.retfilter(c,fid)
	return c:GetFlagEffectLabel(id)==fid
end
function s.retcon(e,tp,eg,ep,ev,re,r,rp)

Ehther the Heavenly Monarch (96570609) ​

Source: Scripts/c96570609.lua

lua
function c96570609.thcon(e,tp,eg,ep,ev,re,r,rp)
	local tc=e:GetLabelObject()
	if tc:GetFlagEffectLabel(96570609)~=e:GetLabel() then
		e:Reset()
		return false

Resurgam Xyz (49082032) ​

Source: Scripts/c49082032.lua

lua
function c49082032.retcon(e,tp,eg,ep,ev,re,r,rp)
	local tc=e:GetLabelObject()
	if tc:GetFlagEffectLabel(49082032)~=e:GetLabel() then
		e:Reset()
		return false