From 7301b5a751a2d6ffd2c8e51b85a90ffbc397f958 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Sat, 30 Aug 2014 02:25:52 -0400 Subject: [PATCH] V0.2.0: fixed death interaction with Scroll of Psionic Blast --- .../shatteredpixeldungeon/ResultDescriptions.java | 2 +- .../items/scrolls/ScrollOfPsionicBlast.java | 8 ++++++++ .../items/wands/WandOfAvalanche.java | 2 +- .../shatteredpixeldungeon/items/wands/WandOfFirebolt.java | 2 +- .../items/wands/WandOfLightning.java | 2 +- .../items/wands/WandOfMagicMissile.java | 2 +- 6 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ResultDescriptions.java b/src/com/shatteredpixel/shatteredpixeldungeon/ResultDescriptions.java index 9f66d3265..9f884fc16 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/ResultDescriptions.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/ResultDescriptions.java @@ -24,7 +24,7 @@ public class ResultDescriptions { public static final String BOSS = "Killed by the %s on level %d"; // Items - public static final String WAND = "Killed by your own %s on level %d"; + public static final String ITEM = "Killed by your own %s on level %d"; public static final String GLYPH = "Killed by the %s on level %d"; // Dungeon features diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfPsionicBlast.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfPsionicBlast.java index eb2b7460c..96c96acb5 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfPsionicBlast.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfPsionicBlast.java @@ -17,7 +17,10 @@ */ package com.shatteredpixel.shatteredpixeldungeon.items.scrolls; +import com.shatteredpixel.shatteredpixeldungeon.ResultDescriptions; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis; +import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; +import com.shatteredpixel.shatteredpixeldungeon.utils.Utils; import com.watabou.noosa.audio.Sample; import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; @@ -57,6 +60,11 @@ public class ScrollOfPsionicBlast extends Scroll { setKnown(); curUser.spendAndNext( TIME_TO_READ ); + + if (!curUser.isAlive()) { + Dungeon.fail(Utils.format(ResultDescriptions.ITEM, name, Dungeon.depth)); + GLog.n("The Psionic Blast tears your mind apart..."); + } } @Override diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfAvalanche.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfAvalanche.java index 0874e728c..95dce7648 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfAvalanche.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfAvalanche.java @@ -81,7 +81,7 @@ public class WandOfAvalanche extends Wand { } if (!curUser.isAlive()) { - Dungeon.fail( Utils.format( ResultDescriptions.WAND, name, Dungeon.depth ) ); + Dungeon.fail( Utils.format( ResultDescriptions.ITEM, name, Dungeon.depth ) ); GLog.n( "You killed yourself with your own Wand of Avalanche..." ); } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfFirebolt.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfFirebolt.java index 8d213b332..80d5fcd96 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfFirebolt.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfFirebolt.java @@ -66,7 +66,7 @@ public class WandOfFirebolt extends Wand { ch.sprite.emitter().burst( FlameParticle.FACTORY, 5 ); if (ch == curUser && !ch.isAlive()) { - Dungeon.fail( Utils.format( ResultDescriptions.WAND, name, Dungeon.depth ) ); + Dungeon.fail( Utils.format( ResultDescriptions.ITEM, name, Dungeon.depth ) ); GLog.n( "You killed yourself with your own Wand of Firebolt..." ); } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfLightning.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfLightning.java index 8be4bf7bc..3bd3d7a79 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfLightning.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfLightning.java @@ -51,7 +51,7 @@ public class WandOfLightning extends Wand { // The actual effect is processed in "fx" method if (!curUser.isAlive()) { - Dungeon.fail( Utils.format( ResultDescriptions.WAND, name, Dungeon.depth ) ); + Dungeon.fail( Utils.format( ResultDescriptions.ITEM, name, Dungeon.depth ) ); GLog.n( "You killed yourself with your own Wand of Lightning..." ); } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfMagicMissile.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfMagicMissile.java index d00e82d61..2e1b2d90c 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfMagicMissile.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfMagicMissile.java @@ -76,7 +76,7 @@ public class WandOfMagicMissile extends Wand { ch.sprite.burst( 0xFF99CCFF, level / 2 + 2 ); if (ch == curUser && !ch.isAlive()) { - Dungeon.fail( Utils.format( ResultDescriptions.WAND, name, Dungeon.depth ) ); + Dungeon.fail( Utils.format( ResultDescriptions.ITEM, name, Dungeon.depth ) ); GLog.n( "You killed yourself with your own Wand of Magic Missile..." ); } }