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;
|
||||
}
|
||||
|
||||
if (buff(Terror.class) != null){
|
||||
state = FLEEING;
|
||||
}
|
||||
|
||||
enemy = chooseEnemy();
|
||||
|
||||
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 ) {
|
||||
super.remove( buff );
|
||||
if (buff instanceof Terror) {
|
||||
sprite.showStatus( CharSprite.NEGATIVE, Messages.get(this, "rage") );
|
||||
if (enemySeen) {
|
||||
sprite.showStatus(CharSprite.NEGATIVE, Messages.get(this, "rage"));
|
||||
state = HUNTING;
|
||||
} else {
|
||||
state = WANDERING;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -729,7 +737,7 @@ public abstract class Mob extends Char {
|
|||
|
||||
notice();
|
||||
|
||||
if (state != HUNTING) {
|
||||
if (state != HUNTING && state != FLEEING) {
|
||||
state = WANDERING;
|
||||
}
|
||||
target = cell;
|
||||
|
|
Loading…
Reference in New Issue
Block a user