Skip to content

Card.CheckActivateEffect ​

Signature ​

lua
Card.CheckActivateEffect(Card c, bool neglect_con, bool neglect_cost, bool copy_info) -> Effect|nil,Group|nil,int|nil,int|nil,Effect|nil,int|nil,int|nil

Description ​

Checks whether c has an activation effect that can currently be activated. If neglect_con is true, condition checks are skipped. If neglect_cost is true, cost checks are skipped. When copy_info is true and the matching activation is not a free-chain activation, the returned values include the triggering event information: eg, ep, ev, re, r, and rp. Returns no Lua values when no activation effect is currently usable, so local scripts usually compare the first result with nil.

Parameters ​

  • c Card
  • neglect_con bool - true to skip the activation effect's condition check.
  • neglect_cost bool - true to skip the activation effect's cost check.
  • copy_info bool - true to copy triggering-event information for non-free-chain activations.

Returns ​

  • Effect|nil - The usable activation effect, or nil/no value if none is currently usable.
  • Group|nil - eg when copy_info returns event data.
  • int|nil - ep when copy_info returns event data.
  • int|nil - ev when copy_info returns event data.
  • Effect|nil - re when copy_info returns event data.
  • int|nil - r when copy_info returns event data.
  • int|nil - rp when copy_info returns event data.

Source ​

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

Guided Examples ​

Learn how to use this function in context:

Used By ​

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

  • Detected in 32 indexed script(s).
  • Search this function in the Script Explorer with Card.CheckActivateEffect.
CardIDScriptDetected Calls
Barian's Chaos Draw97769122Scripts/c97769122.lua2
Transonic Bird34072799Scripts/c34072799.lua2
Chef de Nouvelles29251488Scripts/c29251488.lua2
Witchcrafter Genni64756282Scripts/c64756282.lua2
Angello Vaalmonica3048768Scripts/c3048768.lua2
Dimonno Vaalmonica30432463Scripts/c30432463.lua2
Zebufera, Vaalmonican Hallow Heathen2815176Scripts/c2815176.lua2
Witchcrafter Pupils69964858Scripts/c69964858.lua2
Dinomorphia Kentregina48832775Scripts/c48832775.lua2
Darklord Eveningstar10136446Scripts/c10136446.lua2
Predaplant Verte Anaconda70369116Scripts/c70369116.lua2
Joker's Wild81945678Scripts/c81945678.lua2
Dinomorphia Reversion28292031Scripts/c28292031.lua2
Seventh Ascension23153227Scripts/c23153227.lua2
Darklord Tezcatlipoca88234365Scripts/c88234365.lua2
Darklord Amdusc51728779Scripts/c51728779.lua2
Stars Align across the Milky Way20417688Scripts/c20417688.lua2
Ruler of the End of the World3739500Scripts/c3739500.lua2
Darklord Ixchel52840267Scripts/c52840267.lua2
Traptrix Rafflesia6511113Scripts/c6511113.lua2
Darklord Nasten25339070Scripts/c25339070.lua2
Double Spell24096228Scripts/c24096228.lua2
Darklord Nergal18168997Scripts/c18168997.lua2
Numeron Network41418852Scripts/c41418852.lua2
...and 8 more

Script Examples ​

Barian's Chaos Draw (97769122) ​

Source: Scripts/c97769122.lua

lua
function c97769122.cpfilter(c)
	return c:GetType()==TYPE_SPELL and c:IsSetCard(0x175) and c:IsAbleToGraveAsCost()
		and c:CheckActivateEffect(true,true,false)~=nil
end
function c97769122.cptg(e,tp,eg,ep,ev,re,r,rp,chk)

Transonic Bird (34072799) ​

Source: Scripts/c34072799.lua

lua
end
function c34072799.cfilter(c)
	return c:GetType()==TYPE_SPELL+TYPE_RITUAL and c:IsAbleToGraveAsCost() and c:CheckActivateEffect(true,true,false)~=nil
end
function c34072799.rscost(e,tp,eg,ep,ev,re,r,rp,chk)

Chef de Nouvelles (29251488) ​

Source: Scripts/c29251488.lua

lua
end
function s.rfilter(c)
	return c:IsSetCard(0x197) and c:IsAllTypes(TYPE_RITUAL+TYPE_SPELL) and c:CheckActivateEffect(false,true,false)~=nil and c:IsAbleToRemoveAsCost()
end
function s.rsptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)