-
Notifications
You must be signed in to change notification settings - Fork 1
chance
Daedalus1400 edited this page May 17, 2017
·
2 revisions
The chance condition checks the output of a random number generator.
Added in release version 0.2.0
Must be "chance".
Accepts a number. If "value" is negative, the condition will always return true.
The following example represents a condition that has a 1 in 20 chance of being true:
{"type": "chance", "value": 20}
This is will evaluate as:
java.util.random.nextDouble() * 20 < 1;