v0.7.1d: fixed dwarf king attacking when he should try to summon
This commit is contained in:
@@ -109,6 +109,13 @@ public class King extends Mob {
|
|||||||
super.getCloser( target );
|
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() {
|
private boolean canTryToSummon() {
|
||||||
if (Undead.count < maxArmySize()) {
|
if (Undead.count < maxArmySize()) {
|
||||||
Char ch = Actor.findChar( ((CityBossLevel)Dungeon.level).pedestal( nextPedestal ) );
|
Char ch = Actor.findChar( ((CityBossLevel)Dungeon.level).pedestal( nextPedestal ) );
|
||||||
|
|||||||
Reference in New Issue
Block a user