Skip to content

Duel.GetCurrentPhase ​

Signature ​

lua
Duel.GetCurrentPhase() -> int

Description ​

Returns the current phase constant.

Returns ​

  • int

Source ​

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

Guided Examples ​

Learn how to use this function in context:

Used By ​

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

  • Detected in 829 indexed script(s).
  • Search this function in the Script Explorer with Duel.GetCurrentPhase.
CardIDScriptDetected Calls
Accel Synchro Stardust Dragon30983281Scripts/c30983281.lua1
Yomagna the Fire Phantom17350692Scripts/c17350692.lua1
Mementotlan Fusion66518509Scripts/c66518509.lua1
Gem-Knight Dispersion24220368Scripts/c24220368.lua1
Ehther the Heavenly Monarch96570609Scripts/c96570609.lua1
Tohushaddoll Grysta95072744Scripts/c95072744.lua1
PSY-Framelord Omega74586817Scripts/c74586817.lua2
Graydle Split75361204Scripts/c75361204.lua2
Shining Draw35906693Scripts/c35906693.lua2
Barian's Chaos Draw97769122Scripts/c97769122.lua2
Chimera Fusion63136489Scripts/c63136489.lua1
Albion the Branded Dragon87746184Scripts/c87746184.lua2
Ashened to Endlessness34813443Scripts/c34813443.lua2
PSY-Framelord Zeta37192109Scripts/c37192109.lua2
A Bao A Qu, the Lightless Shadow4731783Scripts/c4731783.lua2
Earthbound Servant Geo Gremlin8690387Scripts/c8690387.lua2
Hojo the Vaylantz Warrior88919365Scripts/c88919365.lua1
Duel Link Dragon, the Duel Dragon60025883Scripts/c60025883.lua1
Tearlaments Scheiren572850Scripts/c572850.lua1
K9-EW Special Release Experiment26585784Scripts/c26585784.lua1
Magical Hats81210420Scripts/c81210420.lua2
Tearlaments Havnis37961969Scripts/c37961969.lua1
Frightfur March74416026Scripts/c74416026.lua1
Power Tool Braver Dragon63265554Scripts/c63265554.lua2
...and 805 more

Script Examples ​

Accel Synchro Stardust Dragon (30983281) ​

Source: Scripts/c30983281.lua

lua
end
function c30983281.sccon(e,tp,eg,ep,ev,re,r,rp)
	local ph=Duel.GetCurrentPhase()
	return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end

Yomagna the Fire Phantom (17350692) ​

Source: Scripts/c17350692.lua

lua
	local c=e:GetHandler()
	local chkf=tp
	if Duel.GetCurrentPhase()&(PHASE_DAMAGE+PHASE_DAMAGE_CAL)~=0 then return end
	if not c:IsRelateToChain() or c:IsImmuneToEffect(e) then return end
	local mg1=Duel.GetFusionMaterial(tp):Filter(s.filter1,nil,e)

Mementotlan Fusion (66518509) ​

Source: Scripts/c66518509.lua

lua
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
	local ph=Duel.GetCurrentPhase()
	return (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end