v2.5.3: fixed wards not being targetable when inside solid terrain

This commit is contained in:
Evan Debenham
2024-09-30 13:44:45 -04:00
committed by Evan Debenham
parent 789ca665c3
commit 15eb83aa5e

View File

@@ -121,11 +121,7 @@ public class WandOfWarding extends Wand {
} }
} }
if (!Dungeon.level.passable[target]){ if (ch != null){
GLog.w( Messages.get(this, "bad_location"));
Dungeon.level.pressCell(target);
} else if (ch != null){
if (ch instanceof Ward){ if (ch instanceof Ward){
if (wardAvailable) { if (wardAvailable) {
((Ward) ch).upgrade( buffedLvl() ); ((Ward) ch).upgrade( buffedLvl() );
@@ -138,6 +134,10 @@ public class WandOfWarding extends Wand {
Dungeon.level.pressCell(target); Dungeon.level.pressCell(target);
} }
} else if (!Dungeon.level.passable[target]){
GLog.w( Messages.get(this, "bad_location"));
Dungeon.level.pressCell(target);
} else { } else {
Ward ward = new Ward(); Ward ward = new Ward();
ward.pos = target; ward.pos = target;