Browse Source

Uppercasew for resist enum

combat-2
MagicBot 8 months ago
parent
commit
7d1d8891ff
  1. 6
      src/engine/gameManager/NPCManager.java
  2. 6
      src/engine/objects/Resists.java

6
src/engine/gameManager/NPCManager.java

@ -427,9 +427,9 @@ public enum NPCManager { @@ -427,9 +427,9 @@ public enum NPCManager {
for (MobEquipment equipped : mob.equip.values()) {
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.CRUSHING, mob.resists.getResist(Enum.SourceType.CRUSHING, 0) + equipped.template.combat_attack_resist.get("Crushing"));
mob.resists.setResist(Enum.SourceType.PIERCING, mob.resists.getResist(Enum.SourceType.PIERCING, 0) + equipped.template.combat_attack_resist.get("Piercing"));
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.PIERCING, mob.resists.getResist(Enum.SourceType.PIERCING, 0) + equipped.template.combat_attack_resist.get("PIERCING"));
}
}
}

6
src/engine/objects/Resists.java

@ -164,9 +164,9 @@ public class Resists { @@ -164,9 +164,9 @@ public class Resists {
return phys;
if (armor.template.item_type.equals(Enum.ItemType.ARMOR)) {
phys[0] += armor.template.combat_attack_resist.get("Slashing");
phys[1] += armor.template.combat_attack_resist.get("Crushing");
phys[2] += armor.template.combat_attack_resist.get("Piercing");
phys[0] += armor.template.combat_attack_resist.get("SLASHING");
phys[1] += armor.template.combat_attack_resist.get("CRUSHING");
phys[2] += armor.template.combat_attack_resist.get("PIERCING");
}
return phys;

Loading…
Cancel
Save