Difference between revisions of "Dice/RollerConfig/MaxRerolls"
(Created page with "{{APIdoc|RollerConfig.MaxRerolls Property}} Gets or sets the maximum number of times a single die may be rerolled. {{ns}} == Syntax == <syntaxhighlight lang="C#"> public uin...") |
m |
||
Line 15: | Line 15: | ||
== Remarks == | == Remarks == | ||
− | The default value for MaxRerolls is 100. This is a per-die limit, and exceeding this limit results in the final result being fixed rather than an exception being thrown. The intent of this property is to allow rerolls to settle even due to strings of bad luck, but to block an expression that would cause an infinite reroll loop such as {{c|1d6rr>=1}} from breaking everything. Every time a die is rerolled, it counts as a new roll for the purposes of [[Dice/RollerConfig/MaxDice|RollerConfig.MaxDice]]. | + | The default value for MaxRerolls is 100. This is a per-die limit, and exceeding this limit results in the final result being fixed rather than an exception being thrown. The intent of this property is to allow rerolls to settle even due to strings of bad luck, but to block an expression that would cause an infinite reroll loop such as {{c|1=1d6rr>=1}} from breaking everything. Every time a die is rerolled, it counts as a new roll for the purposes of [[Dice/RollerConfig/MaxDice|RollerConfig.MaxDice]]. |
Revision as of 18:56, 10 April 2017
Gets or sets the maximum number of times a single die may be rerolled.
- Namespace: Dice
- Assembly: DiceRoller (in DiceRoller.dll)
Syntax
public uint MaxRerolls { get; set; }
Property Value
Type: System.UInt32
The maximum amount of times a die can be rerolled, either due to rerolls, exploding dice, or anything else that rerolls dice. Once a die is rerolled this many times, the final value is fixed (no exception is thrown).
Remarks
The default value for MaxRerolls is 100. This is a per-die limit, and exceeding this limit results in the final result being fixed rather than an exception being thrown. The intent of this property is to allow rerolls to settle even due to strings of bad luck, but to block an expression that would cause an infinite reroll loop such as 1d6rr>=1
from breaking everything. Every time a die is rerolled, it counts as a new roll for the purposes of RollerConfig.MaxDice.