Card.GetCode
Signature
lua
Card.GetCode(Card c) -> int,int|nilDescription
Returns c's current card code and, when present, its secondary code.
Parameters
cCard
Returns
intint|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.
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)