v0.8.2c: tweaked terror logic, should now better enforce fleeing
This commit is contained in:
parent
e1f202b635
commit
f8aebee09b
|
@ -181,6 +181,10 @@ public abstract class Mob extends Char {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (buff(Terror.class) != null){
|
||||||
|
state = FLEEING;
|
||||||
|
}
|
||||||
|
|
||||||
enemy = chooseEnemy();
|
enemy = chooseEnemy();
|
||||||
|
|
||||||
boolean enemyInFOV = enemy != null && enemy.isAlive() && fieldOfView[enemy.pos] && enemy.invisible <= 0;
|
boolean enemyInFOV = enemy != null && enemy.isAlive() && fieldOfView[enemy.pos] && enemy.invisible <= 0;
|
||||||
|
@ -332,8 +336,12 @@ public abstract class Mob extends Char {
|
||||||
public void remove( Buff buff ) {
|
public void remove( Buff buff ) {
|
||||||
super.remove( buff );
|
super.remove( buff );
|
||||||
if (buff instanceof Terror) {
|
if (buff instanceof Terror) {
|
||||||
|
if (enemySeen) {
|
||||||
sprite.showStatus(CharSprite.NEGATIVE, Messages.get(this, "rage"));
|
sprite.showStatus(CharSprite.NEGATIVE, Messages.get(this, "rage"));
|
||||||
state = HUNTING;
|
state = HUNTING;
|
||||||
|
} else {
|
||||||
|
state = WANDERING;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -729,7 +737,7 @@ public abstract class Mob extends Char {
|
||||||
|
|
||||||
notice();
|
notice();
|
||||||
|
|
||||||
if (state != HUNTING) {
|
if (state != HUNTING && state != FLEEING) {
|
||||||
state = WANDERING;
|
state = WANDERING;
|
||||||
}
|
}
|
||||||
target = cell;
|
target = cell;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user