Duel.GetCustomActivityCount
Signature
lua
Duel.GetCustomActivityCount(int counter_id, int player, int activity_type) -> intDescription
Returns player 0's or player 1's count for the custom counter_id and ACTIVITY_* type. Counts are reset each turn. In this core, most card-based custom counters only record whether that player has performed a counted activity at least once, while Chain counters can increase and decrease with Chain creation and cancellation.
Parameters
counter_idint- Identifier previously registered with Duel.AddCustomActivityCounter.playerint- Player whose count is read; use 0 or 1.activity_typeint- ACTIVITY_* constant selecting which custom activity map is read.
Returns
int- Stored count for that player, counter ID, and activity type, or 0 if no matching custom counter exists.
Source
D:\Programs\GitHub\ygopro-core\libduel.cpp:5069
Guided Examples
Learn how to use this function in context:
Used By
Generated from the local Scripts/ folder and cards.cdb.
- Detected in 173 indexed script(s).
- Search this function in the Script Explorer with
Duel.GetCustomActivityCount.
| Card | ID | Script | Detected Calls |
|---|---|---|---|
| Deftero Enneacraft - "alazoneIA" | 92171126 | Scripts/c92171126.lua | 1 |
| Enneacraft - Asta.PIXEA | 28454232 | Scripts/c28454232.lua | 1 |
| Tohushaddoll Grysta | 95072744 | Scripts/c95072744.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 |
| Cyberse Reminder | 56337500 | Scripts/c56337500.lua | 1 |
| Enneacraft - Atori.MAR | 54842941 | Scripts/c54842941.lua | 1 |
| Number 99: Utopia Dragonar | 95134948 | Scripts/c95134948.lua | 1 |
| Hi-Speedroid Cork Shooter | 23361526 | Scripts/c23361526.lua | 1 |
| Xtra HERO Cross Crusader | 58004362 | Scripts/c58004362.lua | 1 |
| Dreaming Nemleria | 70155677 | Scripts/c70155677.lua | 1 |
| Thunder Dragonlord | 5206415 | Scripts/c5206415.lua | 2 |
| Megaroid City | 44139064 | Scripts/c44139064.lua | 2 |
| Helping Robo for Underwater Combat | 77856460 | Scripts/c77856460.lua | 1 |
| Chaos Emperor Dragon - Envoy of the End | 82301904 | Scripts/c82301904.lua | 1 |
| Ekto Enneacraft - "tromarIA" | 29570824 | Scripts/c29570824.lua | 1 |
| Enato Enneacraft - "oknirIA" | 55965529 | Scripts/c55965529.lua | 1 |
| Masked HERO Furnace | 58288218 | Scripts/c58288218.lua | 1 |
| Branded Fusion | 44362883 | Scripts/c44362883.lua | 1 |
| Trito Enneacraft - "exapatisIA" | 44716748 | Scripts/c44716748.lua | 1 |
| Proto Enneacraft - "orgIA" | 56187077 | Scripts/c56187077.lua | 1 |
| Dream Tower of Princess Nemleria | 18458255 | Scripts/c18458255.lua | 1 |
| Dawn Angel Kambi | 12500059 | Scripts/c12500059.lua | 1 |
| ...and 149 more |
Script Examples
Deftero Enneacraft - "alazoneIA" (92171126)
Source: Scripts/c92171126.lua
lua
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic()
and Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)Enneacraft - Asta.PIXEA (28454232)
Source: Scripts/c28454232.lua
lua
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic()
and Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)Tohushaddoll Grysta (95072744)
Source: Scripts/c95072744.lua
lua
end
function s.fspcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)