Skip to content

Card.GetCode ​

Signature ​

lua
Card.GetCode(Card c) -> int,int|nil

Description ​

Returns c's current card code and, when present, its secondary code.

Parameters ​

  • c Card

Returns ​

  • int
  • int|nil

Source ​

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

Used By ​

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

  • Detected in 581 indexed script(s).
  • Search this function in the Script Explorer with Card.GetCode.
CardIDScriptDetected Calls
Pendulum Evolution55795155Scripts/c55795155.lua2
Astrograph Sorcerer76794549Scripts/c76794549.lua2
Ehther the Heavenly Monarch96570609Scripts/c96570609.lua2
Ghostrick Renovation61818176Scripts/c61818176.lua2
Prank-Kids Weather Washer44509529Scripts/c44509529.lua1
Converging Wishes20007374Scripts/c20007374.lua1
Graydle Split75361204Scripts/c75361204.lua2
Shining Draw35906693Scripts/c35906693.lua1
Enlightenment Dragon46186135Scripts/c46186135.lua1
Ultimate Crystal Rainbow Dragon Overdrive84544192Scripts/c84544192.lua1
Chimera Fusion63136489Scripts/c63136489.lua1
The Gaze of Timaeus22283204Scripts/c22283204.lua2
Rescue Hamster50485594Scripts/c50485594.lua5
Transonic Bird34072799Scripts/c34072799.lua1
Prank-Kids Rocket Ride18514525Scripts/c18514525.lua1
Gravity Balance37930737Scripts/c37930737.lua1
Regenesis Birth27781371Scripts/c27781371.lua1
Vernusylph and the Changing Season37313338Scripts/c37313338.lua1
Frightfur Meister77522571Scripts/c77522571.lua2
Chaos Magical Hats2372506Scripts/c2372506.lua1
Isolde, Two Tales of the Noble Knights59934749Scripts/c59934749.lua3
Ojamassimilation2390019Scripts/c2390019.lua2
Relinquished Fusion78063197Scripts/c78063197.lua2
Magical Hats81210420Scripts/c81210420.lua1
...and 557 more

Script Examples ​

Pendulum Evolution (55795155) ​

Source: Scripts/c55795155.lua

lua
function c55795155.cfilter(c,tp)
	return c:IsType(TYPE_PENDULUM) and c:IsAbleToDeckAsCost()
		and Duel.IsExistingMatchingCard(c55795155.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetCode())
end
function c55795155.thfilter(c,code)

Astrograph Sorcerer (76794549) ​

Source: Scripts/c76794549.lua

lua
	return c:IsType(TYPE_MONSTER) and c:GetFlagEffect(76794549)~=0
		and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
		and Duel.IsExistingMatchingCard(c76794549.thfilter2,tp,LOCATION_DECK,0,1,nil,c:GetCode())
end
function c76794549.thfilter2(c,code)

Ehther the Heavenly Monarch (96570609) ​

Source: Scripts/c96570609.lua

lua
	if chk==0 then
		local g=Duel.GetMatchingGroup(c96570609.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil)
		return g:GetClassCount(Card.GetCode)>1
			and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
			and Duel.IsExistingMatchingCard(c96570609.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)