Fix metalclips (#536)

* Fix metalclips

- Removed a check that was preventing metalclips from progressing past 1 clip on a target.

* Fix metalclips

- Fixed a bug limiting the metal clip count to one
This commit is contained in:
Simplicitee 2016-08-12 19:17:49 -04:00 committed by OmniCypher
parent 8a7b372445
commit e93395f71e

View file

@ -414,10 +414,19 @@ public class MetalClips extends MetalAbility {
for (Entity e : GeneralMethods.getEntitiesAroundPoint(ii.getLocation(), 2)) {
if (e instanceof LivingEntity && e.getEntityId() != player.getEntityId()) {
if ((e instanceof Player || e instanceof Zombie || e instanceof Skeleton) && targetEntity == null) {
targetEntity = (LivingEntity) e;
TARGET_TO_ABILITY.put(targetEntity, this);
formArmor();
if ((e instanceof Player || e instanceof Zombie || e instanceof Skeleton)) {
if (targetEntity == null) {
targetEntity = (LivingEntity) e;
TARGET_TO_ABILITY.put(targetEntity, this);
formArmor();
} else if (targetEntity == e) {
formArmor();
} else {
TARGET_TO_ABILITY.get(targetEntity).remove();
targetEntity = (LivingEntity) e;
TARGET_TO_ABILITY.put(targetEntity, this);
formArmor();
}
} else {
DamageHandler.damageEntity(e, 5, this);
ii.getWorld().dropItem(ii.getLocation(), ii.getItemStack());
@ -425,6 +434,7 @@ public class MetalClips extends MetalAbility {
}
ii.remove();
break;
}
}
}