Skip to content

Card.IsPreviousControler ​

Signature ​

lua
Card.IsPreviousControler(Card c, int player) -> bool

Description ​

Checks whether c's previous controller was player.

Parameters ​

  • c Card
  • player int

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.
CardIDScriptDetected Calls
Astrograph Sorcerer, the Starfrost Magician48171151Scripts/c48171151.lua1
Astrograph Sorcerer76794549Scripts/c76794549.lua1
Mementotlan Fusion66518509Scripts/c66518509.lua2
Aiwass, Divine Spirit of the Law84288367Scripts/c84288367.lua1
Teleport Fusion36494597Scripts/c36494597.lua1
D/D/D/D Super-Dimensional Sovereign Emperor Zero Paradox97417863Scripts/c97417863.lua1
Bujinki Ahashima71095768Scripts/c71095768.lua1
Chronograph Sorcerer12289247Scripts/c12289247.lua1
Stars Align Above the Shrine15306543Scripts/c15306543.lua1
Mitsurugi Mirror49721684Scripts/c49721684.lua1
Cyber Pharos29719112Scripts/c29719112.lua1
D/D Extra Surveyor74387963Scripts/c74387963.lua1
Flowering Etoile the Melodious Magnificat83793721Scripts/c83793721.lua1
Fossil Fusion59419719Scripts/c59419719.lua1
Supreme King Dragon Lightwurm41908872Scripts/c41908872.lua1
Performapal Celestial Magician58092907Scripts/c58092907.lua1
Cyberse Reminder56337500Scripts/c56337500.lua1
Mementotlan Shleepy50042011Scripts/c50042011.lua1
S:P Little Knight29301450Scripts/c29301450.lua1
Dragon Master Magia12381100Scripts/c12381100.lua1
Windwitch - Crystal Bell25793414Scripts/c25793414.lua1
Seven Stars Slash - Army Annihilator Hagun65114115Scripts/c65114115.lua1
Berserkion the Electromagna Warrior42901635Scripts/c42901635.lua1
Performage Trapeze Magician17016362Scripts/c17016362.lua1
...and 745 more

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)
end

Astrograph 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