pull tokens from a blind bag
The basic format of a test definition is <rank> <sum test> <hit/miss test>
. Spaces inside a test definition should be ignored.
The rank is a numerical rank specification, expected to be from 0 to 3, but will only be tested up to the calculated Max Rank of the bag.
The '$' (dollar sign) is used to separate the basic result from the fortune / flipped result.
Only one of the sum or hit/miss tests must be specified, but either may be specified in any order.
The test result is specified by a single character:
- '.' (period) = The pull ends in a Failure
- '-' (hyphen) = The pull ends in a Partial Success, or success with complications
- '+' (plus sign) = The pull ends in a Full Success
- '^' (carat) = The pull ends in a Critical Success
For any given sub test string, the Result will be the final character in the sub test.
A Sum test definition begins with '=' (equal sign) and could look like this: =-2. $-2.
. This says the basic sum would be '-2' and result in a failure. The fortune sum would also be '-2' and also result in a failure.
A Hit/Miss test definition begins with '&' (ampersand), specifies the Hits / Misses Result, and could look like this: & 3/1+ $ 4/0^
. This specifies that the basic result would have three hits and one miss, resulting in a Full Success. The fortune result would have four hits and no misses, resulting in a Critical Success.
The output of a test result will have the initial test specification followed the actual computed result, separated by a semicolon. For example, a rank 0 test that predicted a fortune sum of 0, but computed a fortune sum of 1 could be "0=$0-;$1-".