v0.8.1: passive enemies are no longer auto-surprise attacked
This commit is contained in:
parent
a0ff6dcb75
commit
c4ffb9b82a
|
@ -543,8 +543,7 @@ public abstract class Mob extends Char {
|
|||
hitWithRanged = true;
|
||||
}
|
||||
|
||||
if ((!enemySeen || enemy.invisible > 0)
|
||||
&& enemy == Dungeon.hero && Dungeon.hero.canSurpriseAttack()) {
|
||||
if (surprisedBy(enemy) && Dungeon.hero.canSurpriseAttack()) {
|
||||
Statistics.sneakAttacks++;
|
||||
Badges.validateRogueUnlock();
|
||||
Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG);
|
||||
|
@ -579,7 +578,7 @@ public abstract class Mob extends Char {
|
|||
}
|
||||
|
||||
public boolean surprisedBy( Char enemy ){
|
||||
return (!enemySeen || enemy.invisible > 0) && enemy == Dungeon.hero;
|
||||
return enemy == Dungeon.hero && (enemy.invisible > 0 || (!enemySeen && state != PASSIVE));
|
||||
}
|
||||
|
||||
public void aggro( Char ch ) {
|
||||
|
|
|
@ -112,10 +112,7 @@ public class YogDzewa extends Mob {
|
|||
|
||||
@Override
|
||||
protected boolean act() {
|
||||
//catches an error-case from 0.8.0 & 0.8.0a
|
||||
if (!isAlive()){
|
||||
die(null);
|
||||
}
|
||||
enemySeen = true;
|
||||
|
||||
if (phase == 0){
|
||||
if (Dungeon.hero.viewDistance >= Dungeon.level.distance(pos, Dungeon.hero.pos)) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user