Rename some variables
This commit is contained in:
parent
7e5a912cf0
commit
5d3d5bc533
1 changed files with 7 additions and 7 deletions
|
@ -24,13 +24,13 @@ export class DS4Check extends DiceTerm {
|
||||||
this.canFumble = canFumble;
|
this.canFumble = canFumble;
|
||||||
|
|
||||||
// Parse and store check target number
|
// Parse and store check target number
|
||||||
const targetValueModifier = this.modifiers.filter((m) => m[0] === "v")[0];
|
const checkTargetNumberModifier = this.modifiers.filter((m) => m[0] === "v")[0];
|
||||||
const tvRgx = new RegExp("v([0-9]+)?");
|
const ctnRgx = new RegExp("v([0-9]+)?");
|
||||||
const tvMatch = targetValueModifier?.match(tvRgx);
|
const ctnMatch = checkTargetNumberModifier?.match(ctnRgx);
|
||||||
if (tvMatch) {
|
if (ctnMatch) {
|
||||||
const [parseTargetValue] = tvMatch.slice(1);
|
const [parseCheckTargetNumber] = ctnMatch.slice(1);
|
||||||
this.checkTargetNumber = parseTargetValue
|
this.checkTargetNumber = parseCheckTargetNumber
|
||||||
? parseInt(parseTargetValue)
|
? parseInt(parseCheckTargetNumber)
|
||||||
: DS4Check.DEFAULT_CHECK_TARGET_NUMBER;
|
: DS4Check.DEFAULT_CHECK_TARGET_NUMBER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue