forked from MagicBane/Server
item_wt refactored to template
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user