v0.2.2: bones system no longer triggers on a run with challenges

This commit is contained in:
Evan Debenham 2014-11-03 15:03:43 -05:00
parent 4415f36e76
commit e4ac692b5c

View File

@ -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);
@ -122,6 +122,10 @@ 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 );