1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
+
-
+
+
+
+
+
+
|
The phases of the turn are:
* Input phase
* Begin phase
* Trigger phase
* End phase
* Animation phase
* Cleanup phase
<h2>Input phase</h2>
There is a [Hero Mesh key name|Hero Mesh keycode] present; the KEY message is sent, either to the popup quiz object (if any), or to all objects with the Input flag if there is currently no popup quiz object.
If IgnoreKey is used, then the game engine checks that only unchanging operations are performed and the rest of the turn is skipped. The move is not entered into the replay list in this case.
<h2>Begin phase</h2>
The BEGIN_TURN message is sent to all objects.
In some cases, this phase may be skipped.
<h2>Trigger phase</h2>
First, any destroyed compatible objects are garbage collected.
Next, the MOVED, DEPARTED, ARRIVED, and/or LASTIMAGE messages may be sent to objects as applicable; the Image variable may also be changed.
Next, the MOVED, DEPARTED, ARRIVED, and/or LASTIMAGE messages may be sent to objects as applicable; the Image variable may also be changed. LASTIMAGE is sent during the trigger phase only for busy objects.
The trigger phase is then repeated if there are any more triggers to perform.
<h2>End phase</h2>
The END_TURN message is sent.
The trigger phase is then repeated if there are any more triggers to perform.
<h2>Animation phase</h2>
The LASTIMAGE message is sent to non-busy objects.
This phase may occur multiple times depending on how the animations are set.
<h2>Cleanup phase</h2>
First, the CLEANUP message is sent to all objects; there are restrictions on the possible actions to be performed at this time.
Next, all destroyed objects are garbage collected (only incompatible ones will still be waiting to be garbage collected, though).
Next, any remaining objects have their Distance variable set to zero and their Done and KeyCleared flags cleared.
|