Skip to content

Card.GetTurnID ​

Signature ​

lua
Card.GetTurnID(Card c) -> int

Description ​

Returns c's stored turn ID. The core updates this value when the card is added to a location, so scripts commonly compare it with Duel.GetTurnCount() for same-turn timing checks.

Parameters ​

  • c Card

Returns ​

  • int

Source ​

  • D:\Programs\GitHub\ygopro-core\libcard.cpp:3528

Used By ​

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

  • Detected in 51 indexed script(s).
  • Search this function in the Script Explorer with Card.GetTurnID.
CardIDScriptDetected Calls
Unchained Firelord of Yama94014327Scripts/c94014327.lua1
Cubic Mandala8837932Scripts/c8837932.lua1
Xyz Double Back57836546Scripts/c57836546.lua1
Diabrocken the Ominous Specter6083904Scripts/c6083904.lua1
Borrelguard Dragon68987122Scripts/c68987122.lua1
Laundry Trap79371769Scripts/c79371769.lua1
Vampire Scarlet Scourge79523365Scripts/c79523365.lua1
Vampire Red Baron6917479Scripts/c6917479.lua1
Recovery Sorcerer76232522Scripts/c76232522.lua1
Vampire Fraulein6039967Scripts/c6039967.lua1
D/D/D Wave King Caesar3758046Scripts/c3758046.lua1
Fire Phoenix @Ignister24882256Scripts/c24882256.lua1
Officiating Reverie49828011Scripts/c49828011.lua1
Arkbrave Dragon33282498Scripts/c33282498.lua1
Number 92: Heart-eartH Dragon97403510Scripts/c97403510.lua1
Vampire Grimson33438666Scripts/c33438666.lua1
Kuribohrn78355370Scripts/c78355370.lua1
Dark Nephthys38107923Scripts/c38107923.lua1
Ixeep, Omen of the Ghoti3137279Scripts/c3137279.lua1
Battle of Sleeping Spirits46570372Scripts/c46570372.lua1
Number iC1000: Numerounius Numerounia15862758Scripts/c15862758.lua1
Fusion Recycling Plant22829942Scripts/c22829942.lua1
D.D. Telepon51701885Scripts/c51701885.lua1
High Tide on Fire Island32542011Scripts/c32542011.lua1
...and 27 more

Script Examples ​

Unchained Firelord of Yama (94014327) ​

Source: Scripts/c94014327.lua

lua
end
function s.spfilter(c,e,tp,cid)
	return c:IsReason(REASON_DESTROY) and c:GetTurnID()==cid and c:IsRace(RACE_FIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)

Cubic Mandala (8837932) ​

Source: Scripts/c8837932.lua

lua
end
function c8837932.spfilter(c,e,tp,tid)
	return c:IsReason(REASON_DESTROY) and c:IsType(TYPE_MONSTER) and c:GetTurnID()==tid
		and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp) and Duel.IsCanAddCounter(tp,0x1038,1,c)
end

Xyz Double Back (57836546) ​

Source: Scripts/c57836546.lua

lua
function c57836546.filter1(c,e,tp,turn)
	return c:IsType(TYPE_XYZ) and c:IsReason(REASON_DESTROY) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE)
		and c:IsPreviousPosition(POS_FACEUP) and c:GetTurnID()==turn and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
		and Duel.IsExistingTarget(c57836546.filter2,tp,LOCATION_GRAVE,0,1,c,e,tp,c:GetAttack())
end