Card.CheckUniqueOnField
Signature
lua
Card.CheckUniqueOnField(Card c, int check_player, [int check_location], [Card|nil icard]) -> boolDescription
Checks whether c can coexist on check_player's field under the current unique-on-field rules. check_location defaults to LOCATION_ONFIELD and is masked to on-field locations. icard can be supplied as an ignored card when testing a pending move.
Parameters
cCard- Card being tested against unique-on-field restrictions.check_playerint- Player whose field is checked for a uniqueness conflict.check_locationintoptional - On-field location mask to check; default: LOCATION_ONFIELD. The core masks this value to LOCATION_ONFIELD.icardCard|niloptional - Optional card ignored during the check, useful when testing a pending replacement or move.
Returns
bool- True if c can coexist under the unique-on-field rules for the requested player and location.
Source
D:\Programs\GitHub\ygopro-core\libcard.cpp:3713
Used By
Generated from the local Scripts/ folder and cards.cdb.
- Detected in 197 indexed script(s).
- Search this function in the Script Explorer with
Card.CheckUniqueOnField.
Script Examples
Astrograph Sorcerer, the Starfrost Magician (48171151)
Source: Scripts/c48171151.lua
lua
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)
end
function s.ptg(e,tp,eg,ep,ev,re,r,rp,chk)D/D/D Alfred the Divine Sage King (11852093)
Source: Scripts/c11852093.lua
lua
end
function s.tffilter(c,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS) and c:IsSetCard(0xae) and c:IsFaceupEx() and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end
function s.mfilter(c)Pere-Zenet Em Heru (46273941)
Source: Scripts/c46273941.lua
lua
end
function s.eqfilter(c,tp)
return c:IsType(TYPE_NORMAL) and c:CheckUniqueOnField(tp) and not c:IsForbidden()
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)