v0.7.4: polished dialogue for ghost hero

This commit is contained in:
Evan Debenham 2019-06-20 02:05:51 -04:00
parent 329ad0e14f
commit 923817fb8b
10 changed files with 253 additions and 183 deletions

View File

@ -1392,6 +1392,13 @@ public class Hero extends Char {
GLog.w( Messages.get(this, "revive") ); GLog.w( Messages.get(this, "revive") );
Statistics.ankhsUsed++; Statistics.ankhsUsed++;
for (Char ch : Actor.chars()){
if (ch instanceof DriedRose.GhostHero){
((DriedRose.GhostHero) ch).sayAnhk();
return;
}
}
return; return;
} }

View File

@ -35,6 +35,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Terror;
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter; import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ElmoParticle; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ElmoParticle;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.DriedRose;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.LloydsBeacon; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.LloydsBeacon;
import com.shatteredpixel.shatteredpixeldungeon.items.keys.SkeletonKey; import com.shatteredpixel.shatteredpixeldungeon.items.keys.SkeletonKey;
import com.shatteredpixel.shatteredpixeldungeon.items.quest.MetalShard; import com.shatteredpixel.shatteredpixeldungeon.items.quest.MetalShard;
@ -168,8 +169,16 @@ public class DM300 extends Mob {
@Override @Override
public void notice() { public void notice() {
super.notice(); super.notice();
BossHealthBar.assignBoss(this); if (!BossHealthBar.isAssigned()) {
yell( Messages.get(this, "notice") ); BossHealthBar.assignBoss(this);
yell(Messages.get(this, "notice"));
for (Char ch : Actor.chars()){
if (ch instanceof DriedRose.GhostHero){
GLog.n("\n");
((DriedRose.GhostHero) ch).sayBoss();
}
}
}
} }
{ {

View File

@ -24,6 +24,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.mobs;
import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Badges; import com.shatteredpixel.shatteredpixeldungeon.Badges;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob; import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.GooWarn; import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.GooWarn;
@ -33,6 +34,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Ooze;
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter; import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ElmoParticle; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ElmoParticle;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.DriedRose;
import com.shatteredpixel.shatteredpixeldungeon.items.keys.SkeletonKey; import com.shatteredpixel.shatteredpixeldungeon.items.keys.SkeletonKey;
import com.shatteredpixel.shatteredpixeldungeon.items.quest.GooBlob; import com.shatteredpixel.shatteredpixeldungeon.items.quest.GooBlob;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
@ -40,6 +42,7 @@ import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.GooSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.GooSprite;
import com.shatteredpixel.shatteredpixeldungeon.ui.BossHealthBar; import com.shatteredpixel.shatteredpixeldungeon.ui.BossHealthBar;
import com.shatteredpixel.shatteredpixeldungeon.ui.GameLog;
import com.shatteredpixel.shatteredpixeldungeon.utils.BArray; import com.shatteredpixel.shatteredpixeldungeon.utils.BArray;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.watabou.noosa.Camera; import com.watabou.noosa.Camera;
@ -251,8 +254,16 @@ public class Goo extends Mob {
@Override @Override
public void notice() { public void notice() {
super.notice(); super.notice();
BossHealthBar.assignBoss(this); if (!BossHealthBar.isAssigned()) {
yell( Messages.get(this, "notice") ); BossHealthBar.assignBoss(this);
yell(Messages.get(this, "notice"));
for (Char ch : Actor.chars()){
if (ch instanceof DriedRose.GhostHero){
GLog.n("\n");
((DriedRose.GhostHero) ch).sayBoss();
}
}
}
} }
private final String PUMPEDUP = "pumpedup"; private final String PUMPEDUP = "pumpedup";

View File

@ -37,6 +37,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vertigo;
import com.shatteredpixel.shatteredpixeldungeon.effects.Flare; import com.shatteredpixel.shatteredpixeldungeon.effects.Flare;
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
import com.shatteredpixel.shatteredpixeldungeon.items.ArmorKit; import com.shatteredpixel.shatteredpixeldungeon.items.ArmorKit;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.DriedRose;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.LloydsBeacon; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.LloydsBeacon;
import com.shatteredpixel.shatteredpixeldungeon.items.keys.SkeletonKey; import com.shatteredpixel.shatteredpixeldungeon.items.keys.SkeletonKey;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation;
@ -48,6 +49,7 @@ import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.sprites.KingSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.KingSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.UndeadSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.UndeadSprite;
import com.shatteredpixel.shatteredpixeldungeon.ui.BossHealthBar; import com.shatteredpixel.shatteredpixeldungeon.ui.BossHealthBar;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.watabou.noosa.audio.Sample; import com.watabou.noosa.audio.Sample;
import com.watabou.utils.Bundle; import com.watabou.utils.Bundle;
import com.watabou.utils.PathFinder; import com.watabou.utils.PathFinder;
@ -225,8 +227,16 @@ public class King extends Mob {
@Override @Override
public void notice() { public void notice() {
super.notice(); super.notice();
BossHealthBar.assignBoss(this); if (!BossHealthBar.isAssigned()) {
yell( Messages.get(this, "notice") ); BossHealthBar.assignBoss(this);
yell(Messages.get(this, "notice"));
for (Char ch : Actor.chars()){
if (ch instanceof DriedRose.GhostHero){
GLog.n("\n");
((DriedRose.GhostHero) ch).sayBoss();
}
}
}
} }
{ {

View File

@ -31,6 +31,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter; import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
import com.shatteredpixel.shatteredpixeldungeon.items.TomeOfMastery; import com.shatteredpixel.shatteredpixeldungeon.items.TomeOfMastery;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.DriedRose;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.LloydsBeacon; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.LloydsBeacon;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMagicMapping; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMagicMapping;
import com.shatteredpixel.shatteredpixeldungeon.levels.Level; import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
@ -42,6 +43,7 @@ import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.sprites.TenguSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.TenguSprite;
import com.shatteredpixel.shatteredpixeldungeon.ui.BossHealthBar; import com.shatteredpixel.shatteredpixeldungeon.ui.BossHealthBar;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.watabou.noosa.audio.Sample; import com.watabou.noosa.audio.Sample;
import com.watabou.utils.Bundle; import com.watabou.utils.Bundle;
import com.watabou.utils.Random; import com.watabou.utils.Random;
@ -241,12 +243,20 @@ public class Tengu extends Mob {
@Override @Override
public void notice() { public void notice() {
super.notice(); super.notice();
BossHealthBar.assignBoss(this); if (!BossHealthBar.isAssigned()) {
if (HP <= HT/2) BossHealthBar.bleed(true); BossHealthBar.assignBoss(this);
if (HP == HT) { if (HP <= HT/2) BossHealthBar.bleed(true);
yell(Messages.get(this, "notice_mine", Dungeon.hero.givenName())); if (HP == HT) {
} else { yell(Messages.get(this, "notice_mine", Dungeon.hero.givenName()));
yell(Messages.get(this, "notice_face", Dungeon.hero.givenName())); for (Char ch : Actor.chars()){
if (ch instanceof DriedRose.GhostHero){
GLog.n("\n");
((DriedRose.GhostHero) ch).sayBoss();
}
}
} else {
yell(Messages.get(this, "notice_face", Dungeon.hero.givenName()));
}
} }
} }

View File

@ -40,6 +40,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Terror;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vertigo; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vertigo;
import com.shatteredpixel.shatteredpixeldungeon.effects.Pushing; import com.shatteredpixel.shatteredpixeldungeon.effects.Pushing;
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShadowParticle; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShadowParticle;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.DriedRose;
import com.shatteredpixel.shatteredpixeldungeon.items.keys.SkeletonKey; import com.shatteredpixel.shatteredpixeldungeon.items.keys.SkeletonKey;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRetribution; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRetribution;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfPsionicBlast; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfPsionicBlast;
@ -176,8 +177,16 @@ public class Yog extends Mob {
@Override @Override
public void notice() { public void notice() {
super.notice(); super.notice();
BossHealthBar.assignBoss(this); if (!BossHealthBar.isAssigned()) {
yell( Messages.get(this, "notice") ); BossHealthBar.assignBoss(this);
yell(Messages.get(this, "notice"));
for (Char ch : Actor.chars()){
if (ch instanceof DriedRose.GhostHero){
GLog.n("\n");
((DriedRose.GhostHero) ch).sayBoss();
}
}
}
} }
{ {

View File

@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.items.artifacts;
import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.CorrosiveGas; import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.CorrosiveGas;
@ -52,6 +53,7 @@ import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
import com.shatteredpixel.shatteredpixeldungeon.sprites.GhostSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.GhostSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
import com.shatteredpixel.shatteredpixeldungeon.ui.BossHealthBar;
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline; import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
import com.shatteredpixel.shatteredpixeldungeon.ui.Window; import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
@ -153,8 +155,14 @@ public class DriedRose extends Artifact {
ghost.yell( Messages.get(GhostHero.class, "hello", Dungeon.hero.givenName()) ); ghost.yell( Messages.get(GhostHero.class, "hello", Dungeon.hero.givenName()) );
Sample.INSTANCE.play( Assets.SND_GHOST ); Sample.INSTANCE.play( Assets.SND_GHOST );
firstSummon = true; firstSummon = true;
} else
ghost.saySpawned(); } else {
if (BossHealthBar.isAssigned()) {
ghost.sayBoss();
} else {
ghost.sayAppeared();
}
}
charge = 0; charge = 0;
updateQuickslot(); updateQuickslot();
@ -302,6 +310,7 @@ public class DriedRose extends Artifact {
defaultAction = AC_SUMMON; defaultAction = AC_SUMMON;
} }
//TODO consider adjusting recharging and/or ghosts health regen so that suiciding isn't so good as a heal
LockedFloor lock = target.buff(LockedFloor.class); LockedFloor lock = target.buff(LockedFloor.class);
if (charge < chargeCap && !cursed && (lock == null || lock.regenOn())) { if (charge < chargeCap && !cursed && (lock == null || lock.regenOn())) {
partialCharge += 1/5f; //500 turns to a full charge partialCharge += 1/5f; //500 turns to a full charge
@ -337,15 +346,18 @@ public class DriedRose extends Artifact {
} }
} }
//FIXME need to translate phrases here
public CellSelector.Listener ghostDirector = new CellSelector.Listener(){ public CellSelector.Listener ghostDirector = new CellSelector.Listener(){
@Override @Override
public void onSelect(Integer cell) { public void onSelect(Integer cell) {
if (cell == null) return; if (cell == null) return;
if (!Dungeon.level.heroFOV[cell] || Actor.findChar(cell) == null){ Sample.INSTANCE.play( Assets.SND_GHOST );
GLog.i("Okay, I'll hold that position");
if (!Dungeon.level.heroFOV[cell]
|| Actor.findChar(cell) == null
|| (Actor.findChar(cell) != Dungeon.hero && Actor.findChar(cell).alignment != Char.Alignment.ENEMY)){
ghost.yell(Messages.get(ghost, "directed_position_" + Random.IntRange(1, 5)));
ghost.aggro(null); ghost.aggro(null);
ghost.state = ghost.WANDERING; ghost.state = ghost.WANDERING;
ghost.defendingPos = cell; ghost.defendingPos = cell;
@ -359,22 +371,21 @@ public class DriedRose extends Artifact {
Dungeon.level.updateFieldOfView( ghost, ghost.fieldOfView ); Dungeon.level.updateFieldOfView( ghost, ghost.fieldOfView );
if (Actor.findChar(cell) == Dungeon.hero){ if (Actor.findChar(cell) == Dungeon.hero){
GLog.i("Okay, I'll follow you."); ghost.yell(Messages.get(ghost, "directed_follow_" + Random.IntRange(1, 5)));
ghost.aggro(null); ghost.aggro(null);
ghost.state = ghost.WANDERING; ghost.state = ghost.WANDERING;
ghost.defendingPos = -1; ghost.defendingPos = -1;
} else if (Actor.findChar(cell).alignment == Char.Alignment.ENEMY){ } else if (Actor.findChar(cell).alignment == Char.Alignment.ENEMY){
GLog.i("Okay, I'll attack that enemy."); ghost.yell(Messages.get(ghost, "directed_attack_" + Random.IntRange(1, 5)));
ghost.aggro(Actor.findChar(cell)); ghost.aggro(Actor.findChar(cell));
ghost.setTarget(cell); ghost.setTarget(cell);
} }
} }
@Override @Override
public String prompt() { public String prompt() {
return "\"What should I do?\""; return "\"" + Messages.get(GhostHero.class, "direct_prompt") + "\"";
} }
}; };
@ -453,42 +464,83 @@ public class DriedRose extends Artifact {
rose = Dungeon.hero.belongings.getItem(DriedRose.class); rose = Dungeon.hero.belongings.getItem(DriedRose.class);
} }
defenseSkill = (Dungeon.hero.lvl+4)*2; //same dodge as the hero
defenseSkill = (Dungeon.hero.lvl+4);
if (rose == null) return; if (rose == null) return;
HT = 20 + 4*rose.level(); HT = 20 + 8*rose.level();
} }
public void saySpawned(){ public void sayAppeared(){
if (Messages.lang() != Languages.ENGLISH) return; //don't say anything if not on english int depth = (Dungeon.depth - 1) / 5;
int i = (Dungeon.depth - 1) / 5;
fieldOfView = new boolean[Dungeon.level.length()]; //only some lines are said on the first floor of a depth
Dungeon.level.updateFieldOfView(this, fieldOfView); int variant = Dungeon.depth % 5 == 1 ? Random.IntRange(1, 3) : Random.IntRange(1, 6);
if (chooseEnemy() == null)
yell( Random.element( VOICE_AMBIENT[i] ) ); switch(depth){
else case 0:
yell( Random.element( VOICE_ENEMIES[i][ Dungeon.bossLevel() ? 1 : 0 ] ) ); yell( Messages.get( this, "dialogue_sewers_" + variant ));
Sample.INSTANCE.play( Assets.SND_GHOST ); break;
case 1:
yell( Messages.get( this, "dialogue_prison_" + variant ));
break;
case 2:
yell( Messages.get( this, "dialogue_caves_" + variant ));
break;
case 3:
yell( Messages.get( this, "dialogue_city_" + variant ));
break;
case 4: default:
yell( Messages.get( this, "dialogue_halls_" + variant ));
break;
}
if (ShatteredPixelDungeon.scene() instanceof GameScene) {
Sample.INSTANCE.play( Assets.SND_GHOST );
}
} }
public void sayAnhk(){ public void sayBoss(){
yell( Random.element( VOICE_BLESSEDANKH ) ); int depth = (Dungeon.depth - 1) / 5;
switch(depth){
case 0:
yell( Messages.get( this, "seen_goo_" + Random.IntRange(1, 3) ));
break;
case 1:
yell( Messages.get( this, "seen_tengu_" + Random.IntRange(1, 3) ));
break;
case 2:
yell( Messages.get( this, "seen_dm300_" + Random.IntRange(1, 3) ));
break;
case 3:
yell( Messages.get( this, "seen_king_" + Random.IntRange(1, 3) ));
break;
case 4: default:
yell( Messages.get( this, "seen_yog_" + Random.IntRange(1, 3) ));
break;
}
Sample.INSTANCE.play( Assets.SND_GHOST ); Sample.INSTANCE.play( Assets.SND_GHOST );
} }
public void sayDefeated(){ public void sayDefeated(){
if (Messages.lang() != Languages.ENGLISH) return; //don't say anything if not on english if (BossHealthBar.isAssigned()){
yell( Random.element( VOICE_DEFEATED[ Dungeon.bossLevel() ? 1 : 0 ] ) ); yell( Messages.get( this, "defeated_by_boss_" + Random.IntRange(1, 3) ));
} else {
yell( Messages.get( this, "defeated_by_enemy_" + Random.IntRange(1, 3) ));
}
Sample.INSTANCE.play( Assets.SND_GHOST ); Sample.INSTANCE.play( Assets.SND_GHOST );
} }
public void sayHeroKilled(){ public void sayHeroKilled(){
if (Messages.lang() != Languages.ENGLISH) return; //don't say anything if not on english if (Dungeon.bossLevel()){
yell(Random.element(VOICE_HEROKILLED)); yell( Messages.get( this, "hero_killed_boss_" + Random.IntRange(1, 3) ));
} else {
yell( Messages.get( this, "hero_killed_" + Random.IntRange(1, 3) ));
}
Sample.INSTANCE.play( Assets.SND_GHOST ); Sample.INSTANCE.play( Assets.SND_GHOST );
} }
public void sayBossBeaten(){ public void sayAnhk(){
yell( Random.element( VOICE_BOSSBEATEN[ Dungeon.depth==25 ? 1 : 0 ] ) ); yell( Messages.get( this, "blessed_ankh_" + Random.IntRange(1, 3) ));
Sample.INSTANCE.play( Assets.SND_GHOST ); Sample.INSTANCE.play( Assets.SND_GHOST );
} }
@ -736,139 +788,6 @@ public class DriedRose extends Artifact {
} }
//************************************************************************************
//This is a bunch strings & string arrays, used in all of the sad ghost's voice lines.
//************************************************************************************
//FIXME, need to go over these for final polish (inc. translations!)
private static final String VOICE_INTRODUCE = "My spirit is bound to this rose, it was very precious to me, a "+
"gift from my love whom I left on the surface.\n\nI cannot return to him, but thanks to you I have a " +
"second chance to complete my journey. When I am able I will respond to your call and fight with you.\n\n" +
"hopefully you may succeed where I failed...";
//1st index - depth type, 2nd index - specific line.
public static final String[][] VOICE_AMBIENT = {
{
"These sewers were once safe, some even lived here in the winter...",
"I wonder what happened to the guard patrols, did they give up?...",
"I had family on the surface, I hope they are safe..."
},{
"I've heard stories about this place, nothing good...",
"This place was always more of a dungeon than a prison...",
"I can't imagine what went on when this place was abandoned..."
},{
"No human or dwarf has been here for a very long time...",
"Something must have gone very wrong, for the dwarves to abandon a gold mine...",
"I feel great evil lurking below..."
},{
"The dwarves were industrious, but greedy...",
"I hope the surface never ends up like this place...",
"So the dwarvern metropolis really has fallen..."
},{
"What is this place?...",
"So the stories are true, we have to fight a demon god...",
"I feel a great evil in this place..."
},{
"... I don't like this place... We should leave as soon as possible..."
}
};
//1st index - depth type, 2nd index - boss or not, 3rd index - specific line.
public static final String[][][] VOICE_ENEMIES = {
{
{
"Let's make the sewers safe again...",
"If the guards couldn't defeat them, perhaps we can...",
"These crabs are extremely annoying..."
},{
"Beware Goo!...",
"Many of my friends died to this thing, time for vengeance...",
"Such an abomination cannot be allowed to live..."
}
},{
{
"What dark magic happened here?...",
"To think the captives of this place are now its guardians...",
"They were criminals before, now they are monsters..."
},{
"If only he would see reason, he doesn't seem insane...",
"He assumes we are hostile, if only he would stop to talk...",
"The one prisoner left sane is a deadly assassin. Of course..."
}
},{
{
"The creatures here are twisted, just like the sewers... ",
"more gnolls, I hate gnolls...",
"Even the bats are bloodthirsty here..."
},{
"Only dwarves would build a mining machine that kills looters...",
"That thing is huge...",
"How has it survived here for so long?..."
}
},{
{
"Dwarves aren't supposed to look that pale...",
"I don't know what's worse, the dwarves, or their creations...",
"They all obey their master without question, even now..."
},{
"When people say power corrupts, this is what they mean...",
"He's more a Lich than a King now...",
"Looks like he's more demon than dwarf now..."
}
},{
{
"What the heck is that thing?...",
"This place is terrifying...",
"What were the dwarves thinking, toying with power like this?..."
},{
"Oh.... this doesn't look good...",
"So that's what a god looks like?...",
"This is going to hurt..."
}
},{
{
"I don't like this place... we should leave as soon as we can..."
},{
"Hello source viewer, I'm writing this here as this line should never trigger. Have a nice day!"
}
}
};
//1st index - Yog or not, 2nd index - specific line.
public static final String[][] VOICE_BOSSBEATEN = {
{
"Yes!",
"Victory!"
},{
"It's over... we won...",
"I can't believe it... We just killed a god..."
}
};
//1st index - boss or not, 2nd index - specific line.
public static final String[][] VOICE_DEFEATED = {
{
"Good luck...",
"I will return...",
"Tired... for now..."
},{
"No... I can't....",
"I'm sorry.. good luck..",
"Finish it off... without me..."
}
};
public static final String[] VOICE_HEROKILLED = {
"nooo...",
"no...",
"I couldn't help them..."
};
public static final String[] VOICE_BLESSEDANKH = {
"Incredible!...",
"Wish I had one of those...",
"How did you survive that?..."
};
} }
private static class WndGhostHero extends Window{ private static class WndGhostHero extends Window{

View File

@ -28,6 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.SPDSettings;
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon; import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
import com.shatteredpixel.shatteredpixeldungeon.Statistics; import com.shatteredpixel.shatteredpixeldungeon.Statistics;
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob; import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
import com.shatteredpixel.shatteredpixeldungeon.effects.BannerSprites; import com.shatteredpixel.shatteredpixeldungeon.effects.BannerSprites;
@ -41,6 +42,7 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.SpellSprite;
import com.shatteredpixel.shatteredpixeldungeon.items.Heap; import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
import com.shatteredpixel.shatteredpixeldungeon.items.Honeypot; import com.shatteredpixel.shatteredpixeldungeon.items.Honeypot;
import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.DriedRose;
import com.shatteredpixel.shatteredpixeldungeon.items.bags.MagicalHolster; import com.shatteredpixel.shatteredpixeldungeon.items.bags.MagicalHolster;
import com.shatteredpixel.shatteredpixeldungeon.items.bags.PotionBandolier; import com.shatteredpixel.shatteredpixeldungeon.items.bags.PotionBandolier;
import com.shatteredpixel.shatteredpixeldungeon.items.bags.ScrollHolder; import com.shatteredpixel.shatteredpixeldungeon.items.bags.ScrollHolder;
@ -419,6 +421,13 @@ public class GameScene extends PixelScene {
&& (InterlevelScene.mode == InterlevelScene.Mode.DESCEND || InterlevelScene.mode == InterlevelScene.Mode.FALL)) { && (InterlevelScene.mode == InterlevelScene.Mode.DESCEND || InterlevelScene.mode == InterlevelScene.Mode.FALL)) {
GLog.h(Messages.get(this, "descend"), Dungeon.depth); GLog.h(Messages.get(this, "descend"), Dungeon.depth);
Sample.INSTANCE.play(Assets.SND_DESCEND); Sample.INSTANCE.play(Assets.SND_DESCEND);
for (Char ch : Actor.chars()){
if (ch instanceof DriedRose.GhostHero){
((DriedRose.GhostHero) ch).sayAppeared();
}
}
} else if (InterlevelScene.mode == InterlevelScene.Mode.RESET) { } else if (InterlevelScene.mode == InterlevelScene.Mode.RESET) {
GLog.h(Messages.get(this, "warp")); GLog.h(Messages.get(this, "warp"));
} else { } else {

View File

@ -112,6 +112,10 @@ public class BossHealthBar extends Component {
} }
} }
public static boolean isAssigned(){
return boss != null && boss.isAlive() && Dungeon.level.mobs.contains(boss);
}
public static void bleed(boolean value){ public static void bleed(boolean value){
bleeding = value; bleeding = value;
} }

View File

@ -204,11 +204,6 @@ items.artifacts.driedrose$petal.no_room=There is no room left for this petal, so
items.artifacts.driedrose$petal.maxlevel=The rose is completed! items.artifacts.driedrose$petal.maxlevel=The rose is completed!
items.artifacts.driedrose$petal.levelup=You add the petal to the rose. items.artifacts.driedrose$petal.levelup=You add the petal to the rose.
items.artifacts.driedrose$petal.desc=A frail dried up petal, which has somehow survived this far into the dungeon. items.artifacts.driedrose$petal.desc=A frail dried up petal, which has somehow survived this far into the dungeon.
items.artifacts.driedrose$ghosthero.name=sad ghost
items.artifacts.driedrose$ghosthero.def_verb=evaded
items.artifacts.driedrose$ghosthero.hello=Hello again %s.
items.artifacts.driedrose$ghosthero.introduce=My spirit is bound to this rose, it was very precious to me, a gift from my love whom I left on the surface.\n\nI cannot return to him, but thanks to you I have a second chance to complete my journey. When I am able I will respond to your call and fight with you.\n\nAs long as you have the rose I can hear your voice, so you can use it to direct me from afar.\n\nHopefully you may succeed where I failed...
items.artifacts.driedrose$ghosthero.desc=A frail looking ethereal figure with a humanoid shape. Their power seems tied to the rose you have.\n\nThis ghost may not be much, they seem to be your only true friend down here.
items.artifacts.driedrose$wndghosthero.title=Ghost's Equipment items.artifacts.driedrose$wndghosthero.title=Ghost's Equipment
items.artifacts.driedrose$wndghosthero.desc=The ghost is weak on their own, but their form is solid enough to be equipped with a weapon and armor. They will be able to use these items just like you do.\n\nThe ghost can currently equip items requiring up to _%d strength._ items.artifacts.driedrose$wndghosthero.desc=The ghost is weak on their own, but their form is solid enough to be equipped with a weapon and armor. They will be able to use these items just like you do.\n\nThe ghost can currently equip items requiring up to _%d strength._
items.artifacts.driedrose$wndghosthero.weapon_prompt=Select a weapon items.artifacts.driedrose$wndghosthero.weapon_prompt=Select a weapon
@ -218,6 +213,93 @@ items.artifacts.driedrose$wndghosthero.cant_unidentified=You don't know enough a
items.artifacts.driedrose$wndghosthero.cant_cursed=You can't give the ghost cursed equipment. items.artifacts.driedrose$wndghosthero.cant_cursed=You can't give the ghost cursed equipment.
items.artifacts.driedrose$wndghosthero.cant_strength=The ghost is not strong enough to use that. items.artifacts.driedrose$wndghosthero.cant_strength=The ghost is not strong enough to use that.
##ghost hero
items.artifacts.driedrose$ghosthero.name=sad ghost
items.artifacts.driedrose$ghosthero.def_verb=evaded
items.artifacts.driedrose$ghosthero.hello=Hello again %s.
items.artifacts.driedrose$ghosthero.introduce=My spirit is bound to this rose, it was very precious to me, a gift from my love whom I left on the surface.\n\nI cannot return to him, but thanks to you I have a second chance to complete my journey. When I am able I will respond to your call and fight with you.\n\nAs long as you have the rose I can hear your voice, so you can use it to direct me from afar.\n\nHopefully you may succeed where I failed...
items.artifacts.driedrose$ghosthero.dialogue_sewers_1=These sewers used to be safe, people even lived here in the winter.
items.artifacts.driedrose$ghosthero.dialogue_sewers_2=I wonder what happened to the guard patrols, did they give up?
items.artifacts.driedrose$ghosthero.dialogue_sewers_3=I had family on the surface, I hope they're safe.
items.artifacts.driedrose$ghosthero.dialogue_sewers_4=The guards couldn't defeat these monsters, but maybe we can.
items.artifacts.driedrose$ghosthero.dialogue_sewers_5=If even the sewers are this dangerous, I wonder what's below...
items.artifacts.driedrose$ghosthero.dialogue_sewers_6=What could have caused these rats and crabs to grow so large?
items.artifacts.driedrose$ghosthero.dialogue_prison_1=I've heard stories about this place, nothing good.
items.artifacts.driedrose$ghosthero.dialogue_prison_2=This place was always more of a dungeon than a prison.
items.artifacts.driedrose$ghosthero.dialogue_prison_3=I can't imagine what went on when this place was abandoned.
items.artifacts.driedrose$ghosthero.dialogue_prison_4=It seems both the prisoners and guards have been turned into monsters.
items.artifacts.driedrose$ghosthero.dialogue_prison_5=What could be responsible for all these skeletons?
items.artifacts.driedrose$ghosthero.dialogue_prison_6=These people didn't have to end up like this...
items.artifacts.driedrose$ghosthero.dialogue_caves_1=No human or dwarf has been here for a very long time.
items.artifacts.driedrose$ghosthero.dialogue_caves_2=What would cause the dwarves to abandon a gold mine?
items.artifacts.driedrose$ghosthero.dialogue_caves_3=It's a shame all the gold here is useless on the surface.
items.artifacts.driedrose$ghosthero.dialogue_caves_4=The creatures here are twisted, just like the sewers.
items.artifacts.driedrose$ghosthero.dialogue_caves_5=Even the bats are bloodthirsty here.
items.artifacts.driedrose$ghosthero.dialogue_caves_6=We haven't seen any machinery, did the dwarves reclaim it all?
items.artifacts.driedrose$ghosthero.dialogue_city_1=The dwarves were industrious, but greedy.
items.artifacts.driedrose$ghosthero.dialogue_city_2=So the dwarvern metropolis really has fallen.
items.artifacts.driedrose$ghosthero.dialogue_city_3=I hope the surface never ends up like this place.
items.artifacts.driedrose$ghosthero.dialogue_city_4=Dwarves aren't supposed to look so pale.
items.artifacts.driedrose$ghosthero.dialogue_city_5=I don't know what's worse, the dwarves, or their creations.
items.artifacts.driedrose$ghosthero.dialogue_city_6=It seems the dwarves are mindless monsters now as well.
items.artifacts.driedrose$ghosthero.dialogue_halls_1=What is this place?
items.artifacts.driedrose$ghosthero.dialogue_halls_2=This place is terrifying...
items.artifacts.driedrose$ghosthero.dialogue_halls_3=What were the dwarves thinking, toying with power like this?
items.artifacts.driedrose$ghosthero.dialogue_halls_4=The monsters here are otherworldly, where did they come from?
items.artifacts.driedrose$ghosthero.dialogue_halls_5=Can you feel it? It's like something is watching us.
items.artifacts.driedrose$ghosthero.dialogue_halls_6=Thank goodness there are torches, it's so dark here!
items.artifacts.driedrose$ghosthero.seen_goo_1=Beware Goo!
items.artifacts.driedrose$ghosthero.seen_goo_2=Many of my friends died to this thing, time for vengeance!
items.artifacts.driedrose$ghosthero.seen_goo_3=Such an abomination cannot be allowed to live!
items.artifacts.driedrose$ghosthero.seen_tengu_1=The one prisoner left is a deadly assassin. Of course...
items.artifacts.driedrose$ghosthero.seen_tengu_2=He's trapped us!
items.artifacts.driedrose$ghosthero.seen_tengu_3=I've heard horror stories about that mask...
items.artifacts.driedrose$ghosthero.seen_dm300_1=Only dwarves would build a mining machine that kills intruders.
items.artifacts.driedrose$ghosthero.seen_dm300_2=That thing is huge...
items.artifacts.driedrose$ghosthero.seen_dm300_3=How has this thing stayed active for so long?
items.artifacts.driedrose$ghosthero.seen_king_1=When people say power corrupts, this is what they mean.
items.artifacts.driedrose$ghosthero.seen_king_2=He's more of a lich than a king now.
items.artifacts.driedrose$ghosthero.seen_king_3=Even in death the dwarves obey their master.
items.artifacts.driedrose$ghosthero.seen_yog_1=Oh, this doesn't look good.
items.artifacts.driedrose$ghosthero.seen_yog_2=So that's what a god looks like?
items.artifacts.driedrose$ghosthero.seen_yog_3=This is going to hurt...
items.artifacts.driedrose$ghosthero.defeated_by_enemy_1=Good luck...
items.artifacts.driedrose$ghosthero.defeated_by_enemy_2=Tired... for now...
items.artifacts.driedrose$ghosthero.defeated_by_enemy_3=I will return...
items.artifacts.driedrose$ghosthero.defeated_by_boss_1=I'm sorry... good luck...
items.artifacts.driedrose$ghosthero.defeated_by_boss_2=Finish it off... without me...
items.artifacts.driedrose$ghosthero.defeated_by_boss_3=No... I can't...
items.artifacts.driedrose$ghosthero.blessed_ankh_1=How did you survive that?
items.artifacts.driedrose$ghosthero.blessed_ankh_2=I wish I had one of those...
items.artifacts.driedrose$ghosthero.blessed_ankh_3=Oh my! You're still alive!
items.artifacts.driedrose$ghosthero.player_killed_1=No!...
items.artifacts.driedrose$ghosthero.player_killed_2=I couldn't help them...
items.artifacts.driedrose$ghosthero.player_killed_3=Not like this...
items.artifacts.driedrose$ghosthero.direct_prompt=What should I do?
items.artifacts.driedrose$ghosthero.directed_follow_1=Okay, I'll follow you
items.artifacts.driedrose$ghosthero.directed_follow_2=I'll fall in behind you
items.artifacts.driedrose$ghosthero.directed_follow_3=Following you...
items.artifacts.driedrose$ghosthero.directed_follow_4=Okay, let's go!
items.artifacts.driedrose$ghosthero.directed_follow_5=I've got your back.
items.artifacts.driedrose$ghosthero.directed_attack_1=Okay, I'll attack that one.
items.artifacts.driedrose$ghosthero.directed_attack_2=I'll get that one.
items.artifacts.driedrose$ghosthero.directed_attack_3=Engaging...
items.artifacts.driedrose$ghosthero.directed_attack_4=Let's get them!
items.artifacts.driedrose$ghosthero.directed_attack_5=TODO
items.artifacts.driedrose$ghosthero.directed_position_1=Okay, I'll hold that position.
items.artifacts.driedrose$ghosthero.directed_position_2=I'll go there and defend.
items.artifacts.driedrose$ghosthero.directed_position_3=Repositioning...
items.artifacts.driedrose$ghosthero.directed_position_4=On my way!
items.artifacts.driedrose$ghosthero.directed_position_5=TODO
items.artifacts.driedrose$ghosthero.desc=A frail looking ethereal figure with a humanoid shape. Their power seems tied to the rose you have.\n\nThis ghost may not be much, they seem to be your only true friend down here.
##back to artifacts
items.artifacts.etherealchains.name=ethereal chains items.artifacts.etherealchains.name=ethereal chains
items.artifacts.etherealchains.ac_cast=CAST items.artifacts.etherealchains.ac_cast=CAST
items.artifacts.etherealchains.no_charge=Your chains do not have enough charge. items.artifacts.etherealchains.no_charge=Your chains do not have enough charge.