v0.6.1a: Lloyd's beacon is no longer blocked by none-hostile creatures

This commit is contained in:
Evan Debenham 2017-08-17 14:10:25 -04:00
parent 35cdb4a2c2
commit 347e95ed6b

View File

@ -29,6 +29,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
import com.shatteredpixel.shatteredpixeldungeon.effects.MagicMissile;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation;
@ -116,7 +117,8 @@ public class LloydsBeacon extends Artifact {
}
for (int i = 0; i < PathFinder.NEIGHBOURS8.length; i++) {
if (Actor.findChar( hero.pos + PathFinder.NEIGHBOURS8[i] ) != null) {
Char ch = Actor.findChar(hero.pos + PathFinder.NEIGHBOURS8[i]);
if (ch != null && !(ch instanceof Mob && !((Mob) ch).hostile)) {
GLog.w( Messages.get(this, "creatures") );
return;
}