From 01757b71e5ccf0c75b134800b9b58c823000f946 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Mon, 21 Mar 2022 17:07:25 -0400 Subject: [PATCH] v1.2.0: fixed red sentries being considered enemies when they shouldn't --- .../shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java | 2 +- .../com/shatteredpixel/shatteredpixeldungeon/levels/Level.java | 2 +- .../shatteredpixeldungeon/levels/rooms/special/SentryRoom.java | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java index fbd63dd6a..927f03425 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java @@ -1279,7 +1279,7 @@ public class Hero extends Char { Mob target = null; for (Mob m : Dungeon.level.mobs.toArray(new Mob[0])) { - if (fieldOfView[ m.pos ] && m.alignment == Alignment.ENEMY && !(m instanceof NPC)) { + if (fieldOfView[ m.pos ] && m.alignment == Alignment.ENEMY) { visible.add(m); if (!visibleEnemies.contains( m )) { newMob = true; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java index b634e1421..5b1f33005 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java @@ -1093,7 +1093,7 @@ public abstract class Level implements Bundlable { blocking[i] = false; } } - } else if (c.alignment == Char.Alignment.ENEMY + } else if (c.alignment != Char.Alignment.ALLY && Dungeon.level.blobs.containsKey(SmokeScreen.class) && Dungeon.level.blobs.get(SmokeScreen.class).volume > 0) { System.arraycopy(Dungeon.level.losBlocking, 0, modifiableBlocking, 0, modifiableBlocking.length); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/SentryRoom.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/SentryRoom.java index a12f8f280..1f9185a48 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/SentryRoom.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/SentryRoom.java @@ -217,7 +217,6 @@ public class SentryRoom extends SpecialRoom { spriteClass = SentrySprite.class; properties.add(Property.IMMOVABLE); - alignment = Alignment.ENEMY; } private float initialChargeDelay;