Skip to content

Card.IsCanHaveCounter ​

Signature ​

lua
Card.IsCanHaveCounter(Card c, int countertype) -> bool

Description ​

Checks whether c can hold counters of countertype.

Parameters ​

  • c Card
  • countertype int

Returns ​

  • bool

Source ​

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

Guided Examples ​

Learn how to use this function in context:

Used By ​

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

  • Detected in 9 indexed script(s).
  • Search this function in the Script Explorer with Card.IsCanHaveCounter.
CardIDScriptDetected Calls
Endymion, the Mighty Master of Magic3611830Scripts/c3611830.lua1
Reflection of Endymion39000945Scripts/c39000945.lua1
Magister of Endymion66104644Scripts/c66104644.lua2
Servant of Endymion92559258Scripts/c92559258.lua1
Mythical Beast Medusa54965929Scripts/c54965929.lua1
Mythical Institution94599451Scripts/c94599451.lua2
Summer97254001Scripts/c97254001.lua1
Spring60600821Scripts/c60600821.lua1
Mythical Bestiary38325384Scripts/c38325384.lua1

Script Examples ​

Endymion, the Mighty Master of Magic (3611830) ​

Source: Scripts/c3611830.lua

lua
end
function c3611830.cfilter(c)
	return c:IsCanHaveCounter(0x1)
end
function c3611830.destg(e,tp,eg,ep,ev,re,r,rp,chk)

Reflection of Endymion (39000945) ​

Source: Scripts/c39000945.lua

lua
end
function c39000945.spfilter(c,e,tp)
	return c:IsCanHaveCounter(0x1) and Duel.IsCanAddCounter(tp,0x1,1,c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c39000945.sptg(e,tp,eg,ep,ev,re,r,rp,chk)

Magister of Endymion (66104644) ​

Source: Scripts/c66104644.lua

lua
end
function c66104644.spfilter(c,e,tp)
	return c:IsFaceup() and c:IsCanHaveCounter(0x1) and Duel.IsCanAddCounter(tp,0x1,1,c)
		and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end