|
|
@ -293,14 +293,14 @@ public enum NPCManager { |
|
|
|
|
|
|
|
|
|
|
|
float rankModifier = 1 + (guard.getRank() * 0.1f); |
|
|
|
float rankModifier = 1 + (guard.getRank() * 0.1f); |
|
|
|
int primaryStat = 0; |
|
|
|
int primaryStat = 0; |
|
|
|
if(guard.equip == null) { |
|
|
|
if (guard.charItemManager.equipped.isEmpty()) { |
|
|
|
guard.minDamageHandOne = (int) ((guard.mobBase.getDamageMin()) * rankModifier); |
|
|
|
guard.minDamageHandOne = (int) ((guard.mobBase.getDamageMin()) * rankModifier); |
|
|
|
guard.maxDamageHandOne = (int) ((guard.mobBase.getDamageMax()) * rankModifier); |
|
|
|
guard.maxDamageHandOne = (int) ((guard.mobBase.getDamageMax()) * rankModifier); |
|
|
|
guard.speedHandOne = 30.0f; |
|
|
|
guard.speedHandOne = 30.0f; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if (guard.equip.containsKey(Enum.EquipSlotType.RHELD)) { |
|
|
|
if (guard.charItemManager.equipped.containsKey(Enum.EquipSlotType.RHELD)) { |
|
|
|
//has main hand weapon
|
|
|
|
//has main hand weapon
|
|
|
|
Item weapon = guard.equip.get(Enum.EquipSlotType.RHELD); |
|
|
|
Item weapon = guard.charItemManager.equipped.get(Enum.EquipSlotType.RHELD); |
|
|
|
|
|
|
|
|
|
|
|
if (weapon.template.item_primary_attr.equals(Enum.AttributeType.Strength)) |
|
|
|
if (weapon.template.item_primary_attr.equals(Enum.AttributeType.Strength)) |
|
|
|
primaryStat = guard.getStatStrCurrent(); |
|
|
|
primaryStat = guard.getStatStrCurrent(); |
|
|
@ -311,9 +311,9 @@ public enum NPCManager { |
|
|
|
guard.maxDamageHandOne = (int) ((guard.mobBase.getDamageMax() + weapon.template.item_weapon_damage.values().iterator().next()[1]) * rankModifier) + primaryStat; |
|
|
|
guard.maxDamageHandOne = (int) ((guard.mobBase.getDamageMax() + weapon.template.item_weapon_damage.values().iterator().next()[1]) * rankModifier) + primaryStat; |
|
|
|
guard.speedHandOne = weapon.template.item_weapon_wepspeed; |
|
|
|
guard.speedHandOne = weapon.template.item_weapon_wepspeed; |
|
|
|
guard.rangeHandOne = weapon.template.item_weapon_max_range; |
|
|
|
guard.rangeHandOne = weapon.template.item_weapon_max_range; |
|
|
|
} else if (guard.equip.containsKey(Enum.EquipSlotType.LHELD) && !ItemTemplate.isShield(guard.equip.get(Enum.EquipSlotType.LHELD).template)) { |
|
|
|
} else if (guard.charItemManager.equipped.containsKey(Enum.EquipSlotType.LHELD) && !ItemTemplate.isShield(guard.charItemManager.equipped.get(Enum.EquipSlotType.LHELD).template)) { |
|
|
|
//has off hand weapon
|
|
|
|
//has off hand weapon
|
|
|
|
Item weapon = guard.equip.get(Enum.EquipSlotType.LHELD); |
|
|
|
Item weapon = guard.charItemManager.equipped.get(Enum.EquipSlotType.LHELD); |
|
|
|
if (weapon.template.item_primary_attr.equals(Enum.AttributeType.Strength)) |
|
|
|
if (weapon.template.item_primary_attr.equals(Enum.AttributeType.Strength)) |
|
|
|
primaryStat = guard.getStatStrCurrent(); |
|
|
|
primaryStat = guard.getStatStrCurrent(); |
|
|
|
else |
|
|
|
else |
|
|
@ -338,7 +338,7 @@ public enum NPCManager { |
|
|
|
dexterity = 1; |
|
|
|
dexterity = 1; |
|
|
|
int baseDef = guard.mobBase.getDefenseRating(); |
|
|
|
int baseDef = guard.mobBase.getDefenseRating(); |
|
|
|
int armorDefense = 0; |
|
|
|
int armorDefense = 0; |
|
|
|
for(Item equipped : guard.equip.values()) |
|
|
|
for (Item equipped : guard.charItemManager.equipped.values()) |
|
|
|
if (equipped.template.item_type.equals(Enum.ItemType.ARMOR) || ItemTemplate.isShield(equipped.template)) |
|
|
|
if (equipped.template.item_type.equals(Enum.ItemType.ARMOR) || ItemTemplate.isShield(equipped.template)) |
|
|
|
armorDefense += equipped.template.item_defense_rating; |
|
|
|
armorDefense += equipped.template.item_defense_rating; |
|
|
|
guard.defenseRating = dexterity + baseDef + armorDefense; |
|
|
|
guard.defenseRating = dexterity + baseDef + armorDefense; |
|
|
@ -347,10 +347,10 @@ public enum NPCManager { |
|
|
|
public static void setAttackRatingForGuard(Mob guard) { |
|
|
|
public static void setAttackRatingForGuard(Mob guard) { |
|
|
|
int strength = guard.getStatStrCurrent(); |
|
|
|
int strength = guard.getStatStrCurrent(); |
|
|
|
int baseAtr = guard.mobBase.getAttackRating(); |
|
|
|
int baseAtr = guard.mobBase.getAttackRating(); |
|
|
|
if (guard.equip.get(1) != null) |
|
|
|
if (guard.charItemManager.equipped.get(Enum.EquipSlotType.RHELD) != null) |
|
|
|
guard.atrHandOne = baseAtr + (int) ((strength * 0.5f) + (guard.equip.get(Enum.EquipSlotType.RHELD).getItemBase().getPercentRequired() * 4) + (guard.equip.get(Enum.EquipSlotType.RHELD).getItemBase().getPercentRequired() * 3)); |
|
|
|
guard.atrHandOne = baseAtr + (int) ((strength * 0.5f) + (guard.charItemManager.equipped.get(Enum.EquipSlotType.RHELD).getItemBase().getPercentRequired() * 4) + (guard.charItemManager.equipped.get(Enum.EquipSlotType.RHELD).getItemBase().getPercentRequired() * 3)); |
|
|
|
else if (guard.equip.get(2) != null && !ItemTemplate.isShield(guard.equip.get(Enum.EquipSlotType.LHELD).template)) |
|
|
|
else if (guard.charItemManager.equipped.get(Enum.EquipSlotType.LHELD) != null && !ItemTemplate.isShield(guard.charItemManager.equipped.get(Enum.EquipSlotType.LHELD).template)) |
|
|
|
guard.atrHandTwo = baseAtr + (int) ((strength * 0.5f) + (guard.equip.get(Enum.EquipSlotType.LHELD).getItemBase().getPercentRequired() * 4) + (guard.equip.get(Enum.EquipSlotType.LHELD).getItemBase().getPercentRequired() * 3)); |
|
|
|
guard.atrHandTwo = baseAtr + (int) ((strength * 0.5f) + (guard.charItemManager.equipped.get(Enum.EquipSlotType.LHELD).getItemBase().getPercentRequired() * 4) + (guard.charItemManager.equipped.get(Enum.EquipSlotType.LHELD).getItemBase().getPercentRequired() * 3)); |
|
|
|
else |
|
|
|
else |
|
|
|
guard.atrHandOne = baseAtr; |
|
|
|
guard.atrHandOne = baseAtr; |
|
|
|
} |
|
|
|
} |
|
|
@ -424,10 +424,10 @@ public enum NPCManager { |
|
|
|
|
|
|
|
|
|
|
|
public static void applyEquipmentResists(Mob mob){ |
|
|
|
public static void applyEquipmentResists(Mob mob){ |
|
|
|
|
|
|
|
|
|
|
|
if (mob.equip == null) |
|
|
|
if (mob.charItemManager.equipped.isEmpty()) |
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
for (Item equipped : mob.equip.values()) { |
|
|
|
for (Item equipped : mob.charItemManager.equipped.values()) { |
|
|
|
if (equipped.template.item_type.equals(Enum.ItemType.ARMOR)) { |
|
|
|
if (equipped.template.item_type.equals(Enum.ItemType.ARMOR)) { |
|
|
|
mob.resists.setResist(Enum.SourceType.SLASHING, mob.resists.getResist(Enum.SourceType.SLASHING, 0) + equipped.template.combat_attack_resist.get("SLASHING")); |
|
|
|
mob.resists.setResist(Enum.SourceType.SLASHING, mob.resists.getResist(Enum.SourceType.SLASHING, 0) + equipped.template.combat_attack_resist.get("SLASHING")); |
|
|
|
mob.resists.setResist(Enum.SourceType.CRUSHING, mob.resists.getResist(Enum.SourceType.CRUSHING, 0) + equipped.template.combat_attack_resist.get("CRUSHING")); |
|
|
|
mob.resists.setResist(Enum.SourceType.CRUSHING, mob.resists.getResist(Enum.SourceType.CRUSHING, 0) + equipped.template.combat_attack_resist.get("CRUSHING")); |
|
|
|