On this page:
cd6
simulate-test
analyze-test
Version: 4.1.1

2 "Shadowrun"

 (require (planet "shadowrun.ss" ("murphy" "rpg-utils.plt" 1 0)))

Specific procedures for the "Shadowrun" role playing game system.

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

  

generator

 

:

 

pseudo-random-generator?

 

 

 

=

 

(current-pseudo-random-generator)

Simulates a cumulative D6 dice roll and returns a random natural number.

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

(simulate-test skill target [generator])  test-result?

  skill : exact-nonnegative-integer?

  target : exact-nonnegative-integer?

  

generator

 

:

 

pseudo-random-generator?

 

 

 

=

 

(current-pseudo-random-generator)

Simulates a skill test. The value of the skill or attribute is given by skill, the difficulty of the test by target.

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

This procedure returns a test-result structure with the number of successes as its value.

(analyze-test skill target)  test-statistics?

  skill : exact-nonnegative-integer?

  target : exact-nonnegative-integer?

Determines the statistical properties of a skill test. The value of the skill or attribute is given by skill, the difficulty of the test by target.

This procedure returns a test-statistics structure with the expected number of successes as its expectation.