Free Hero Mesh

Update of "Turn order"
Login
This is a mirror of the main repository for Free Hero Mesh. New tickets and changes will not be accepted at this mirror.
Overview

Artifact ID: 1d7d89932838776b1f9434c9cf11df334568fb27
Page Name:Turn order
Date: 2018-11-22 07:53:07
Original User: zzo38
Next 41b94070e3c1664e48d02f6c1acd2444d92b291f
Content

The phases of the turn are:

Input phase

There is a 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.

Begin phase

The BEGIN_TURN message is sent to all objects.

In some cases, this phase may be skipped.

Trigger phase

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.

The trigger phase is then repeated if there are any more triggers to perform.

End phase

The END_TURN message is sent.

The trigger phase is then repeated if there are any more triggers to perform.

Cleanup phase

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.