Card.AddCounter
Signature
lua
Card.AddCounter(Card c, int countertype, int count, [bool singly]) -> boolDescription
Attempts to add count counters of countertype to c and returns whether the core accepted the addition. The card must be affected by the resolving reason effect. The current reason player is used as the player adding the counters. When singly is true, counter-limit checks allow a partial addition up to the remaining limit.
Parameters
cCardcountertypeintcountintsinglybooloptional - default: false
Returns
bool
Source
D:\Programs\GitHub\ygopro-core\libcard.cpp:3683
Guided Examples
Learn how to use this function in context:
Used By
Generated from the local Scripts/ folder and cards.cdb.
- Detected in 144 indexed script(s).
- Search this function in the Script Explorer with
Card.AddCounter.
| Card | ID | Script | Detected Calls |
|---|---|---|---|
| Deftero Enneacraft - "alazoneIA" | 92171126 | Scripts/c92171126.lua | 1 |
| Enneacraft - Asta.PIXEA | 28454232 | Scripts/c28454232.lua | 1 |
| Enneacraft - Archa.TAIL | 81237046 | Scripts/c81237046.lua | 1 |
| Enneacraft - Atil.SPIA | 71801447 | Scripts/c71801447.lua | 1 |
| Enneacraft - Aiza.LEON | 82359538 | Scripts/c82359538.lua | 1 |
| Starving Venom Wing Dragon | 5148778 | Scripts/c5148778.lua | 1 |
| Enneacraft - Atori.MAR | 54842941 | Scripts/c54842941.lua | 1 |
| Endymion, the Mighty Master of Magic | 3611830 | Scripts/c3611830.lua | 2 |
| Angello Vaalmonica | 3048768 | Scripts/c3048768.lua | 1 |
| Bunny Ear Enthusiast | 39643167 | Scripts/c39643167.lua | 1 |
| Reflection of Endymion | 39000945 | Scripts/c39000945.lua | 3 |
| Dimonno Vaalmonica | 30432463 | Scripts/c30432463.lua | 1 |
| Ekto Enneacraft - "tromarIA" | 29570824 | Scripts/c29570824.lua | 1 |
| Magister of Endymion | 66104644 | Scripts/c66104644.lua | 4 |
| Enato Enneacraft - "oknirIA" | 55965529 | Scripts/c55965529.lua | 1 |
| Cubic Rebirth | 71442223 | Scripts/c71442223.lua | 1 |
| Trito Enneacraft - "exapatisIA" | 44716748 | Scripts/c44716748.lua | 1 |
| Proto Enneacraft - "orgIA" | 56187077 | Scripts/c56187077.lua | 1 |
| Limit Code | 86607583 | Scripts/c86607583.lua | 1 |
| Servant of Endymion | 92559258 | Scripts/c92559258.lua | 4 |
| Reversal Box | 2606417 | Scripts/c2606417.lua | 1 |
| Performapal Turn Trooper | 220414 | Scripts/c220414.lua | 1 |
| Cubic Mandala | 8837932 | Scripts/c8837932.lua | 1 |
| Mythical Beast Medusa | 54965929 | Scripts/c54965929.lua | 2 |
| ...and 120 more |
Script Examples
Deftero Enneacraft - "alazoneIA" (92171126)
Source: Scripts/c92171126.lua
lua
function s.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:AddCounter(0x71,1)
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)Enneacraft - Asta.PIXEA (28454232)
Source: Scripts/c28454232.lua
lua
function s.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:AddCounter(0x71,1)
end
function s.cfilter(c)Enneacraft - Archa.TAIL (81237046)
Source: Scripts/c81237046.lua
lua
function s.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:AddCounter(0x71,1)
end
function s.cfilter(c)