Browse Source

Unused method removed

combat-2
MagicBot 8 months ago
parent
commit
6a0599a972
  1. 22
      src/engine/objects/CharacterItemManager.java

22
src/engine/objects/CharacterItemManager.java

@ -2371,28 +2371,6 @@ public class CharacterItemManager { @@ -2371,28 +2371,6 @@ public class CharacterItemManager {
}
//Damage a random piece of armor a specified amount
public void damageRandomArmor(int amount) {
ArrayList<Item> armor = new ArrayList<>();
if (this.equipped.containsKey(Enum.EquipSlotType.LHELD)) {
Item item = this.equipped.get(Enum.EquipSlotType.LHELD);
if (ItemTemplate.isShield(item))
armor.add(item);
}
for (Item equipment : this.equipped.values())
if (equipment.template.item_type.equals(ItemType.ARMOR))
armor.add(equipment);
if (armor.isEmpty())
return; //nothing to damage
int roll = ThreadLocalRandom.current().nextInt(armor.size());
damageItem(armor.get(roll), amount);
}
//Damage all equipped gear a random amount between 1 and 5
public void damageAllGear() {
for (Item gear : this.equipped.values()) {

Loading…
Cancel
Save