Skip to content

Card.GetLinkedZone ​

Signature ​

lua
Card.GetLinkedZone(Card c, [int player]) -> int

Description ​

Returns the linked-zone bitmask generated by c. By default the bitmask is from c's controller perspective. Passing player converts the mask to that player's perspective. Use bit helpers such as bit.extract or bit.band when checking whether a specific sequence is pointed to.

Parameters ​

  • c Card
  • player int optional - Perspective player for the returned zone mask. Default: c's controller.

Returns ​

  • int - Linked-zone bitmask from the requested perspective.

Source ​

  • D:\Programs\GitHub\ygopro-core\libcard.cpp:3472

Guided Examples ​

Learn how to use this function in context:

Used By ​

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

  • Detected in 61 indexed script(s).
  • Search this function in the Script Explorer with Card.GetLinkedZone.
CardIDScriptDetected Calls
Azure Ocean Dragon Lord - Neo-Daedalus Rage41570943Scripts/c41570943.lua2
Bujinki Ahashima71095768Scripts/c71095768.lua2
Duel Link Dragon, the Duel Dragon60025883Scripts/c60025883.lua2
Cyberse Contract Witch37458564Scripts/c37458564.lua1
Overburst Dragon15627227Scripts/c15627227.lua2
Cyberse Witch11674673Scripts/c11674673.lua1
Salamangreat Sunlight Wolf87871125Scripts/c87871125.lua1
Cynet Circuit82886276Scripts/c82886276.lua2
S-Force Justify35334193Scripts/c35334193.lua2
Allied Code Talker @Ignister39138610Scripts/c39138610.lua2
Borreload Dragon31833038Scripts/c31833038.lua2
Qliphort Genius22423493Scripts/c22423493.lua1
Battle Shogun of the Six Samurai74752631Scripts/c74752631.lua1
Transcendosaurus Exaraptor56818742Scripts/c56818742.lua1
Appliancer Test66380357Scripts/c66380357.lua2
Xtra HERO Wonder Driver1948619Scripts/c1948619.lua1
Flash Charge Dragon95372220Scripts/c95372220.lua2
Bloom Harmonist the Melodious Composer34974462Scripts/c34974462.lua2
Tindangle Base Gardna94365540Scripts/c94365540.lua1
Parallel Panzer93394164Scripts/c93394164.lua2
Subterror Behemoth Fiendess74937659Scripts/c74937659.lua3
Borreload Liberator Dragon27096833Scripts/c27096833.lua2
Dark Templar @Ignister97383507Scripts/c97383507.lua2
Summon Sorceress61665245Scripts/c61665245.lua2
...and 37 more

Script Examples ​

Azure Ocean Dragon Lord - Neo-Daedalus Rage (41570943) ​

Source: Scripts/c41570943.lua

lua
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
	local zone=bit.band(e:GetHandler():GetLinkedZone(tp),0x1f)
	if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
		and Duel.IsExistingMatchingCard(s.spfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp,zone) end

Bujinki Ahashima (71095768) ​

Source: Scripts/c71095768.lua

lua
		and c71095768[1]==LOCATION_MZONE and re:IsActiveType(TYPE_XYZ)) then return false end
	local c=e:GetHandler()
	local zone=(c:GetLinkedZone(0) & 0x7f) | ((c:GetLinkedZone(1) & 0x7f)<<0x10)
	local seq=c71095768[2]
	return seq and bit.extract(zone,seq)~=0

Source: Scripts/c60025883.lua

lua
end
function c60025883.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
	local zone=bit.band(e:GetHandler():GetLinkedZone(tp),0x1f)
	if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0 and zone~=0 end
	Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)