Skip to content

Card.IsAttackable ​

Signature ​

lua
Card.IsAttackable(Card c) -> bool

Description ​

Checks whether c currently satisfies the core's basic attack-capable conditions. The card must be face-up Attack Position, or face-up Defense Position with EFFECT_DEFENSE_ATTACK, and it must not be forbidden, unable to attack, attack-disabled, or under a skipped Battle Phase. This does not check attack-announcement costs.

Parameters ​

  • c Card

Returns ​

  • bool

Source ​

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

Used By ​

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

  • Detected in 54 indexed script(s).
  • Search this function in the Script Explorer with Card.IsAttackable.
CardIDScriptDetected Calls
Number 38: Hope Harbinger Dragon Titanic Galaxy63767246Scripts/c63767246.lua1
X-Saber Gottoms8252010Scripts/c8252010.lua1
Galactikuriboh46261704Scripts/c46261704.lua1
Apple Magician Girl56132807Scripts/c56132807.lua1
Number 53: Heart-eartH23998625Scripts/c23998625.lua1
Inzektor Hopper52601736Scripts/c52601736.lua1
Chocolate Magician Girl7198399Scripts/c7198399.lua1
Kunai with Chain37390589Scripts/c37390589.lua1
Gladiator Beast Noxious67385964Scripts/c67385964.lua1
Puppet Rook77590412Scripts/c77590412.lua1
Butterflyoke75987257Scripts/c75987257.lua1
Eye of Illusion23446369Scripts/c23446369.lua1
Cubic Ascension2434862Scripts/c2434862.lua1
Dark Spirit of Banishment51993760Scripts/c51993760.lua1
Raptor's Ultimate Mace87609391Scripts/c87609391.lua1
Performapal Odd-Eyes Unicorn86157908Scripts/c86157908.lua1
Krystal Avatar20960340Scripts/c20960340.lua1
Giant Kra-Corn8170654Scripts/c8170654.lua1
Gagaga Samurai91499077Scripts/c91499077.lua1
Last Counter86049351Scripts/c86049351.lua1
Cybernetic Hidden Technology92773018Scripts/c92773018.lua1
Memory of an Adversary60080151Scripts/c60080151.lua1
Infected Mail6430659Scripts/c6430659.lua1
Ancient Lamp54912977Scripts/c54912977.lua1
...and 30 more

Script Examples ​

Number 38: Hope Harbinger Dragon Titanic Galaxy (63767246) ​

Source: Scripts/c63767246.lua

lua
	if c:IsRelateToEffect(e) then
		local at=Duel.GetAttacker()
		if at:IsAttackable() and not at:IsImmuneToEffect(e) then
			Duel.CalculateDamage(at,c)
		end

X-Saber Gottoms (8252010) ​

Source: Scripts/c8252010.lua

lua
	local a=Duel.GetAttacker()
	if c:IsRelateToChain() and aux.NecroValleyFilter()(c) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0
		and a:IsAttackable() and a:IsRelateToBattle() and not a:IsImmuneToEffect(e) then
		Duel.BreakEffect()
		Duel.ChangeAttackTarget(c)

Galactikuriboh (46261704) ​

Source: Scripts/c46261704.lua

lua
	if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 and tc:IsLocation(LOCATION_MZONE) then
		local a=Duel.GetAttacker()
		if a:IsAttackable() and not a:IsImmuneToEffect(e) then
			Duel.BreakEffect()
			local mg=Duel.GetMatchingGroup(c46261704.mfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)