Duel.GetOverlayCount
Signature
lua
Duel.GetOverlayCount(int player, int s, int o) -> int|nilDescription
Returns the number of Xyz Materials attached to cards in player-relative locations s and o.
Parameters
playerintsintoint
Returns
int|nil- Overlay count, or nil if player is invalid.
Source
D:\Programs\GitHub\ygopro-core\libduel.cpp:5016
Guided Examples
Learn how to use this function in context:
Used By
Generated from the local Scripts/ folder and cards.cdb.
- Detected in 10 indexed script(s).
- Search this function in the Script Explorer with
Duel.GetOverlayCount.
| Card | ID | Script | Detected Calls |
|---|---|---|---|
| Rank-Up-Magic Barian's Force | 47660516 | Scripts/c47660516.lua | 1 |
| Xyz Lay | 43150717 | Scripts/c43150717.lua | 1 |
| Neo Galaxy-Eyes Photon Dragon | 39272762 | Scripts/c39272762.lua | 1 |
| Goblin Biker Troika Griare | 44241999 | Scripts/c44241999.lua | 1 |
| Prima Materiactor | 57448410 | Scripts/c57448410.lua | 1 |
| Empress of Prophecy | 770365 | Scripts/c770365.lua | 1 |
| Stoic Challenge | 37364101 | Scripts/c37364101.lua | 1 |
| Overlay Sentinel | 39229392 | Scripts/c39229392.lua | 1 |
| Overlay Eater | 81816475 | Scripts/c81816475.lua | 1 |
| Night Papilloperative | 2191144 | Scripts/c2191144.lua | 2 |
Script Examples
Rank-Up-Magic Barian's Force (47660516)
Source: Scripts/c47660516.lua
lua
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
if Duel.GetOverlayCount(tp,0,1)~=0 then
Duel.BreakEffect()
local g1=Duel.GetOverlayGroup(tp,0,1)Xyz Lay (43150717)
Source: Scripts/c43150717.lua
lua
end
function s.atkval(e,c)
return Duel.GetOverlayCount(e:GetHandlerPlayer(),1,1)*200
endNeo Galaxy-Eyes Photon Dragon (39272762)
Source: Scripts/c39272762.lua
lua
end
function c39272762.attg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetOverlayCount(tp,0,1)~=0 end
end
function c39272762.atop(e,tp,eg,ep,ev,re,r,rp)