Skip to content

Card.GetCounter ​

Signature ​

lua
Card.GetCounter(Card c, int countertype) -> int

Description ​

Returns counters on c for countertype. When countertype is 0, this core returns the number of different counter types currently present on c, not the total number of all counters.

Parameters ​

  • c Card
  • countertype int

Returns ​

  • int

Source ​

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

Guided Examples ​

Learn how to use this function in context:

Used By ​

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

  • Detected in 123 indexed script(s).
  • Search this function in the Script Explorer with Card.GetCounter.
CardIDScriptDetected Calls
Endymion, the Mighty Master of Magic3611830Scripts/c3611830.lua4
Veda Kalarcanum40785230Scripts/c40785230.lua1
Predaplanet51858200Scripts/c51858200.lua1
Angello Vaalmonica3048768Scripts/c3048768.lua1
Bunny Ear Enthusiast39643167Scripts/c39643167.lua2
Reflection of Endymion39000945Scripts/c39000945.lua3
Dimonno Vaalmonica30432463Scripts/c30432463.lua1
Black-Winged Assault Dragon73218989Scripts/c73218989.lua1
Zebufera, Vaalmonican Hallow Heathen2815176Scripts/c2815176.lua1
Predaplant Daredevil82370493Scripts/c82370493.lua3
Reversal Box2606417Scripts/c2606417.lua2
Predaplant Chlamydosundew89181134Scripts/c89181134.lua3
Alien Mother24104865Scripts/c24104865.lua1
Enneapolis17621695Scripts/c17621695.lua2
Forge a New Future27104921Scripts/c27104921.lua1
Corrosive Scales13235258Scripts/c13235258.lua1
Zushin the Sleeping Giant67547370Scripts/c67547370.lua1
Cubic Causality38606913Scripts/c38606913.lua2
Alien Shocktrooper M-Frame74974229Scripts/c74974229.lua1
Predaplant Longinephila44994712Scripts/c44994712.lua2
Vaalmonica Ereditare14972952Scripts/c14972952.lua2
Summer Schoolwork Successful!77751766Scripts/c77751766.lua1
Endymion, the Master Magician40732515Scripts/c40732515.lua1
Aiza the Dragoness of Deranged Devotion63378869Scripts/c63378869.lua2
...and 99 more

Script Examples ​

Endymion, the Mighty Master of Magic (3611830) ​

Source: Scripts/c3611830.lua

lua
end
function c3611830.thfilter(c)
	return c:GetCounter(0x1)>0 and c:IsAbleToHand()
end
function c3611830.negtg(e,tp,eg,ep,ev,re,r,rp,chk)

Veda Kalarcanum (40785230) ​

Source: Scripts/c40785230.lua

lua
end
function c40785230.scval(e,c)
	return c:GetCounter(0x69)
end
function c40785230.spcost(e,tp,eg,ep,ev,re,r,rp,chk)

Predaplanet (51858200) ​

Source: Scripts/c51858200.lua

lua
}
function c51858200.cfilter(c)
	return c:IsLocation(LOCATION_MZONE) and c:GetCounter(0x1041)>0
end
function c51858200.regop(e,tp,eg,ep,ev,re,r,rp)