v1.3.0: red sentry no longer fires on players with a lost inventory

This commit is contained in:
Evan Debenham
2022-06-20 16:11:10 -04:00
parent fdbd8117fe
commit cf1249d84d

View File

@@ -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) {