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