v1.2.1: fixed DK not targetable with thrown items or wands on his throne

This commit is contained in:
Evan Debenham
2022-04-02 14:44:04 -04:00
parent d323b95917
commit b4e9e89cd5
2 changed files with 11 additions and 3 deletions

View File

@@ -138,6 +138,10 @@ public class DwarfKing extends Mob {
@Override
protected boolean act() {
if (pos == CityBossLevel.throne){
throwItems();
}
if (phase == 1) {
if (summonCooldown <= 0 && summonSubject(Dungeon.isChallenged(Challenges.STRONGER_BOSSES) ? 2 : 3)){

View File

@@ -114,9 +114,13 @@ public class Ballistica {
int err = dA / 2;
while (Dungeon.level.insideMap(cell)) {
//if we're in a wall, collide with the previous cell along the path.
//we don't use solid here because we don't want to stop short of closed doors
if (stopTerrain && cell != sourcePos && !Dungeon.level.passable[cell] && !Dungeon.level.avoid[cell]) {
//if we're in solid terrain, and there's no char there, collide with the previous cell.
// we don't use solid here because we don't want to stop short of closed doors.
if (stopTerrain
&& cell != sourcePos
&& !Dungeon.level.passable[cell]
&& !Dungeon.level.avoid[cell]
&& Actor.findChar(cell) == null) {
collide(path.get(path.size() - 1));
}