v0.3.1: made the dwarf king's skeletons more responsive to who is attacking their master

This commit is contained in:
Evan Debenham 2015-08-17 19:32:12 -04:00 committed by Evan Debenham
parent 8d604af3f0
commit 2893e67375

View File

@ -157,7 +157,17 @@ public class King extends Mob {
yell( "You cannot kill me, " + Dungeon.hero.givenName() + "... I am... immortal..." ); yell( "You cannot kill me, " + Dungeon.hero.givenName() + "... I am... immortal..." );
} }
@Override
public void aggro(Char ch) {
super.aggro(ch);
for (Mob mob : Dungeon.level.mobs){
if (mob instanceof Undead){
mob.aggro(ch);
}
}
}
private int maxArmySize() { private int maxArmySize() {
return 1 + MAX_ARMY_SIZE * (HT - HP) / HT; return 1 + MAX_ARMY_SIZE * (HT - HP) / HT;
} }