Rename an interface
This commit is contained in:
parent
5d3d5bc533
commit
0b98925aeb
1 changed files with 4 additions and 4 deletions
|
@ -6,7 +6,7 @@ export default function evaluateCheck(
|
||||||
minimumFumbleResult = 20,
|
minimumFumbleResult = 20,
|
||||||
canFumble = true,
|
canFumble = true,
|
||||||
}: { maximumCoupResult?: number; minimumFumbleResult?: number; canFumble?: boolean } = {},
|
}: { maximumCoupResult?: number; minimumFumbleResult?: number; canFumble?: boolean } = {},
|
||||||
): DS4SubCheckResult[] {
|
): SubCheckResult[] {
|
||||||
const diceWithSubChecks = assignSubChecksToDice(dice, checkTargetNumber, {
|
const diceWithSubChecks = assignSubChecksToDice(dice, checkTargetNumber, {
|
||||||
maximumCoupResult: maximumCoupResult,
|
maximumCoupResult: maximumCoupResult,
|
||||||
});
|
});
|
||||||
|
@ -81,7 +81,7 @@ function shouldUseCoupForLastSubCheck(
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
interface DS4SubCheckResult extends DieWithSubCheck, DiceTerm.Result {
|
interface SubCheckResult extends DieWithSubCheck, DiceTerm.Result {
|
||||||
success?: boolean;
|
success?: boolean;
|
||||||
failure?: boolean;
|
failure?: boolean;
|
||||||
count?: number;
|
count?: number;
|
||||||
|
@ -94,9 +94,9 @@ function evaluateDiceWithSubChecks(
|
||||||
minimumFumbleResult,
|
minimumFumbleResult,
|
||||||
canFumble,
|
canFumble,
|
||||||
}: { maximumCoupResult: number; minimumFumbleResult: number; canFumble: boolean },
|
}: { maximumCoupResult: number; minimumFumbleResult: number; canFumble: boolean },
|
||||||
): DS4SubCheckResult[] {
|
): SubCheckResult[] {
|
||||||
return results.map((dieWithSubCheck, index) => {
|
return results.map((dieWithSubCheck, index) => {
|
||||||
const result: DS4SubCheckResult = {
|
const result: SubCheckResult = {
|
||||||
...dieWithSubCheck,
|
...dieWithSubCheck,
|
||||||
active: dieWithSubCheck.result <= dieWithSubCheck.checkTargetNumber,
|
active: dieWithSubCheck.result <= dieWithSubCheck.checkTargetNumber,
|
||||||
discarded: dieWithSubCheck.result > dieWithSubCheck.checkTargetNumber,
|
discarded: dieWithSubCheck.result > dieWithSubCheck.checkTargetNumber,
|
||||||
|
|
Loading…
Reference in a new issue