v0.2.2a: refactored and tweaked placement of key items in rooms.

This commit is contained in:
Evan Debenham
2014-11-05 16:50:08 -05:00
parent fd81d67616
commit dc4232de2a
7 changed files with 74 additions and 61 deletions
@@ -78,11 +78,14 @@ public class TrapsPainter extends Painter {
}
private static Item prize( Level level ) {
Item prize = level.itemToSpanAsPrize();
if (prize != null) {
return prize;
}
Item prize;
if (Random.Int(4) != 0){
prize = level.findPrizeItem();
if (prize != null)
return prize;
}
prize = Generator.random( Random.oneOf(
Generator.Category.WEAPON,