fix strength for melee weapons

This commit is contained in:
NilsUeter
2023-05-08 07:48:29 +02:00
parent f4f3e355bf
commit 4c3e3a84e5
2 changed files with 8 additions and 3 deletions
+7 -2
View File
@@ -292,7 +292,12 @@ const getWeaponClassNames = (weapons, index) => {
const calculateWeaponStrength = (strModel, strWeapon) => {
if (strWeapon.startsWith("User")) return strModel;
if (strWeapon.startsWith("x"))
if (strWeapon.startsWith("x")) {
return strModel * parseInt(strWeapon.replace("x", ""));
return strModel + parseInt(strWeapon, 10);
}
if (strWeapon.includes("+")) {
return strModel + parseInt(strWeapon, 10);
}
if (!strWeapon) return strModel;
return parseInt(strWeapon, 10);
};