Card.IsCode
Signature
lua
Card.IsCode(Card c, int code1, [int code2], [... int]) -> boolDescription
Checks whether c's current card code, or alternate code if it has one, matches any supplied code.
How To Use It
Use this in filters when a card must specifically be one or more card IDs.
lua
function s.matfilter(c)
return c:IsCode(89631139,23995346)
endThis checks the card's current code and alternate code, so copied or changed-code effects can matter.
Parameters
cCardcode1intcode2intoptional...intoptional
Returns
bool
Source
D:\Programs\GitHub\ygopro-core\libcard.cpp:3532
Guided Examples
Learn how to use this function in context:
Used By
Generated from the local Scripts/ folder and cards.cdb.
- Detected in 3019 indexed script(s).
- Search this function in the Script Explorer with
Card.IsCode.
Script Examples
Astrograph Sorcerer, the Starfrost Magician (48171151)
Source: Scripts/c48171151.lua
lua
end
function s.pfilter(c,tp)
return c:IsType(TYPE_PENDULUM) and not c:IsCode(id) and c:GetLeftScale()==1
and not c:IsForbidden() and c:CheckUniqueOnField(tp)
endPendulum Evolution (55795155)
Source: Scripts/c55795155.lua
lua
end
function c55795155.thfilter(c,code)
return c:IsType(TYPE_PENDULUM) and c:IsAttack(2500) and not c:IsCode(code) and c:IsAbleToHand()
end
function c55795155.thtg(e,tp,eg,ep,ev,re,r,rp,chk)Levia-Dragoon - Daedalus (78579058)
Source: Scripts/c78579058.lua
lua
end
function s.costfilter(c)
return c:IsFaceup() and c:IsCode(22702055) and c:IsAbleToGraveAsCost()
end
function s.drcon(e,tp,eg,ep,ev,re,r,rp)