From e4ac692b5c50667f0ddae9fd93251d67ed3b4f13 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Mon, 3 Nov 2014 15:03:43 -0500 Subject: [PATCH] v0.2.2: bones system no longer triggers on a run with challenges --- .../shatteredpixel/shatteredpixeldungeon/Bones.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/Bones.java b/src/com/shatteredpixel/shatteredpixeldungeon/Bones.java index c4b91b35e..53a99483d 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/Bones.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/Bones.java @@ -46,8 +46,8 @@ public class Bones { depth = Dungeon.depth; - //heroes which have already won the game, or who die much higher than their deepest depth drop no bones. - if (Statistics.amuletObtained || (Statistics.deepestFloor - 5) >= depth) + //heroes which have won the game, who die far above their farthest depth, or who are challenged drop no bones. + if (Statistics.amuletObtained || (Statistics.deepestFloor - 5) >= depth || Dungeon.challenges > 0) return; item = pickItem(Dungeon.hero); @@ -121,7 +121,11 @@ public class Bones { public static Item get() { if (depth == -1) { - + + //challenged heroes cannot find bones. + if (Dungeon.challenges > 0) + return null; + try { InputStream input = Game.instance.openFileInput( BONES_FILE ) ; Bundle bundle = Bundle.read( input );