mw-parser/resources/rules.txt
simon 88d707a32e Fixed all failing tests. Two issues:
1. The regression test failures were both errors in the tests rather than in
the code under test;
2. The failure in the 'bulk' test relates to the fact that the new declarative
parser cannot cope with trailing whitespace.
2016-09-23 12:53:00 +01:00

60 lines
2 KiB
Plaintext

## Basic ruleset which just grows trees
;; This ruleset is not very interesting in itself, but is useful as a starting
;; point from which to build more interesting rulesets.
## Vegetation rules
;; rules which populate the world with plants
;; Occasionally, passing birds plant tree seeds into grassland
if state is grassland then 1 chance in 10 state should be heath
;; heath below the treeline grows gradually into forest
if state is heath and altitude is less than 120 then state should be scrub
if state is scrub then 1 chance in 5 state should be forest
;; Forest on fertile land grows to climax
if state is forest and fertility is more than 5 and altitude is less than 70 then state should be climax
;; Climax forest occasionally catches fire (e.g. lightning strikes)
if state is climax then 1 chance in 500 state should be fire
;; Climax forest neighbouring fires is likely to catch fire
if state is climax and some neighbours are fire then 1 chance in 3 state should be fire
;; After fire we get waste
if state is fire then state should be waste
;; And after waste we get pioneer species; if there's a woodland seed
;; source, it's going to be heath, otherwise grassland.
if state is waste and some neighbours are scrub then state should be heath
if state is waste and some neighbours are forest then state should be heath
if state is waste and some neighbours are climax then state should be heath
if state is waste then state should be grassland
## Potential blockers
;; Forest increases soil fertility.
if state is in forest or climax then fertility should be fertility + 1
## Initialisation rules
;; Rules which deal with state 'new' will waste less time if they're near the
;; end of the file
;; below the waterline we have water.
if state is new and altitude is less than 10 then state should be water
;; above the snowline we have snow.
if state is new and altitude is more than 200 then state should be snow
;; otherwise, we have grassland.
if state is new then state should be grassland