On this page:
d20
simulate-test/ attribute
analyze-test/ attribute
simulate-test/ talent
analyze-test/ talent
Version: 4.1.1

3 "Das Schwarze Auge"

 (require (planet "das-schwarze-auge.ss" ("murphy" "rpg-utils.plt" 1 0)))

Specific procedures for the role playing game system "Das Schwarze Auge".

(d20 [generator])  exact-positive-integer?

  

generator

 

:

 

pseudo-random-generator?

 

 

 

=

 

(current-pseudo-random-generator)

Simulates a D20 dice roll and returns a random natural number.

A PRNG to use may optionally be specified via the generator argument.

(simulate-test/attribute

 

attribute

 

 

 

 

 

 [

generator])

 

 

test-result?

  attribute : exact-integer?

  

generator

 

:

 

pseudo-random-generator?

 

 

 

=

 

(current-pseudo-random-generator)

Simulates a plain attribute test. To adjust the difficulty of the test, the given attribute value should be modified by adding or subtracting some small integer.

You may optionally specify a PRNG to use via the generator argument.

This procedure returns a test-result structure with the result of the single simulated D20 roll as its value.

(analyze-test/attribute attribute)  test-statistics?

  attribute : exact-integer?

Determines the statistical properties of a plain attribute test. To adjust the difficulty of the test, the given attribute value should be modified by adding or subtracting a small integer.

This procedure returns a test-statistics structure with the expected result of a single D20 roll as its expectation.

(simulate-test/talent

 

attribute-0

 

 

 

 

 

 

attribute-1

 

 

 

 

 

 

attribute-2

 

 

 

 

 

 

talent

 

 

 

 

 

 [

generator])

 

 

test-result?

  attribute-0 : exact-integer?

  attribute-1 : exact-integer?

  attribute-2 : exact-integer?

  talent : exact-integer?

  

generator

 

:

 

pseudo-random-generator?

 

 

 

=

 

(current-pseudo-random-generator)

Simulates a talent test involving tests of the three given base attributes attribute-0, attribute-1 and attribute-2. To adjust the difficulty of the test, the given talent value should be modified by adding or subtracting some small integer.

You may optionally specify a PRNG to use via the generator argument.

This procedure returns a test-result structure with the remaining talent points not used in the test as its value.

(analyze-test/talent

 

attribute-0

 

 

 

 

 

 

attribute-1

 

 

 

 

 

 

attribute-2

 

 

 

 

 

 

talent)

 

 

test-statistics?

  attribute-0 : exact-integer?

  attribute-1 : exact-integer?

  attribute-2 : exact-integer?

  talent : exact-integer?

Determines the statistical properties of a talent test involving tests of the three given base attributes attribute-0, attribute-1 and attribute-2. To adjust the difficulty of the test, the given talent value should be modified by adding or subtracting some small integer.

This procedure returns a test-statistics structure with the expected remaining talent points not used in the test as its expectation.