v0.7.1d: fixed dwarf king attacking when he should try to summon

This commit is contained in:
Evan Debenham 2019-01-16 21:27:41 -05:00
parent 109e710c36
commit 439e6b078e

View File

@ -109,6 +109,13 @@ public class King extends Mob {
super.getCloser( target );
}
@Override
protected boolean canAttack( Char enemy ) {
return canTryToSummon() ?
pos == ((CityBossLevel)Dungeon.level).pedestal( nextPedestal ) :
Dungeon.level.adjacent( pos, enemy.pos );
}
private boolean canTryToSummon() {
if (Undead.count < maxArmySize()) {
Char ch = Actor.findChar( ((CityBossLevel)Dungeon.level).pedestal( nextPedestal ) );