Skip to content

Card.IsAttack ​

Signature ​

lua
Card.IsAttack(Card c, int atk1, [int atk2], [... int]) -> bool

Description ​

Checks whether c is a monster or currently treated as one, and whether its current ATK equals any supplied atk value. Nil atk arguments are skipped. Non-monsters that are not treated as monsters return false.

Parameters ​

  • c Card
  • atk1 int
  • atk2 int optional
  • ... int optional

Returns ​

  • bool

Source ​

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

Used By ​

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

  • Detected in 166 indexed script(s).
  • Search this function in the Script Explorer with Card.IsAttack.
CardIDScriptDetected Calls
Pendulum Evolution55795155Scripts/c55795155.lua1
Spirit Illusion71939275Scripts/c71939275.lua1
D/D Count Surveyor5997110Scripts/c5997110.lua1
Starving Venom Fusion Dragon, Four Heavenly Dragons27118421Scripts/c27118421.lua1
Grandpa Demetto44190146Scripts/c44190146.lua1
Tails of the Fairy Tails82119326Scripts/c82119326.lua1
Union Activation38527680Scripts/c38527680.lua1
Black Garden71645242Scripts/c71645242.lua1
Kaiki the Unity Star60822251Scripts/c60822251.lua1
Drytron Meteonis DA Draconids56863746Scripts/c56863746.lua1
Masterking Archfiend35606858Scripts/c35606858.lua1
Salamangreat Sanctuary1295111Scripts/c1295111.lua1
Jiaotu, Darkness of the Yang Zing25935625Scripts/c25935625.lua1
Egyptian God Slime42166000Scripts/c42166000.lua1
Kuriboh - Multiply!14965712Scripts/c14965712.lua1
Loka Samsara2116237Scripts/c2116237.lua1
Token Support53545926Scripts/c53545926.lua1
Doll House67331360Scripts/c67331360.lua1
Mechanical Mechanic22106558Scripts/c22106558.lua1
Allied Code Talker @Ignister39138610Scripts/c39138610.lua1
Invoked Baybarron70383419Scripts/c70383419.lua1
Box of Friends81587028Scripts/c81587028.lua1
Horoscope Sorcerer, the Stargazer Magician1186447Scripts/c1186447.lua1
The Chaotic Phantasmal Sacred Beasts7894706Scripts/c7894706.lua1
...and 142 more

Script Examples ​

Pendulum Evolution (55795155) ​

Source: Scripts/c55795155.lua

lua
end
function c55795155.thfilter(c,code)
	return c:IsType(TYPE_PENDULUM) and c:IsAttack(2500) and not c:IsCode(code) and c:IsAbleToHand()
end
function c55795155.thtg(e,tp,eg,ep,ev,re,r,rp,chk)

Spirit Illusion (71939275) ​

Source: Scripts/c71939275.lua

lua
	local tc=ec:GetBattleTarget()
	e:SetLabelObject(tc)
	return not ec:IsAttack(0) and tc and tc:IsFaceup()
end
function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk)

D/D Count Surveyor (5997110) ​

Source: Scripts/c5997110.lua

lua
function s.thfilter(c)
	return c:IsSetCard(0xaf) and c:IsType(TYPE_MONSTER)
		and (c:IsAttack(0) or c:IsDefense(0)) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)