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)
endIf no marker exists, this returns nil. If several matching markers exist, the local binding returns one label value per marker.
Related Functions
Parameters
cCard- Card whose single-card flag effects are inspected.codeint- 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.
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 falseResurgam 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