v0.8.0: tweaked when enemy sprites show zap vfx. Now shows if either enemy or target is visible
This commit is contained in:
parent
b666231e7f
commit
94078bd9b9
|
@ -86,7 +86,7 @@ public class DM100 extends Mob implements Callback {
|
|||
|
||||
} else {
|
||||
|
||||
if (sprite != null && sprite.visible) {
|
||||
if (sprite != null && (sprite.visible || enemy.sprite.visible)) {
|
||||
sprite.zap( enemy.pos );
|
||||
}
|
||||
|
||||
|
|
|
@ -462,17 +462,16 @@ public abstract class Mob extends Char {
|
|||
|
||||
protected boolean doAttack( Char enemy ) {
|
||||
|
||||
boolean visible = Dungeon.level.heroFOV[pos];
|
||||
|
||||
if (visible) {
|
||||
if (sprite != null && (sprite.visible || enemy.sprite.visible)) {
|
||||
sprite.attack( enemy.pos );
|
||||
spend( attackDelay() );
|
||||
return false;
|
||||
|
||||
} else {
|
||||
attack( enemy );
|
||||
}
|
||||
|
||||
spend( attackDelay() );
|
||||
|
||||
return !visible;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -93,7 +93,7 @@ public abstract class Shaman extends Mob {
|
|||
|
||||
} else {
|
||||
|
||||
if (sprite != null && sprite.visible) {
|
||||
if (sprite != null && (sprite.visible || enemy.sprite.visible)) {
|
||||
sprite.zap( enemy.pos );
|
||||
return false;
|
||||
} else {
|
||||
|
|
|
@ -84,7 +84,7 @@ public class Warlock extends Mob implements Callback {
|
|||
|
||||
} else {
|
||||
|
||||
if (sprite != null && sprite.visible) {
|
||||
if (sprite != null && (sprite.visible || enemy.sprite.visible)) {
|
||||
sprite.zap( enemy.pos );
|
||||
return false;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue
Block a user