Skip to content

Duel.GetUsableMZoneCount ​

Signature ​

lua
Duel.GetUsableMZoneCount(int player, [int use_player]) -> int|nil

Description ​

Returns how many Monster Zones player can use for a monster entering the field. use_player defaults to the current reason player and is used for zone-limit checks involving the acting player.

Parameters ​

  • player int
  • use_player int optional - default: current reason player

Returns ​

  • int|nil - Usable Monster Zone count, or nil if player is invalid.

Source ​

  • D:\Programs\GitHub\ygopro-core\libduel.cpp:4939

Guided Examples ​

Learn how to use this function in context:

Used By ​

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

  • Detected in 12 indexed script(s).
  • Search this function in the Script Explorer with Duel.GetUsableMZoneCount.
CardIDScriptDetected Calls
Pendulum Evolution55795155Scripts/c55795155.lua1
D/D/D/D Dimensional King Arc Crisis71398055Scripts/c71398055.lua1
Soul of the Supreme King92428405Scripts/c92428405.lua1
Clown Crew Soiree Operations70058649Scripts/c70058649.lua1
Clown Crew Malabarisme83232904Scripts/c83232904.lua1
Numeron Calling77402960Scripts/c77402960.lua1
Gem-Knight Master Diamond Dispersion25342956Scripts/c25342956.lua1
Supreme King Z-ARC - Synchro Universe48654267Scripts/c48654267.lua1
Magister of Endymion66104644Scripts/c66104644.lua2
Supreme Rage84869738Scripts/c84869738.lua1
Virtual World City - Kauwloon14886190Scripts/c14886190.lua1
A.I.'s Show54374642Scripts/c54374642.lua1

Script Examples ​

Pendulum Evolution (55795155) ​

Source: Scripts/c55795155.lua

lua
	local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
	local ft2=Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_PENDULUM)
	local ft=Duel.GetUsableMZoneCount(tp)
	local ect=c29724053 and Duel.IsPlayerAffectedByEffect(tp,29724053) and c29724053[tp]
	if ect and ect<ft2 then ft2=ect end

D/D/D/D Dimensional King Arc Crisis (71398055) ​

Source: Scripts/c71398055.lua

lua
		local ft2=Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ)
		local ft3=Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_PENDULUM+TYPE_LINK)
		local ft=Duel.GetUsableMZoneCount(tp)
		if ect1 and ect1>ft2 then ft2=ect1 end
		if ect1 and ect1>ft3 then ft3=ect1 end

Soul of the Supreme King (92428405) ​

Source: Scripts/c92428405.lua

lua
	local ft2=Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ)
	local ft3=Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_PENDULUM+TYPE_LINK)
	local ft=Duel.GetUsableMZoneCount(tp)
	if Duel.IsPlayerAffectedByEffect(tp,59822133) then
		if ft1>0 then ft1=1 end