Sticks and Stones/Lithomancer
Lithomancer
Is a role (processing unit) associated with Sticks and Stones. It is an additional and entirely optional component of the system and will have its own specification for mapping stone triggers (interpretation) to human readable outputs.
Each interpretation rule is defined as follows:
<trigger>:<output>
Where:
<output> ::= <string-literal> | <output-type> <value> <output-type> ::= "c" | "i" | "n" <value> ::= "_" <point> <point> | "!" <point> <point> | "^" <point> <point> <point> | <point> "x" | <point> "y" | <constant> <point> ::= "A" | "B" | "C" | "*" | "0" <trigger> ::= <value> | <value> <condition> <value> <condition> ::= "<" | ">" | "="
- _AB = the distance between edges of A and B
- ^ABC = the angle formed by ABC (in degrees rather than radians)
- Ax = x value of stone A
- Ay = y value of stone A
- !AB = Boolean, whether A and B are touching
- _*B = * wildcard stone, distance between B and any stone
- _0B = 0 origin, distance between origin point and (edge of) B
Value output-types
- c : character; output <value> as a Unicode code point based on its integer value
- i : integer; output <value> as an integer (truncate rather than round)
- n : number; output <value> as a number to the highest precision possible
<value> can be any linear combination of <values>, e.g.: _AB+_AB+_BC+Bx+48
.
Examples
Here is one suggested mechanism for deriving character output from the stones, there are many other ways, some may be better:
Every time B and C are brought together, read the distance between A and B in units as an ASCII (or Unicode) value for "output".
!BC:c_AB
Another less useful example:
^A0B>10.05:"Hello!"
= If the angle formed by A0B is greater than 10.05 degrees, output "Hello!"