Card.IsPreviousControler
Signature
lua
Card.IsPreviousControler(Card c, int player) -> boolDescription
Checks whether c's previous controller was player.
Parameters
cCardplayerint
Returns
bool
Source
D:\Programs\GitHub\ygopro-core\libcard.cpp:3663
Used By
Generated from the local Scripts/ folder and cards.cdb.
- Detected in 769 indexed script(s).
- Search this function in the Script Explorer with
Card.IsPreviousControler.
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
function c76794549.spcfilter(c,tp)
return c:IsReason(REASON_BATTLE+REASON_EFFECT)
and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c76794549.regcon(e,tp,eg,ep,ev,re,r,rp)Mementotlan Fusion (66518509)
Source: Scripts/c66518509.lua
lua
function s.regop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(s.spcfilter,nil)
if g:IsExists(Card.IsPreviousControler,1,nil,0) then
Duel.RegisterFlagEffect(0,id,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end