@Override public boolean attack(Char enemy) { if (canTryToSummon() && pos == CityBossLevel.pedestal(nextPedestal)) { summon(); return true; } else { if (Actor.findChar(CityBossLevel.pedestal(nextPedestal)) == enemy) { nextPedestal = !nextPedestal; } return super.attack(enemy); } }
private boolean canTryToSummon() { if (Undead.count < maxArmySize()) { Char ch = Actor.findChar(CityBossLevel.pedestal(nextPedestal)); return ch == this || ch == null; } else { return false; } }
@Override protected boolean canAttack(Char enemy) { return canTryToSummon() ? pos == CityBossLevel.pedestal(nextPedestal) : Level.adjacent(pos, enemy.pos); }
@Override protected boolean getCloser(int target) { return canTryToSummon() ? super.getCloser(CityBossLevel.pedestal(nextPedestal)) : super.getCloser(target); }