@Override public int getDamage(Unit target) { // terror ! int damage = super.getDamage(target); if (target.getArmy() != ArmiesData.UNDEAD) { target.updateMorale(damage / 10); // undead invocation for (Unit unit : tilePosition.getContent()) { if (unit.getArmyIndex() == armyIndex) { unit.updateHealth(damage); unit.updateMorale(damage / 10); } } } return damage; }
public MoveOrder(Unit unit, Tile destination, int unitIndex) { this.unit = unit; this.origin = unit.getTilePosition(); this.destination = destination; this.unitIndex = unitIndex; }