From 209f717fa883af966d08d60880dad5476e4a6575 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Sat, 21 Aug 2021 21:43:14 -0400 Subject: [PATCH] v1.0.1: fixed scorpios and trickster not acting when attacked out of FOV --- .../shatteredpixeldungeon/actors/mobs/GnollTrickster.java | 8 ++++++++ .../shatteredpixeldungeon/actors/mobs/Scorpio.java | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/GnollTrickster.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/GnollTrickster.java index fd12af446..df07a028a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/GnollTrickster.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/GnollTrickster.java @@ -101,6 +101,14 @@ public class GnollTrickster extends Gnoll { return super.getCloser( target ); } } + + @Override + public void aggro(Char ch) { + //cannot be aggroed to something it can't see + if (fieldOfView == null || fieldOfView[ch.pos]) { + super.aggro(ch); + } + } @Override protected Item createLoot() { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Scorpio.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Scorpio.java index 4b552036a..e0bd8a232 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Scorpio.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Scorpio.java @@ -94,6 +94,14 @@ public class Scorpio extends Mob { } } + @Override + public void aggro(Char ch) { + //cannot be aggroed to something it can't see + if (fieldOfView == null || fieldOfView[ch.pos]) { + super.aggro(ch); + } + } + @Override protected Item createLoot() { Class loot;