Skip to content

Duel.GetOverlayCount ​

Signature ​

lua
Duel.GetOverlayCount(int player, int s, int o) -> int|nil

Description ​

Returns the number of Xyz Materials attached to cards in player-relative locations s and o.

Parameters ​

  • player int
  • s int
  • o int

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.
CardIDScriptDetected Calls
Rank-Up-Magic Barian's Force47660516Scripts/c47660516.lua1
Xyz Lay43150717Scripts/c43150717.lua1
Neo Galaxy-Eyes Photon Dragon39272762Scripts/c39272762.lua1
Goblin Biker Troika Griare44241999Scripts/c44241999.lua1
Prima Materiactor57448410Scripts/c57448410.lua1
Empress of Prophecy770365Scripts/c770365.lua1
Stoic Challenge37364101Scripts/c37364101.lua1
Overlay Sentinel39229392Scripts/c39229392.lua1
Overlay Eater81816475Scripts/c81816475.lua1
Night Papilloperative2191144Scripts/c2191144.lua2

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
end

Neo 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)