fix simnom being able to be negative

This commit is contained in:
Ean Milligan 2025-08-05 16:52:12 -04:00
parent de02ebcc09
commit 959fd6e120
1 changed files with 6 additions and 0 deletions

View File

@ -247,5 +247,11 @@ export const getModifiers = (args: string[]): [RollModifiers, string[]] => {
modifiers.valid = false;
}
if (modifiers.simulatedNominal < 0) {
modifiers.error.name = 'NegativeSimNominal';
modifiers.error.message = 'Number of iterations for `simulatedNominal` must be at least 1';
modifiers.valid = false;
}
return [modifiers, args];
};