v0.5.0: evil eye deathgaze is now visible in more cases

This commit is contained in:
Evan Debenham 2017-01-28 23:58:15 -05:00
parent f4484618c2
commit dc4f3ebfea
2 changed files with 5 additions and 7 deletions

View File

@ -133,7 +133,7 @@ public class Eye extends Mob {
spend( attackDelay() ); spend( attackDelay() );
if (Dungeon.visible[pos]) { if (Dungeon.visible[pos] || Dungeon.visible[beam.collisionPos] ) {
sprite.zap( beam.collisionPos ); sprite.zap( beam.collisionPos );
return false; return false;
} else { } else {

View File

@ -104,12 +104,10 @@ public class EyeSprite extends MobSprite {
super.onComplete( anim ); super.onComplete( anim );
if (anim == zap) { if (anim == zap) {
if (Dungeon.visible[ch.pos] || Dungeon.visible[zapPos]) { if (Actor.findChar(zapPos) != null){
if (Actor.findChar(zapPos) != null){ parent.add(new Beam.DeathRay(center(), Actor.findChar(zapPos).sprite.center()));
parent.add(new Beam.DeathRay(center(), Actor.findChar(zapPos).sprite.center())); } else {
} else { parent.add(new Beam.DeathRay(center(), DungeonTilemap.raisedTileCenterToWorld(zapPos)));
parent.add(new Beam.DeathRay(center(), DungeonTilemap.raisedTileCenterToWorld(zapPos)));
}
} }
((Eye)ch).deathGaze(); ((Eye)ch).deathGaze();
ch.next(); ch.next();