From 97e035eed5cb6bff02d3885746fb068a842598f1 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Mon, 19 Sep 2022 15:16:07 -0400 Subject: [PATCH] v1.4.0: added new ascension dialogue for the ghost hero --- .../assets/messages/items/items.properties | 6 +++ .../items/artifacts/DriedRose.java | 50 +++++++++++-------- .../scenes/GameScene.java | 7 +++ 3 files changed, 42 insertions(+), 21 deletions(-) diff --git a/core/src/main/assets/messages/items/items.properties b/core/src/main/assets/messages/items/items.properties index bb6302a80..95803768f 100644 --- a/core/src/main/assets/messages/items/items.properties +++ b/core/src/main/assets/messages/items/items.properties @@ -258,6 +258,12 @@ items.artifacts.driedrose$ghosthero.dialogue_halls_3=What were the dwarves think 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.dialogue_ascension_1=Why is this happening, I thought we succeeded? +items.artifacts.driedrose$ghosthero.dialogue_ascension_2=How is that thing still able to influence this world? +items.artifacts.driedrose$ghosthero.dialogue_ascension_3=I hope you know what you're doing with that amulet. +items.artifacts.driedrose$ghosthero.dialogue_ascension_4=I suppose we're not done just yet. +items.artifacts.driedrose$ghosthero.dialogue_ascension_5=We've come so far already, we can finish this! +items.artifacts.driedrose$ghosthero.dialogue_ascension_6=Just a little further, we can make it out of 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! diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/DriedRose.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/DriedRose.java index 80e37e519..a21837c48 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/DriedRose.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/DriedRose.java @@ -29,6 +29,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.CorrosiveGas; import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ToxicGas; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.AllyBuff; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.AscensionChallenge; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicImmune; @@ -762,27 +763,34 @@ public class DriedRose extends Artifact { } public void sayAppeared(){ - int depth = (Dungeon.depth - 1) / 5; - - //only some lines are said on the first floor of a depth - int variant = Dungeon.depth % 5 == 1 ? Random.IntRange(1, 3) : Random.IntRange(1, 6); - - switch(depth){ - case 0: - yell( Messages.get( this, "dialogue_sewers_" + variant )); - 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 (Dungeon.hero.buff(AscensionChallenge.class) != null){ + yell( Messages.get( this, "dialogue_ascension_" + Random.IntRange(1, 6) )); + + } else { + + int depth = (Dungeon.depth - 1) / 5; + + //only some lines are said on the first floor of a depth + int variant = Dungeon.depth % 5 == 1 ? Random.IntRange(1, 3) : Random.IntRange(1, 6); + + switch (depth) { + case 0: + yell(Messages.get(this, "dialogue_sewers_" + variant)); + 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.Sounds.GHOST ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameScene.java index c4399ee79..5f4b23564 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameScene.java @@ -570,6 +570,13 @@ public class GameScene extends PixelScene { if (Dungeon.hero.buff(AscensionChallenge.class) != null && Dungeon.depth == Statistics.highestAscent){ Dungeon.hero.buff(AscensionChallenge.class).saySwitch(); + if (Dungeon.bossLevel()){ + for (Char ch : Actor.chars()){ + if (ch instanceof DriedRose.GhostHero){ + ((DriedRose.GhostHero) ch).sayAppeared(); + } + } + } } InterlevelScene.mode = InterlevelScene.Mode.NONE;