From cf1249d84d21ae2f6feea959fc1db2d707a82566 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Mon, 20 Jun 2022 16:11:10 -0400 Subject: [PATCH] v1.3.0: red sentry no longer fires on players with a lost inventory --- .../levels/rooms/special/SentryRoom.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 1f8565d12..b4d0615e3 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 @@ -28,6 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LostInventory; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Eye; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.NPC; import com.shatteredpixel.shatteredpixeldungeon.effects.Beam; @@ -239,7 +240,8 @@ public class SentryRoom extends SpecialRoom { if (Dungeon.hero != null){ if (fieldOfView[Dungeon.hero.pos] && Dungeon.level.map[Dungeon.hero.pos] == Terrain.EMPTY_SP - && room.inside(Dungeon.level.cellToPoint(Dungeon.hero.pos))){ + && room.inside(Dungeon.level.cellToPoint(Dungeon.hero.pos)) + && Dungeon.hero.buff(LostInventory.class) == null){ if (curChargeDelay > 0.001f){ //helps prevent rounding errors if (curChargeDelay == initialChargeDelay) {