Skip to content

Duel.GetTurnCount ​

Signature ​

lua
Duel.GetTurnCount([int player]) -> int

Description ​

Returns the current turn count. With no player argument, this returns the duel-wide turn number; with player 0 or 1, it returns that player's personal turn count.

Parameters ​

  • player int optional

Returns ​

  • int

Source ​

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

Used By ​

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

  • Detected in 234 indexed script(s).
  • Search this function in the Script Explorer with Duel.GetTurnCount.
CardIDScriptDetected Calls
Astrograph Sorcerer76794549Scripts/c76794549.lua1
D/D/D/D Super-Dimensional Sovereign Emperor Zero Paradox97417863Scripts/c97417863.lua2
PSY-Framelord Zeta37192109Scripts/c37192109.lua2
The Gaze of Timaeus22283204Scripts/c22283204.lua2
Soul of the Supreme King92428405Scripts/c92428405.lua2
K9-EW Special Release Experiment26585784Scripts/c26585784.lua2
Fusion Destiny52947044Scripts/c52947044.lua2
Frightfur March74416026Scripts/c74416026.lua2
The Weather Painter Moonbow95515518Scripts/c95515518.lua2
Ghoti Fury65898344Scripts/c65898344.lua2
Purrelyeap!?82983267Scripts/c82983267.lua2
Raider's Knight28781003Scripts/c28781003.lua2
Bunny Ear Enthusiast39643167Scripts/c39643167.lua2
CXyz N.As.Ch. Knight61374414Scripts/c61374414.lua2
Mekk-Knight Purple Nightfall28692962Scripts/c28692962.lua2
Dangers of the Divine22082432Scripts/c22082432.lua2
Destiny HERO - Doom Overlord62542673Scripts/c62542673.lua2
Marincess Cascade27012990Scripts/c27012990.lua2
Unchained Firelord of Yama94014327Scripts/c94014327.lua1
Snake-Eyes Vengeance Dragon79415624Scripts/c79415624.lua2
Bujincident11221418Scripts/c11221418.lua3
Revendread Evolution7986397Scripts/c7986397.lua2
Metaphys Executor45148985Scripts/c45148985.lua2
Cynet Backdoor43839002Scripts/c43839002.lua2
...and 210 more

Script Examples ​

Astrograph Sorcerer (76794549) ​

Source: Scripts/c76794549.lua

lua
	if not c:IsRelateToEffect(e) then return end
	if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
		local g=Duel.GetMatchingGroup(c76794549.thfilter1,tp,0x70,0x70,nil,tp,Duel.GetTurnCount())
		if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(76794549,4)) then
			Duel.BreakEffect()

D/D/D/D Super-Dimensional Sovereign Emperor Zero Paradox (97417863) ​

Source: Scripts/c97417863.lua

lua
		e1:SetReset(RESET_PHASE+PHASE_END,2)
		e1:SetCountLimit(1)
		e1:SetLabel(fid,Duel.GetTurnCount())
		e1:SetLabelObject(tc)
		e1:SetCondition(c97417863.descon)

PSY-Framelord Zeta (37192109) ​

Source: Scripts/c37192109.lua

lua
		if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_STANDBY then
			e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2)
			e1:SetValue(Duel.GetTurnCount())
		else
			e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN)