fix : use correct icon for % stats
This commit is contained in:
@@ -39,6 +39,7 @@ function statLabel(key: string): string {
|
||||
|
||||
function statIconName(key: string): string | null {
|
||||
const normalized = key.toLowerCase().replace(/[^a-z]/gu, "");
|
||||
if (key.includes("%") && ["hp", "atk", "def"].includes(normalized)) return `${normalized}-percent`;
|
||||
if (["hp", "atk", "def", "em", "er"].includes(normalized)) return normalized;
|
||||
if (["critrate", "crit", "criticalrate"].includes(normalized)) return "critrate";
|
||||
if (["critdmg", "critdamage", "criticaldamage"].includes(normalized)) return "critdmg";
|
||||
|
||||
Reference in New Issue
Block a user