From cb76fb81887fa8af054db45cda55d6a3fa094053 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Fri, 13 Dec 2019 21:00:51 -0500 Subject: [PATCH] v0.8.0: bugfixes: - fixed armored statues not dropping armor - fixed tengu rarely throwing bombs into walls --- .../shatteredpixeldungeon/actors/mobs/ArmoredStatue.java | 6 ++++-- .../shatteredpixeldungeon/actors/mobs/NewTengu.java | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/ArmoredStatue.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/ArmoredStatue.java index d67ea29d0..e57934112 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/ArmoredStatue.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/ArmoredStatue.java @@ -98,8 +98,10 @@ public class ArmoredStatue extends Statue { } @Override - public boolean isImmune(Class effect) { - return super.isImmune(effect); + public void die( Object cause ) { + armor.identify(); + Dungeon.level.drop( armor, pos ).sprite.drop(); + super.die( cause ); } @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/NewTengu.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/NewTengu.java index 9202caaf3..6e22eafaa 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/NewTengu.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/NewTengu.java @@ -502,7 +502,7 @@ public class NewTengu extends Mob { //Targets closest cell which is adjacent to target, and at least 3 tiles away for (int i : PathFinder.NEIGHBOURS8){ int cell = target.pos + i; - if (Dungeon.level.distance(cell, thrower.pos) >= 3){ + if (Dungeon.level.distance(cell, thrower.pos) >= 3 && !Dungeon.level.solid[cell]){ if (targetCell == -1 || Dungeon.level.trueDistance(cell, thrower.pos) < Dungeon.level.trueDistance(targetCell, thrower.pos)){ targetCell = cell; @@ -866,7 +866,7 @@ public class NewTengu extends Mob { //Targets closest cell which is adjacent to target, and not adjacent to thrower or another shocker for (int i : PathFinder.NEIGHBOURS8){ int cell = target.pos + i; - if (Dungeon.level.distance(cell, thrower.pos) >= 2){ + if (Dungeon.level.distance(cell, thrower.pos) >= 2 && !Dungeon.level.solid[cell]){ boolean validTarget = true; for (ShockerAbility s : thrower.buffs(ShockerAbility.class)){ if (Dungeon.level.distance(cell, s.shockerPos) < 2){