Use coups, even if they are higher than the corresponding CTN
This commit is contained in:
parent
e1d376057c
commit
eeb1aa61f4
2 changed files with 10 additions and 0 deletions
|
@ -258,4 +258,12 @@ describe("evaluateCheck with multiple dice and coup / fumble modification", () =
|
|||
{ result: 15, checkTargetNumber: 20, active: true, discarded: false },
|
||||
]);
|
||||
});
|
||||
|
||||
it("should use all the dice if they are coups, even if they are higher than the checkTargetNumber", () => {
|
||||
expect(evaluateCheck([18, 19, 17], 48, { maximumCoupResult: 19 })).toEqual([
|
||||
{ result: 18, checkTargetNumber: 8, active: true, discarded: false, success: true, count: 8 },
|
||||
{ result: 19, checkTargetNumber: 20, active: true, discarded: false, success: true, count: 20 },
|
||||
{ result: 17, checkTargetNumber: 20, active: true, discarded: false, success: true, count: 20 },
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -104,6 +104,8 @@ function evaluateDiceWithSubChecks(
|
|||
if (result.result <= maximumCoupResult) {
|
||||
result.success = true;
|
||||
result.count = result.checkTargetNumber;
|
||||
result.active = true;
|
||||
result.discarded = false;
|
||||
}
|
||||
if (index === 0 && canFumble && result.result >= minimumFumbleResult) result.failure = true;
|
||||
return result;
|
||||
|
|
Loading…
Reference in a new issue