item_wt refactored to template

This commit is contained in:
2024-03-03 15:06:44 -05:00
parent 58652ee32f
commit 4dc0f52295
12 changed files with 101 additions and 120 deletions
+3 -3
View File
@@ -359,7 +359,7 @@ public enum CombatManager {
if (wb == null) {
if (abstractCharacter.getStamina() < 1)
attackFailure = true;
} else if (abstractCharacter.getStamina() < wb.getWeight())
} else if (abstractCharacter.getStamina() < weapon.template.item_wt)
attackFailure = true;
//see if attacker is stunned. If so, stop here
@@ -514,7 +514,7 @@ public enum CombatManager {
if (wb == null)
attacker.modifyStamina(-0.5f, attacker, true);
else {
float stam = wb.getWeight() / 3;
float stam = weapon.template.item_wt / 3f;
stam = (stam < 1) ? 1 : stam;
attacker.modifyStamina(-(stam), attacker, true);
}
@@ -1333,7 +1333,7 @@ public enum CombatManager {
if (wb != null)
if (wb.isGlass()) //glass used weighted so fast weapons don't break faster
chance = 9000 / wb.getWeight();
chance = 9000 / weapon.template.item_wt;
//test damaging attackers weapon