v0.6.5: adjusted invisibility to always override seen values
This commit is contained in:
parent
5056176c57
commit
3f8c55b0b8
|
@ -873,8 +873,7 @@ public class Hero extends Char {
|
||||||
enemy = action.target;
|
enemy = action.target;
|
||||||
|
|
||||||
if (enemy.isAlive() && canAttack( enemy ) && !isCharmedBy( enemy )) {
|
if (enemy.isAlive() && canAttack( enemy ) && !isCharmedBy( enemy )) {
|
||||||
|
|
||||||
Invisibility.dispel();
|
|
||||||
spend( attackDelay() );
|
spend( attackDelay() );
|
||||||
sprite.attack( enemy.pos );
|
sprite.attack( enemy.pos );
|
||||||
|
|
||||||
|
@ -1432,6 +1431,8 @@ public class Hero extends Char {
|
||||||
if (combo != null) combo.miss();
|
if (combo != null) combo.miss();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Invisibility.dispel();
|
||||||
|
|
||||||
curAction = null;
|
curAction = null;
|
||||||
|
|
||||||
|
|
|
@ -465,7 +465,8 @@ public abstract class Mob extends Char {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int defenseSkill( Char enemy ) {
|
public int defenseSkill( Char enemy ) {
|
||||||
boolean seen = enemySeen || (enemy == Dungeon.hero && !Dungeon.hero.canSurpriseAttack());
|
boolean seen = (enemySeen && enemy.invisible == 0);
|
||||||
|
if (enemy == Dungeon.hero && !Dungeon.hero.canSurpriseAttack()) seen = true;
|
||||||
if ( seen
|
if ( seen
|
||||||
&& paralysed == 0
|
&& paralysed == 0
|
||||||
&& !(alignment == Alignment.ALLY && enemy == Dungeon.hero)) {
|
&& !(alignment == Alignment.ALLY && enemy == Dungeon.hero)) {
|
||||||
|
@ -479,7 +480,8 @@ public abstract class Mob extends Char {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int defenseProc( Char enemy, int damage ) {
|
public int defenseProc( Char enemy, int damage ) {
|
||||||
if (!enemySeen && enemy == Dungeon.hero && Dungeon.hero.canSurpriseAttack()) {
|
if ((!enemySeen || enemy.invisible > 0)
|
||||||
|
&& enemy == Dungeon.hero && Dungeon.hero.canSurpriseAttack()) {
|
||||||
if (enemy.buff(Preparation.class) != null) {
|
if (enemy.buff(Preparation.class) != null) {
|
||||||
Wound.hit(this);
|
Wound.hit(this);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user