Skip to content

Card.RegisterEffect ​

Signature ​

lua
Card.RegisterEffect(Card c, Effect e, [bool forced]) -> int|nil

Description ​

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 ​

  • c Card
  • e Effect
  • forced bool optional

Returns ​

  • int|nil

Source ​

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

Guided Examples ​

Learn how to use this function in context:

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.
CardIDScriptDetected Calls
Salamandra with Chain62091148Scripts/c62091148.lua5
Astrograph Sorcerer, the Starfrost Magician48171151Scripts/c48171151.lua4
Artmage Non-Finito74631897Scripts/c74631897.lua5
Pendulum Evolution55795155Scripts/c55795155.lua5
Levia-Dragoon - Daedalus78579058Scripts/c78579058.lua3
Lady's Dragonmaid48658295Scripts/c48658295.lua4
Azure Ocean Dragon Lord - Neo-Daedalus Rage41570943Scripts/c41570943.lua3
Eternal Favorite87532344Scripts/c87532344.lua3
Surprise Fusion35167375Scripts/c35167375.lua5
Astrograph Sorcerer76794549Scripts/c76794549.lua3
Spellbook of the Grand Circle11911336Scripts/c11911336.lua2
Ultra Polymerization76647978Scripts/c76647978.lua6
Goyo Emperor59255742Scripts/c59255742.lua4
Accel Synchro Stardust Dragon30983281Scripts/c30983281.lua4
Melffy Playtime Surprise58036097Scripts/c58036097.lua2
Ashtraja Susanoo17020474Scripts/c17020474.lua2
Deftero Enneacraft - "alazoneIA"92171126Scripts/c92171126.lua5
Destiny HERO - Destro-Dogma25158975Scripts/c25158975.lua4
Yomagna the Fire Phantom17350692Scripts/c17350692.lua4
Fiendsmith's Sequence49867899Scripts/c49867899.lua4
D/D/D Alfred the Divine Sage King11852093Scripts/c11852093.lua2
El Shaddoll Apkallone50907446Scripts/c50907446.lua8
Mementotlan Fusion66518509Scripts/c66518509.lua2
Meteoroa Drytron24166324Scripts/c24166324.lua3
...and 13418 more

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)