Skip to content

Duel.GetTurnPlayer ​

Signature ​

lua
Duel.GetTurnPlayer() -> int

Description ​

Returns the current turn player.

Returns ​

  • int

Source ​

  • D:\Programs\GitHub\ygopro-core\libduel.cpp:4849

Guided Examples ​

Learn how to use this function in context:

Used By ​

Generated from the local Scripts/ folder and cards.cdb.

  • Detected in 1234 indexed script(s).
  • Search this function in the Script Explorer with Duel.GetTurnPlayer.
CardIDScriptDetected Calls
Artmage Non-Finito74631897Scripts/c74631897.lua1
Mixousia the Confounder80843006Scripts/c80843006.lua1
Ehther the Heavenly Monarch96570609Scripts/c96570609.lua1
Prank-Kids Weather Washer44509529Scripts/c44509529.lua1
PSY-Framelord Omega74586817Scripts/c74586817.lua2
Graydle Split75361204Scripts/c75361204.lua1
Enlightenment Dragon46186135Scripts/c46186135.lua1
Tellusion the Magna Warrior24431911Scripts/c24431911.lua1
PSY-Framelord Zeta37192109Scripts/c37192109.lua3
W:P Fancy Ball4993187Scripts/c4993187.lua1
Transonic Bird34072799Scripts/c34072799.lua1
A Bao A Qu, the Lightless Shadow4731783Scripts/c4731783.lua1
Yummy★Snatchy30581601Scripts/c30581601.lua1
Witchcrafter Celebration6958567Scripts/c6958567.lua1
Flowering Etoile the Melodious Magnificat83793721Scripts/c83793721.lua1
Regenesis Birth27781371Scripts/c27781371.lua1
Vernusylph and the Changing Season37313338Scripts/c37313338.lua2
Magical Hats81210420Scripts/c81210420.lua1
Forbidden Dark Contract with the Swamp King10833828Scripts/c10833828.lua1
Rank-Up-Magic Astral Force45950291Scripts/c45950291.lua1
XYZ-Hyper Dragon Cannon75748977Scripts/c75748977.lua1
Frightfur March74416026Scripts/c74416026.lua2
Prank-Kids Bow-Wow-Bark43886072Scripts/c43886072.lua1
Enneacraft - Atori.MAR54842941Scripts/c54842941.lua1
...and 1210 more

Script Examples ​

Artmage Non-Finito (74631897) ​

Source: Scripts/c74631897.lua

lua
end
function s.fspcon(e,tp,eg,ep,ev,re,r,rp)
	return Duel.GetTurnPlayer()==1-tp
end
function s.filter1(c,e)

Mixousia the Confounder (80843006) ​

Source: Scripts/c80843006.lua

lua
end
function s.fspcon(e,tp,eg,ep,ev,re,r,rp)
	return Duel.GetTurnPlayer()~=tp and Duel.IsMainPhase()
end
function s.filter1(c,e)

Ehther the Heavenly Monarch (96570609) ​

Source: Scripts/c96570609.lua

lua
function c96570609.sumcon(e,tp,eg,ep,ev,re,r,rp)
	local ph=Duel.GetCurrentPhase()
	return Duel.GetTurnPlayer()~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end
function c96570609.cfilter(c)