v0.3.3a: tweaked fleeing to behave a bit more consistently with an invisible enemy
This commit is contained in:
parent
62086adc4a
commit
73d9302be5
|
@ -641,11 +641,11 @@ public abstract class Mob extends Char {
|
|||
@Override
|
||||
public boolean act( boolean enemyInFOV, boolean justAlerted ) {
|
||||
enemySeen = enemyInFOV;
|
||||
if (enemyInFOV) {
|
||||
target = enemy.pos;
|
||||
//loses target when 0-dist rolls a 6 or greater.
|
||||
} else if (1 + Random.Int(Level.distance(pos, target)) >= 6){
|
||||
if (!enemyInFOV && 1 + Random.Int(Level.distance(pos, target)) >= 6){
|
||||
target = -1;
|
||||
} else {
|
||||
target = enemy.pos;
|
||||
}
|
||||
|
||||
int oldPos = pos;
|
||||
|
|
Loading…
Reference in New Issue
Block a user