Skip to content

Card.GetActivateEffect ​

Signature ​

lua
Card.GetActivateEffect(Card c) -> Effect|nil

Description ​

Returns c's activation effect, the effect with type EFFECT_TYPE_ACTIVATE. This is mainly used for Spell/Trap Cards. Returns nil when the card has no registered activation effect, so guard the result before calling Effect methods. Use the returned Effect to check whether a Field Spell or other Spell/Trap can be activated before moving or resolving it through another effect.

Parameters ​

  • c Card

Returns ​

  • Effect|nil - The activation effect registered on c, or nil if none is registered.

Source ​

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

Guided Examples ​

Learn how to use this function in context:

Used By ​

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

  • Detected in 30 indexed script(s).
  • Search this function in the Script Explorer with Card.GetActivateEffect.
CardIDScriptDetected Calls
Ghostrick Renovation61818176Scripts/c61818176.lua2
Ursarctic Polari27693363Scripts/c27693363.lua2
Sea Stealth Attack19089195Scripts/c19089195.lua3
Favorite Hero11881272Scripts/c11881272.lua2
Triamid Dancer69529337Scripts/c69529337.lua2
Numeron Wall42352091Scripts/c42352091.lua2
The Sacred Waters in the Sky26684111Scripts/c26684111.lua2
Triamid Master32912040Scripts/c32912040.lua2
Performapal Sky Magician73734821Scripts/c73734821.lua2
Super Quantal Alphan Spike72332074Scripts/c72332074.lua2
Bait Doll7165085Scripts/c7165085.lua1
Necrovalley Temple56773577Scripts/c56773577.lua3
Springans Booty7496001Scripts/c7496001.lua3
Triamid Hunter95923441Scripts/c95923441.lua2
Labrynth Archfiend48745395Scripts/c48745395.lua1
Double Spell24096228Scripts/c24096228.lua1
F.A. Overheat32036866Scripts/c32036866.lua2
Dream Mirror of Joy74665651Scripts/c74665651.lua3
Vampire Takeover22900598Scripts/c22900598.lua2
Dream Mirror of Terror1050355Scripts/c1050355.lua3
Malefic Territory75223115Scripts/c75223115.lua2
Ignis Heat, the True Dracowarrior22499034Scripts/c22499034.lua3
Dinomight Knight, the True Dracofighter58984738Scripts/c58984738.lua3
Metaverse89208725Scripts/c89208725.lua2
...and 6 more

Script Examples ​

Ghostrick Renovation (61818176) ​

Source: Scripts/c61818176.lua

lua
end
function c61818176.actfilter(c,tp)
	return c:IsType(TYPE_FIELD) and c:GetActivateEffect():IsActivatable(tp,true,true)
end
function c61818176.activate(e,tp,eg,ep,ev,re,r,rp)

Ursarctic Polari (27693363) ​

Source: Scripts/c27693363.lua

lua
end
function c27693363.actfilter(c,tp)
	return c:IsCode(89264428) and c:GetActivateEffect():IsActivatable(tp,true,true)
end
function c27693363.acttg(e,tp,eg,ep,ev,re,r,rp,chk)

Sea Stealth Attack (19089195) ​

Source: Scripts/c19089195.lua

lua
function c19089195.filter(c,tp)
	return c:IsCode(22702055) and (c:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0)
		and c:GetActivateEffect() and c:GetActivateEffect():IsActivatable(tp,true,true)
end
function c19089195.activate(e,tp,eg,ep,ev,re,r,rp)