Called when a turn (or phase, or round) changes.
Return the currently active players. Returns an empty array if no phases exist, and an array with a single element of the player whose turn it is if the current phase is set to take turns.
Return all configured phases
Return the current phase. Returns a phase with an empty name if no phases are configured.
Return the current phase. Returns -1 if no phases are configured.
Return the current round
Return the current turn. Returns -1 if currently not in a phase that has turns.
Moves to the next turn. Will also change phase and round as required and cause a message to appear for all players. Does the same as a player clicking on the next turn button in the context menu. Triggers a message for players and the onTurnChanged event.
Moves to the previous turn. Will also change phase and round as required and cause a message to appear for all players. Does the same as a player clicking on the previous turn button in the context menu. Triggers a message for players and the onTurnChanged event.
Set the current phase index
Sets the current round. Does not trigger a message for players or the onTurnChanged event.
Set the current turn. Does not trigger a message for players or the onTurnChanged event.
Set configured phases
Contains methods to interact with the turn system: rounds, phases, and turns. Accessed through GameWorld.turns