v1.0.1: fixed scorpios and trickster not acting when attacked out of FOV

This commit is contained in:
Evan Debenham 2021-08-21 21:43:14 -04:00
parent 148dfa84c4
commit 209f717fa8
2 changed files with 16 additions and 0 deletions

View File

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

View File

@ -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<?extends Potion> loot;