V0.2.0: fixed death interaction with Scroll of Psionic Blast

This commit is contained in:
Evan Debenham 2014-08-30 02:25:52 -04:00
parent 9224f1539a
commit 7301b5a751
6 changed files with 13 additions and 5 deletions

View File

@ -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

View File

@ -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

View File

@ -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..." );
}
}

View File

@ -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..." );
}
}

View File

@ -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..." );
}
}

View File

@ -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..." );
}
}