fix: use fixed precision for percentage

This commit is contained in:
2026-03-20 22:56:28 +07:00 Unverified
parent 422348765b
commit ccd57ff3d6
+2 -1
View File
@@ -123,7 +123,8 @@ function formatValue(
): string {
if (value == null) return "0";
const name = String(key);
if (percentageList.includes(name)) return `${roundPercent(value)}%`;
if (percentageList.includes(name))
return `${roundPercent(value).toFixed(1)}%`;
// if (/HP|ATTACK|DEFENSE|CUR_ATTACK|MAX_HP|CUR_DEFENSE/.test(name))
// return Math.round(Number(value)).toString();
return Math.round(Number(value)).toLocaleString();