v0.7.1d: fixed dwarf king attacking when he should try to summon
This commit is contained in:
parent
109e710c36
commit
439e6b078e
|
@ -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 ) );
|
||||
|
|
Loading…
Reference in New Issue
Block a user