From 439e6b078ec4bdccf83ddab4bfc1e3d17c1a6ad8 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Wed, 16 Jan 2019 21:27:41 -0500 Subject: [PATCH] v0.7.1d: fixed dwarf king attacking when he should try to summon --- .../shatteredpixeldungeon/actors/mobs/King.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/King.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/King.java index 01ecc38c9..61378e73c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/King.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/King.java @@ -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 ) );