|
|
@ -301,23 +301,23 @@ public enum NPCManager { |
|
|
|
if(guard.equip.containsKey(1)){ |
|
|
|
if(guard.equip.containsKey(1)){ |
|
|
|
//has main hand weapon
|
|
|
|
//has main hand weapon
|
|
|
|
ItemBase weapon = guard.equip.get(1).getItemBase(); |
|
|
|
ItemBase weapon = guard.equip.get(1).getItemBase(); |
|
|
|
if(weapon.isStrBased()) |
|
|
|
if (weapon.isStrBased()) |
|
|
|
primaryStat = guard.getStatStrCurrent(); |
|
|
|
primaryStat = guard.getStatStrCurrent(); |
|
|
|
else |
|
|
|
else |
|
|
|
primaryStat = guard.getStatDexCurrent(); |
|
|
|
primaryStat = guard.getStatDexCurrent(); |
|
|
|
guard.minDamageHandOne = (int)((guard.mobBase.getDamageMin() + weapon.getMinDamage()) * rankModifier) + primaryStat; |
|
|
|
guard.minDamageHandOne = (int) ((guard.mobBase.getDamageMin() + weapon.getMinDamage()) * rankModifier) + primaryStat; |
|
|
|
guard.maxDamageHandOne = (int)((guard.mobBase.getDamageMax() + weapon.getMaxDamage()) * rankModifier) + primaryStat; |
|
|
|
guard.maxDamageHandOne = (int) ((guard.mobBase.getDamageMax() + weapon.getMaxDamage()) * rankModifier) + primaryStat; |
|
|
|
guard.speedHandOne = weapon.getSpeed(); |
|
|
|
guard.speedHandOne = weapon.getSpeed(); |
|
|
|
guard.rangeHandOne = weapon.getRange(); |
|
|
|
guard.rangeHandOne = weapon.getRange(); |
|
|
|
} else if(guard.equip.containsKey(2) && !guard.equip.get(2).getItemBase().isShield()){ |
|
|
|
} else if (guard.equip.containsKey(2) && !ItemTemplate.isShield(guard.equip.get(2).template)) { |
|
|
|
//has off hand weapon
|
|
|
|
//has off hand weapon
|
|
|
|
ItemBase weapon = guard.equip.get(2).getItemBase(); |
|
|
|
ItemBase weapon = guard.equip.get(2).getItemBase(); |
|
|
|
if(weapon.isStrBased()) |
|
|
|
if (weapon.isStrBased()) |
|
|
|
primaryStat = guard.getStatStrCurrent(); |
|
|
|
primaryStat = guard.getStatStrCurrent(); |
|
|
|
else |
|
|
|
else |
|
|
|
primaryStat = guard.getStatDexCurrent(); |
|
|
|
primaryStat = guard.getStatDexCurrent(); |
|
|
|
guard.minDamageHandTwo = (int)((guard.mobBase.getDamageMin() + weapon.getMinDamage()) * rankModifier) + primaryStat; |
|
|
|
guard.minDamageHandTwo = (int) ((guard.mobBase.getDamageMin() + weapon.getMinDamage()) * rankModifier) + primaryStat; |
|
|
|
guard.maxDamageHandTwo = (int)((guard.mobBase.getDamageMax() + weapon.getMaxDamage()) * rankModifier) + primaryStat; |
|
|
|
guard.maxDamageHandTwo = (int) ((guard.mobBase.getDamageMax() + weapon.getMaxDamage()) * rankModifier) + primaryStat; |
|
|
|
guard.speedHandTwo = weapon.getSpeed(); |
|
|
|
guard.speedHandTwo = weapon.getSpeed(); |
|
|
|
guard.rangeHandTwo = weapon.getRange(); |
|
|
|
guard.rangeHandTwo = weapon.getRange(); |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -337,7 +337,7 @@ public enum NPCManager { |
|
|
|
int baseDef = guard.mobBase.getDefenseRating(); |
|
|
|
int baseDef = guard.mobBase.getDefenseRating(); |
|
|
|
int armorDefense = 0; |
|
|
|
int armorDefense = 0; |
|
|
|
for(MobEquipment equipped : guard.equip.values()) |
|
|
|
for(MobEquipment equipped : guard.equip.values()) |
|
|
|
if(equipped.getItemBase().isArmor() || equipped.getItemBase().isShield()) |
|
|
|
if (equipped.getItemBase().isArmor() || ItemTemplate.isShield(equipped.template)) |
|
|
|
armorDefense += equipped.getItemBase().getDefense(); |
|
|
|
armorDefense += equipped.getItemBase().getDefense(); |
|
|
|
guard.defenseRating = dexterity + baseDef + armorDefense; |
|
|
|
guard.defenseRating = dexterity + baseDef + armorDefense; |
|
|
|
} |
|
|
|
} |
|
|
@ -347,7 +347,7 @@ public enum NPCManager { |
|
|
|
int baseAtr = guard.mobBase.getAttackRating(); |
|
|
|
int baseAtr = guard.mobBase.getAttackRating(); |
|
|
|
if (guard.equip.get(1) != null) |
|
|
|
if (guard.equip.get(1) != null) |
|
|
|
guard.atrHandOne = baseAtr + (int) ((strength * 0.5f) + (guard.equip.get(1).getItemBase().getPercentRequired() * 4) + (guard.equip.get(1).getItemBase().getPercentRequired() * 3)); |
|
|
|
guard.atrHandOne = baseAtr + (int) ((strength * 0.5f) + (guard.equip.get(1).getItemBase().getPercentRequired() * 4) + (guard.equip.get(1).getItemBase().getPercentRequired() * 3)); |
|
|
|
else if (guard.equip.get(2) != null && !guard.equip.get(2).getItemBase().isShield()) |
|
|
|
else if (guard.equip.get(2) != null && !ItemTemplate.isShield(guard.equip.get(2).template)) |
|
|
|
guard.atrHandTwo = baseAtr + (int) ((strength * 0.5f) + (guard.equip.get(2).getItemBase().getPercentRequired() * 4) + (guard.equip.get(2).getItemBase().getPercentRequired() * 3)); |
|
|
|
guard.atrHandTwo = baseAtr + (int) ((strength * 0.5f) + (guard.equip.get(2).getItemBase().getPercentRequired() * 4) + (guard.equip.get(2).getItemBase().getPercentRequired() * 3)); |
|
|
|
else |
|
|
|
else |
|
|
|
guard.atrHandOne = baseAtr; |
|
|
|
guard.atrHandOne = baseAtr; |
|
|
|