From b4291693272aede59172774d6a21b87f8ac870d4 Mon Sep 17 00:00:00 2001 From: kron Date: Tue, 12 Aug 2025 10:51:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=82=E6=95=B0=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/util.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/util.js b/src/util.js index 3856ef2..147011a 100644 --- a/src/util.js +++ b/src/util.js @@ -326,8 +326,7 @@ const calcNormalBowTarget = (x, y, diameter) => { // 计算相对距离(0-1之间) let relativeDistance = distance / targetRadius; - relativeDistance -= 0.005; - + relativeDistance += 0.005; // 全环靶有10个环,每个环占半径的10% // 从外到内:1环到10环 // 距离越近靶心,环数越高 @@ -370,13 +369,12 @@ const calcHalfBowTarget = (x, y, diameter, noX = false) => { // 计算相对距离(0-1之间) let relativeDistance = distance / targetRadius; - relativeDistance -= 0.004; if (relativeDistance <= 0.1) return noX ? 10 : "X"; if (relativeDistance <= 0.2) return noX ? 9 : 10; if (relativeDistance <= 0.4) return 9; if (relativeDistance <= 0.6) return 8; if (relativeDistance <= 0.8) return 7; - if (relativeDistance <= 1.0) return 6; + if (relativeDistance <= 0.992) return 6; return 0; // 脱靶 };