Added support for AoE attacks in the combat engine

This commit is contained in:
Mads Boddum
2016-12-02 10:29:05 +01:00
parent 2aca3aa8e1
commit f0612e3da0
4 changed files with 47 additions and 11 deletions
@@ -798,6 +798,12 @@ public class CreatureObject extends TangibleObject {
return items;
}
public boolean isAttackable(CreatureObject otherObject) {
Posture otherPosture = otherObject.getPosture();
return isEnemy(otherObject) && otherPosture != Posture.INCAPACITATED && otherPosture != Posture.DEAD;
}
@Override
public boolean isEnemy(TangibleObject otherObject) {
boolean tangibleEnemy = super.isEnemy(otherObject);