Cycle 13/Ruleset Draft: Difference between revisions
miraheze>4st |
miraheze>Randomnetcat Loop effect ordering |
||
| Line 22: | Line 22: | ||
== Loops == | == Loops == | ||
Loop priority is a strict weak order over rules, defined as follows: | |||
* A persistent rule has higher loop priority than an ephemeral rule. | |||
* Otherwise, a rule with lexicographically earlier title has higher loop priority than a rule with lexicographically later title. | |||
* Otherwise, two rules have the same loop priority. | |||
The phase counter is an integer, initially 0. | The phase counter is an integer, initially 0. | ||
| Line 27: | Line 33: | ||
* The phase counter is incremented by 1. | * The phase counter is incremented by 1. | ||
* If the phase counter is not less than 9, the following occur in order: | * If the phase counter is not less than 9, the following occur in order: | ||
** The current loop is considered to end, and | ** The current loop is considered to end, and effects defined by the rules as occurring at the end of a loop by other rules occur. These effects occur simultaneously, except that effects in rules with higher loop priority happen before effects in rules with lower loop priority, and effects provided for earlier in a rule's text happen before effects provided for later in that rule's text. | ||
** All rules that are not persistent are simultaneously repealed | ** All rules that are not persistent are simultaneously repealed | ||
** All items that are not defined as persistent by the rules are removed from inventories. | ** All items that are not defined as persistent by the rules are removed from inventories. | ||
** The phase counter is set to 0. | ** The phase counter is set to 0. | ||
When a new phase begins while the phase counter is 0, a new loop is considered to begin, and | When a new phase begins while the phase counter is 0, a new loop is considered to begin, and effects defined by the rules as occurring at the beginning of a loop occur. These effects occur simultaneously, except that effects in rules with lower loop priority happen before effects in rules with higher loop priority, and effects provided for earlier in a rule's text happen before effects provided for later in that rule's text. | ||
Rules and items that are not persistent are "ephemeral". | Rules and items that are not persistent are "ephemeral". | ||