v0.9.3: fixed the ghost's hero death lines not playing
This commit is contained in:
parent
158fd1c730
commit
5ade968e4f
|
@ -1682,6 +1682,12 @@ public class Hero extends Char {
|
|||
items.remove( item );
|
||||
}
|
||||
|
||||
for (Char c : Actor.chars()){
|
||||
if (c instanceof DriedRose.GhostHero){
|
||||
((DriedRose.GhostHero) c).sayHeroKilled();
|
||||
}
|
||||
}
|
||||
|
||||
GameScene.gameOver();
|
||||
|
||||
if (cause instanceof Hero.Doom) {
|
||||
|
|
|
@ -568,12 +568,7 @@ public class DriedRose extends Artifact {
|
|||
damage(1, this);
|
||||
}
|
||||
|
||||
if (!isAlive())
|
||||
return true;
|
||||
if (!Dungeon.hero.isAlive()){
|
||||
sayHeroKilled();
|
||||
sprite.die();
|
||||
destroy();
|
||||
if (!isAlive()) {
|
||||
return true;
|
||||
}
|
||||
return super.act();
|
||||
|
@ -827,11 +822,8 @@ public class DriedRose extends Artifact {
|
|||
}
|
||||
|
||||
public void sayHeroKilled(){
|
||||
if (Dungeon.bossLevel()){
|
||||
yell( Messages.get( this, "hero_killed_boss_" + Random.IntRange(1, 3) ));
|
||||
} else {
|
||||
yell( Messages.get( this, "hero_killed_" + Random.IntRange(1, 3) ));
|
||||
}
|
||||
yell( Messages.get( this, "player_killed_" + Random.IntRange(1, 3) ));
|
||||
GLog.newLine();
|
||||
Sample.INSTANCE.play( Assets.Sounds.GHOST );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user