Additional tests for dice selection.
This commit is contained in:
parent
00f7e30b41
commit
3f6f9f795f
1 changed files with 16 additions and 0 deletions
|
@ -197,6 +197,22 @@ describe("DS4 Rools with multiple dice and no modifiers.", () => {
|
||||||
new RollResult(40, RollResultStatus.SUCCESS, [1, 20, 15]),
|
new RollResult(40, RollResultStatus.SUCCESS, [1, 20, 15]),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("Should properly maximize throw result with all dice success.", () => {
|
||||||
|
const rollProvider = mockMultipleThrows([15, 4, 12]);
|
||||||
|
|
||||||
|
expect(rollCheckMultipleDice(46, {}, rollProvider)).toEqual(
|
||||||
|
new RollResult(31, RollResultStatus.SUCCESS, [15, 12, 4]),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("Should properly maximize throw result with one dice a failure.", () => {
|
||||||
|
const rollProvider = mockMultipleThrows([15, 8, 20]);
|
||||||
|
|
||||||
|
expect(rollCheckMultipleDice(46, {}, rollProvider)).toEqual(
|
||||||
|
new RollResult(35, RollResultStatus.SUCCESS, [20, 15, 8]),
|
||||||
|
);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("DS4 Rools with multiple dice and min/max modifiers.", () => {
|
describe("DS4 Rools with multiple dice and min/max modifiers.", () => {
|
||||||
|
|
Loading…
Reference in a new issue