Skip to content

INQTest.js.roll.js

kyleady edited this page Jan 30, 2018 · 1 revision

Purpose

Rolls the INQTest before displaying the INQTest to players. This method will then calculate the number of Successes/Failures the test achieved.

Usage

INQTest.prototype.roll()

randomInteger(100) will be used to roll a D100. The roll will be stored in this.Die. The resulting D100 will be inserted into INQTest.js.display.js if used.

The Successes and Failures are saved as integers. To distinguish between 0 Successes and 0 Failures, Successes and Failures are stored separately in this.Successes and this.Failures respectively. If the test is passed, this.Failures will be set to -1. If the test is not passed, this.Successes will be set to -1.

Clone this wiki locally