LuaAPI.wiki
changeset 1568 bd6376af4de2
parent 1539 7c038e79eddf
child 1569 6bdb276e48b6
--- a/LuaAPI.wiki	Sat Sep 15 14:48:05 2018 +0100
+++ b/LuaAPI.wiki	Sat Sep 15 15:00:55 2018 +0100
@@ -1012,8 +1012,34 @@
 ==== <tt>!GetGameFlag(gameflag)</tt> ====
 Returns `true` if the specified gameflag is enabled, otherwise `false`.
 
+=== Turns ===
+==== `SkipTurn()` (0.9.24) ====
+Forces the current hedgehog to skip its turn.
+
+==== `EndTurn([noTaunts])` (0.9.23) ====
+Ends the current turn immediately.
+
+Normally, a “Coward” taunt may be played and an announcer message may be shown (depending on the situation). Set the optional `noTaunts` parameter to `true` to force the engine to never play a taunt or show a message. `noTaunts` is `false` by default.
+
+==== `Retreat(time [, respectGetAwayTimeFactor)` (0.9.25) ====
+Forces the current turn into the retreating phase, as if the hog made an attack. That is, the current hedgehog is unable to attack or select a weapon, only movement is possible until the retreat time is up.
+
+The retreat time must be set with `time` in milliseconds. By default, this time is automatically multiplied with get-away time percentage from the game scheme for seamless integration with schemes. If you want to ignore the game scheme for some reason and set the retreat time no matter what, set `respectGetAwayTimeFactor` to `false`.
+
+If the current hedgehog was busy doing an attack, the attack is aborted, no shot is made. If this function is called in the ready phase of af a turn, the ready phase continues normally, but the turn will begin in the retreat phase instead.
+
+Note: If you want the turn to end instantly, it is recommended to use `EndTurn` instead.
+
+==== <tt>!SetTurnTimeLeft(newTurnTimeLeft)</tt> (0.9.25) ====
+Set the remaining turn time in milliseconds. The current remaining turn time can be read from the variable `TurnTimeLeft`.
+
+=== <tt>!SetReadyTimeLeft(newReadyTimeLeft)</tt> (0.9.25)
+Set the remaining ready time in milliseconds. The current remaining turn time can be read from the variable `ReadyTimeLeft`.
+
+==== <tt>!EndGame()</tt> ====
+Makes the game end.
+
 === Environment ===
-
 ==== <tt>!SetGravity(percent)</tt> ====
 Changes the current gravity of the game in percent (relative to default, integer value).
 Setting it to 100 will set gravity to default gravity of hedgewars, 200 will double it, etc.
@@ -1070,26 +1096,6 @@
 Explode(500, 100, 100, EXPLNoDamage + EXPLDoNotTouchAny + EXPLNoGfx)
 </code>
 
-==== `SkipTurn()` (0.9.24) ====
-Forces the current hedgehog to skip its turn.
-
-==== `EndTurn([noTaunts])` (0.9.23) ====
-Ends the current turn immediately.
-
-Normally, a “Coward” taunt may be played and an announcer message may be shown (depending on the situation). Set the optional `noTaunts` parameter to `true` to force the engine to never play a taunt or show a message. `noTaunts` is `false` by default.
-
-==== `Retreat(time [, respectGetAwayTimeFactor)` (0.9.25) ====
-Forces the current turn into the retreating phase, as if the hog made an attack. That is, the current hedgehog is unable to attack or select a weapon, only movement is possible until the retreat time is up.
-
-The retreat time must be set with `time` in milliseconds. By default, this time is automatically multiplied with get-away time percentage from the game scheme for seamless integration with schemes. If you want to ignore the game scheme for some reason and set the retreat time no matter what, set `respectGetAwayTimeFactor` to `false`.
-
-If the current hedgehog was busy doing an attack, the attack is aborted, no shot is made. If this function is called in the ready phase of af a turn, the ready phase continues normally, but the turn will begin in the retreat phase instead.
-
-Note: If you want the turn to end instantly, it is recommended to use `EndTurn` instead.
-
-==== <tt>!EndGame()</tt> ====
-Makes the game end.
-
 === Ammo ===
 ==== <tt>!SetAmmo(ammoType, count, probability, delay, numberInCrate)</tt> ====
 This updates the settings (initial ammo, crate probability, etc.) for a specified [AmmoTypes ammo type]. This must only be used in the `onAmmoStoreInit()` event handler. In other places, this function will not work.