From 5d3d5bc5337bb98f1f8161749fd0897d11e1c748 Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Sat, 13 Mar 2021 18:50:39 +0100 Subject: [PATCH] Rename some variables --- src/module/rolls/check.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/module/rolls/check.ts b/src/module/rolls/check.ts index 90284037..a3c3b1e9 100644 --- a/src/module/rolls/check.ts +++ b/src/module/rolls/check.ts @@ -24,13 +24,13 @@ export class DS4Check extends DiceTerm { this.canFumble = canFumble; // Parse and store check target number - const targetValueModifier = this.modifiers.filter((m) => m[0] === "v")[0]; - const tvRgx = new RegExp("v([0-9]+)?"); - const tvMatch = targetValueModifier?.match(tvRgx); - if (tvMatch) { - const [parseTargetValue] = tvMatch.slice(1); - this.checkTargetNumber = parseTargetValue - ? parseInt(parseTargetValue) + const checkTargetNumberModifier = this.modifiers.filter((m) => m[0] === "v")[0]; + const ctnRgx = new RegExp("v([0-9]+)?"); + const ctnMatch = checkTargetNumberModifier?.match(ctnRgx); + if (ctnMatch) { + const [parseCheckTargetNumber] = ctnMatch.slice(1); + this.checkTargetNumber = parseCheckTargetNumber + ? parseInt(parseCheckTargetNumber) : DS4Check.DEFAULT_CHECK_TARGET_NUMBER; }