Merging 1.7.5 Source: levels/painters changes

This commit is contained in:
Evan Debenham 2015-02-02 14:16:38 -05:00
parent 1a4d177a9e
commit a6c89490b0
2 changed files with 10 additions and 2 deletions

View File

@ -48,7 +48,15 @@ public class RatKingPainter extends Painter {
addChest( level, i * Level.WIDTH + room.left + 1, door );
addChest( level, i * Level.WIDTH + room.right - 1, door );
}
while (true) {
Heap chest = level.heaps.get( room.random() );
if (chest != null) {
chest.type = Heap.Type.MIMIC;
break;
}
}
RatKing king = new RatKing();
king.pos = room.random( 1 );
level.mobs.add( king );

View File

@ -43,7 +43,7 @@ public class TreasuryPainter extends Painter {
do {
pos = room.random();
} while (level.map[pos] != Terrain.EMPTY || level.heaps.get( pos ) != null);
level.drop( new Gold().random(), pos ).type = heapType;
level.drop( new Gold().random(), pos ).type = (i == 0 && heapType == Heap.Type.CHEST ? Heap.Type.MIMIC : heapType);
}
if (heapType == Heap.Type.HEAP) {