Skip to content

Card.GetAttribute ​

Signature ​

lua
Card.GetAttribute(Card c) -> int

Description ​

Returns c's current Attribute bitmask. Cards treated as having multiple Attributes can return a bitwise combination of ATTRIBUTE_* values.

Parameters ​

  • c Card

Returns ​

  • int

Source ​

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

Used By ​

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

  • Detected in 172 indexed script(s).
  • Search this function in the Script Explorer with Card.GetAttribute.
CardIDScriptDetected Calls
Surprise Fusion35167375Scripts/c35167375.lua4
Spellbook of the Grand Circle11911336Scripts/c11911336.lua2
Mixousia the Confounder80843006Scripts/c80843006.lua3
Spirit Illusion71939275Scripts/c71939275.lua3
D/D Count Surveyor5997110Scripts/c5997110.lua1
Sonic Tracker17888577Scripts/c17888577.lua2
Supreme King Dragon Lightwurm41908872Scripts/c41908872.lua2
Trirealm Rift Judgment65195679Scripts/c65195679.lua2
Duel Link Dragon, the Duel Dragon60025883Scripts/c60025883.lua1
Super Duper Polymerization44886582Scripts/c44886582.lua1
Magikey Dragon - Andrabime71159974Scripts/c71159974.lua6
Rank-Up-Magic Astral Force45950291Scripts/c45950291.lua2
Number 101: Silent Honor ARK - Soul Asylum2419596Scripts/c2419596.lua1
Super Quantal Mech Ship Magnacarrier10424147Scripts/c10424147.lua2
Shaddoll Schism21011044Scripts/c21011044.lua1
Purrely Sharely!?10780049Scripts/c10780049.lua2
Genex Ally Triforce52709508Scripts/c52709508.lua1
Hyperinvoked Aeon33166263Scripts/c33166263.lua1
Genex Ally Triarm17760003Scripts/c17760003.lua1
Rescue Hedgehog99742859Scripts/c99742859.lua1
Psychic Arsenal16238373Scripts/c16238373.lua3
Max Metalmorph89812483Scripts/c89812483.lua2
Disaster, Dragon Ruler of All Apocalypses67359907Scripts/c67359907.lua2
R-Genex Undine34568783Scripts/c34568783.lua2
...and 148 more

Script Examples ​

Surprise Fusion (35167375) ​

Source: Scripts/c35167375.lua

lua
end
function s.rafilter(c)
	return c:IsFaceup() and ((RACE_ALL&~c:GetRace())~=0 or (ATTRIBUTE_ALL&~c:GetAttribute())~=0)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)

Spellbook of the Grand Circle (11911336) ​

Source: Scripts/c11911336.lua

lua
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
	local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
	if chk==0 then return g:GetClassCount(Card.GetAttribute)>=4 end
	Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,4,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED)
	Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,2,tp,LOCATION_HAND)

Mixousia the Confounder (80843006) ​

Source: Scripts/c80843006.lua

lua
end
function s.cosfilter(c)
	return c:IsFaceup() and c:GetAttribute()~=ATTRIBUTE_ALL
end
function s.costg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)