Skip to content

Effect.GetActiveType ​

Signature ​

lua
Effect.GetActiveType(Effect e) -> int

Description ​

Returns the active effect type, such as monster, Spell, or Trap. This can differ from the type of the card that activated the effect, such as Pendulum effects being treated as Spell effects.

Parameters ​

  • e Effect

Returns ​

  • int

Source ​

  • D:\Programs\GitHub\ygopro-core\libeffect.cpp:646

Guided Examples ​

Learn how to use this function in context:

Used By ​

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

  • Detected in 36 indexed script(s).
  • Search this function in the Script Explorer with Effect.GetActiveType.
CardIDScriptDetected Calls
Beyond the Pendulum22125101Scripts/c22125101.lua1
Arcana Extra Joker64454614Scripts/c64454614.lua1
PenduLuMoon66150724Scripts/c66150724.lua1
Artifact Durendal69840739Scripts/c69840739.lua2
Myutant Synthesis79194594Scripts/c79194594.lua1
Krishnerd Witch37006702Scripts/c37006702.lua1
Grapha, Dragon Overlord of Dark World39552584Scripts/c39552584.lua2
Exosister Karmael77675029Scripts/c77675029.lua2
Baromet the Sacred Sheep Shrub62967433Scripts/c62967433.lua1
Van'Dalgyon the Dark Dragon Lord24857466Scripts/c24857466.lua1
Myutant Ultimus6182103Scripts/c6182103.lua1
Arias the Labrynth Butler73602965Scripts/c73602965.lua1
Sacred Tree Beast, Hyperyton9349094Scripts/c9349094.lua3
Abyss Actor - Extras88412339Scripts/c88412339.lua1
Pendulum Call53208660Scripts/c53208660.lua1
Ryu Senshi49868263Scripts/c49868263.lua1
Vylon Alpha56768355Scripts/c56768355.lua1
Invoked Mechaba75286621Scripts/c75286621.lua1
Dark Eradicator Warlock29436665Scripts/c29436665.lua1
Vortex of Time42138622Scripts/c42138622.lua1
Arcana Knight Joker6150044Scripts/c6150044.lua1
Des Volstgalph81059524Scripts/c81059524.lua1
Dark Balter the Terrible80071763Scripts/c80071763.lua1
Serial Spell49398568Scripts/c49398568.lua1
...and 12 more

Script Examples ​

Beyond the Pendulum (22125101) ​

Source: Scripts/c22125101.lua

lua
function c22125101.disop(e,tp,eg,ep,ev,re,r,rp)
	local p,loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION)
	if re:GetActiveType()==TYPE_PENDULUM+TYPE_SPELL and p==tp and bit.band(loc,LOCATION_PZONE)~=0 then
		Duel.NegateEffect(ev)
	end

Arcana Extra Joker (64454614) ​

Source: Scripts/c64454614.lua

lua
end
function c64454614.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
	local rtype=bit.band(re:GetActiveType(),0x7)
	if chk==0 then return Duel.IsExistingMatchingCard(c64454614.costfilter,tp,LOCATION_HAND,0,1,nil,rtype) end
	Duel.DiscardHand(tp,c64454614.costfilter,1,1,REASON_COST+REASON_DISCARD,nil,rtype)

PenduLuMoon (66150724) ​

Source: Scripts/c66150724.lua

lua
function c66150724.disop(e,tp,eg,ep,ev,re,r,rp)
	local p,loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION)
	if re:GetActiveType()==TYPE_PENDULUM+TYPE_SPELL and p==tp and bit.band(loc,LOCATION_PZONE)~=0 then
		Duel.NegateEffect(ev)
	end