V0.2.0: fixed death interaction with Scroll of Psionic Blast
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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..." );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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..." );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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..." );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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..." );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user