Card.RegisterEffect
Signature
lua
Card.RegisterEffect(Card c, Effect e, [bool forced]) -> int|nilDescription
Registers effect e to card c and returns the generated effect field ID. Registration also makes c the effect handler. If the card is unaffected by the current reason effect, registration can fail unless forced is true.
Parameters
cCardeEffectforcedbooloptional
Returns
int|nil
Source
D:\Programs\GitHub\ygopro-core\libcard.cpp:3603
Guided Examples
Learn how to use this function in context:
- Methods for Affecting Cards
- Continuous Stat Modifiers
- Creation, Building, and Registration of an Effect Object
- Negation And Immunity
- Reset Flags And Effect Duration
Used By
Generated from the local Scripts/ folder and cards.cdb.
- Detected in 13442 indexed script(s).
- Search this function in the Script Explorer with
Card.RegisterEffect.
Script Examples
Salamandra with Chain (62091148)
Source: Scripts/c62091148.lua
lua
e1:SetTarget(s.target)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)Astrograph Sorcerer, the Starfrost Magician (48171151)
Source: Scripts/c48171151.lua
lua
e1:SetTarget(s.ptg)
e1:SetOperation(s.pop)
c:RegisterEffect(e1)
--special summon
local custom_code=aux.RegisterMergedDelayedEvent_ToSingleCard(c,id,EVENT_DESTROYED)Artmage Non-Finito (74631897)
Source: Scripts/c74631897.lua
lua
e0:SetCondition(s.condition)
e0:SetOperation(s.regop)
c:RegisterEffect(e0)
--spsummon condition
local e2=Effect.CreateEffect(c)