make DefaultCheckOptions

This commit is contained in:
Johannes Loher 2021-01-25 01:25:45 +01:00
parent 159f5b8529
commit 637af7c4d0

View file

@ -4,10 +4,10 @@ import { DS4 } from "../config";
* Provides default values for all arguments the `CheckFactory` expects.
*/
class DefaultCheckOptions implements DS4CheckFactoryOptions {
maxCritSuccess = 1;
minCritFailure = 20;
useSlayingDice = false;
rollMode: DS4RollMode = "roll";
readonly maxCritSuccess = 1;
readonly minCritFailure = 20;
readonly useSlayingDice = false;
readonly rollMode: DS4RollMode = "roll";
mergeWith(other: Partial<DS4CheckFactoryOptions>): DS4CheckFactoryOptions {
return { ...this, ...other } as DS4CheckFactoryOptions;