v2.3.0: fixed exploits where high grass or fog would stop geomancer atks

This commit is contained in:
Evan Debenham
2023-12-12 12:45:51 -05:00
parent c4f2ad5ce5
commit a16e2d848d
2 changed files with 6 additions and 4 deletions
@@ -76,7 +76,9 @@ public class GnollGeomancer extends Mob {
HUNTING = new Hunting(); HUNTING = new Hunting();
state = SLEEPING; state = SLEEPING;
//can see the hero from a distance //FOV is used to attack hero when they are in open space created by geomancer
// but geomancer will lose sight and stop attacking if the hero flees behind walls.
// Because of this geomancer can see through high grass and shrouding fod
viewDistance = 12; viewDistance = 12;
properties.add(Property.BOSS); properties.add(Property.BOSS);
@@ -85,7 +87,6 @@ public class GnollGeomancer extends Mob {
private int abilityCooldown = Random.NormalIntRange(3, 6); private int abilityCooldown = Random.NormalIntRange(3, 6);
private boolean lastAbilityWasRockfall; private boolean lastAbilityWasRockfall;
private int throwingRockFromPos = -1;
private int[] throwingRocksFromPos = null; private int[] throwingRocksFromPos = null;
private int throwingRockToPos = -1; //only need 1 to pos, it's always the same. private int throwingRockToPos = -1; //only need 1 to pos, it's always the same.
@@ -48,6 +48,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.huntress.SpiritHawk; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.huntress.SpiritHawk;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Bestiary; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Bestiary;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.GnollGeomancer;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Piranha; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Piranha;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.YogFist; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.YogFist;
@@ -1221,7 +1222,7 @@ public abstract class Level implements Bundlable {
} }
if ((c instanceof Hero && ((Hero) c).subClass == HeroSubClass.WARDEN) if ((c instanceof Hero && ((Hero) c).subClass == HeroSubClass.WARDEN)
|| c instanceof YogFist.SoiledFist) { || c instanceof YogFist.SoiledFist || c instanceof GnollGeomancer) {
if (blocking == null) { if (blocking == null) {
System.arraycopy(Dungeon.level.losBlocking, 0, modifiableBlocking, 0, modifiableBlocking.length); System.arraycopy(Dungeon.level.losBlocking, 0, modifiableBlocking, 0, modifiableBlocking.length);
blocking = modifiableBlocking; blocking = modifiableBlocking;
@@ -1233,7 +1234,7 @@ public abstract class Level implements Bundlable {
} }
} }
if (c.alignment != Char.Alignment.ALLY if ((c.alignment != Char.Alignment.ALLY && !(c instanceof GnollGeomancer))
&& Dungeon.level.blobs.containsKey(SmokeScreen.class) && Dungeon.level.blobs.containsKey(SmokeScreen.class)
&& Dungeon.level.blobs.get(SmokeScreen.class).volume > 0) { && Dungeon.level.blobs.get(SmokeScreen.class).volume > 0) {
if (blocking == null) { if (blocking == null) {