v0.2.2a: reverted some changes to study rooms, corrected an error.
This commit is contained in:
parent
b68db3bb73
commit
55ea2dbcab
|
@ -22,7 +22,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.items.Gold;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfLiquidFlame;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Room;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
||||
|
@ -151,11 +150,7 @@ public class StandardPainter extends Painter {
|
|||
fill( level, room.left + 1, room.top + 1, room.width() - 1, room.height() - 1 , Terrain.BOOKSHELF );
|
||||
fill( level, room.left + 2, room.top + 2, room.width() - 3, room.height() - 3 , Terrain.EMPTY_SP );
|
||||
|
||||
for (Room.Door door : room.connected.values()) {
|
||||
if (door.type == Room.Door.Type.LOCKED){
|
||||
//sneaky sneaky...
|
||||
level.addItemToSpawn(new PotionOfLiquidFlame());
|
||||
} else {
|
||||
for (Point door : room.connected.values()) {
|
||||
if (door.x == room.left) {
|
||||
set( level, door.x + 1, door.y, Terrain.EMPTY );
|
||||
} else if (door.x == room.right) {
|
||||
|
@ -166,20 +161,19 @@ public class StandardPainter extends Painter {
|
|||
set( level, door.x , door.y - 1, Terrain.EMPTY );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set( level, room.center(), Terrain.PEDESTAL );
|
||||
Point center = room.center();
|
||||
set( level, center, Terrain.PEDESTAL );
|
||||
if (Random.Int(2) != 0){
|
||||
Item prize = level.findPrizeItem();
|
||||
if (prize != null) {
|
||||
level.drop(prize, (room.center().x + room.center().y * level.WIDTH));
|
||||
level.drop(prize, (room.center().x + center.y * level.WIDTH));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
level.drop(Generator.random( Random.oneOf(
|
||||
Generator.Category.POTION,
|
||||
Generator.Category.SCROLL)), (room.center().x + room.center().y * level.WIDTH));
|
||||
Generator.Category.SCROLL)), (room.center().x + center.y * level.WIDTH));
|
||||
}
|
||||
|
||||
private static void paintBridge( Level level, Room room ) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user