Skip to content

Card.IsLocation ​

Signature ​

lua
Card.IsLocation(Card c, int location) -> bool

Description ​

Checks whether c is currently in location. Cards treated as not being on the field return false for field locations, including during a Summon before it successfully reaches the Monster Zone.

Parameters ​

  • c Card
  • location int

Returns ​

  • bool

Source ​

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

Used By ​

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

  • Detected in 5851 indexed script(s).
  • Search this function in the Script Explorer with Card.IsLocation.
CardIDScriptDetected Calls
Salamandra with Chain62091148Scripts/c62091148.lua5
Astrograph Sorcerer, the Starfrost Magician48171151Scripts/c48171151.lua4
Pendulum Evolution55795155Scripts/c55795155.lua1
Lady's Dragonmaid48658295Scripts/c48658295.lua5
Surprise Fusion35167375Scripts/c35167375.lua1
Astrograph Sorcerer76794549Scripts/c76794549.lua4
Spellbook of the Grand Circle11911336Scripts/c11911336.lua1
Ultra Polymerization76647978Scripts/c76647978.lua2
Goyo Emperor59255742Scripts/c59255742.lua2
Melffy Playtime Surprise58036097Scripts/c58036097.lua2
Ashtraja Susanoo17020474Scripts/c17020474.lua3
Destiny HERO - Destro-Dogma25158975Scripts/c25158975.lua4
Fiendsmith's Sequence49867899Scripts/c49867899.lua6
D/D/D Alfred the Divine Sage King11852093Scripts/c11852093.lua7
Mementotlan Fusion66518509Scripts/c66518509.lua2
Meteoroa Drytron24166324Scripts/c24166324.lua1
Mixousia the Confounder80843006Scripts/c80843006.lua1
Gem-Knight Dispersion24220368Scripts/c24220368.lua2
Invoked Sorath43989315Scripts/c43989315.lua1
Performage Cup Tricker6812770Scripts/c6812770.lua3
Ehther the Heavenly Monarch96570609Scripts/c96570609.lua1
Spirit Illusion71939275Scripts/c71939275.lua1
Lubellion the Searing Dragon70534340Scripts/c70534340.lua5
Destratification Dino Stratiae3841104Scripts/c3841104.lua2
...and 5827 more

Script Examples ​

Salamandra with Chain (62091148) ​

Source: Scripts/c62091148.lua

lua
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
	if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end
	if chk==0 then return e:IsCostChecked()
		and Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end

Astrograph Sorcerer, the Starfrost Magician (48171151) ​

Source: Scripts/c48171151.lua

lua
function s.spfilter1(c,e,tp)
	if not c:IsCanBeSpecialSummoned(e,0,tp,false,false) or not c:IsControler(tp) then return false end
	if c:IsLocation(LOCATION_EXTRA) then return c:IsFaceup() and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 end
	if c:IsLocation(LOCATION_GRAVE) then return aux.NecroValleyFilter()(c) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
	return false

Pendulum Evolution (55795155) ​

Source: Scripts/c55795155.lua

lua
end
function c55795155.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
	if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsCode(13331639) and chkc:IsFaceup() end
	if chk==0 then return Duel.IsExistingTarget(c55795155.atkfilter,tp,LOCATION_MZONE,0,1,nil) end
	Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())