Card.IsReason
Signature
lua
Card.IsReason(Card c, int reason) -> boolDescription
Checks whether c's current reason flags include reason.
Parameters
cCardreasonint
Returns
bool
Source
D:\Programs\GitHub\ygopro-core\libcard.cpp:3554
Used By
Generated from the local Scripts/ folder and cards.cdb.
- Detected in 1268 indexed script(s).
- Search this function in the Script Explorer with
Card.IsReason.
Script Examples
Astrograph Sorcerer, the Starfrost Magician (48171151)
Source: Scripts/c48171151.lua
lua
end
function s.desfilter(c,tp)
return c:IsPreviousControler(tp) and c:IsPreviousPosition(POS_FACEUP) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
and c:GetOriginalType()&TYPE_MONSTER~=0 and c:IsPreviousLocation(LOCATION_ONFIELD)
endAstrograph Sorcerer (76794549)
Source: Scripts/c76794549.lua
lua
end
function c76794549.spcfilter(c,tp)
return c:IsReason(REASON_BATTLE+REASON_EFFECT)
and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD)
endGoyo Emperor (59255742)
Source: Scripts/c59255742.lua
lua
local rc=tc:GetReasonCard()
return eg:GetCount()==1 and rc:IsControler(tp) and rc:GetOwner()~=tp
and tc:IsType(TYPE_MONSTER) and tc:IsReason(REASON_BATTLE) and tc:IsLocation(LOCATION_GRAVE)
end
function c59255742.sptg(e,tp,eg,ep,ev,re,r,rp,chk)