v0.6.4: fixed item generation errors in pit room and mimic logic

This commit is contained in:
Evan Debenham 2018-03-23 19:02:35 -04:00
parent 2d58797e32
commit 735b5fc186
2 changed files with 5 additions and 2 deletions

View File

@ -171,7 +171,7 @@ public class Mimic extends Mob {
reward = Generator.random(Generator.Category.RING);
break;
}
} while (reward == null || !Challenges.isItemBlocked(reward));
} while (reward == null || Challenges.isItemBlocked(reward));
m.items.add(reward);
return m;

View File

@ -66,14 +66,17 @@ public class PitRoom extends SpecialRoom {
switch (Random.Int(3)){
case 0:
mainLoot = Generator.random(Generator.Category.RING);
break;
case 1:
mainLoot = Generator.random(Generator.Category.ARTIFACT);
break;
case 2:
mainLoot = Generator.random(Random.oneOf(
Generator.Category.WEAPON,
Generator.Category.ARMOR));
break;
}
} while ( mainLoot == null || !Challenges.isItemBlocked(mainLoot));
} while ( mainLoot == null || Challenges.isItemBlocked(mainLoot));
level.drop(mainLoot, remains);
int n = Random.IntRange( 1, 2 );