@Override protected void createItems() { Item item = Bones.get(); if (item != null) { drop( item, randomRespawnCell() ).setHauntedIfCursed(1f).type = Heap.Type.REMAINS; } drop(new IronKey(10), randomPrisonCell()); }
@Override protected void createItems() { Item item = Bones.get(); if (item != null) { drop( item, randomRespawnCell() ).setHauntedIfCursed(1f).type = Heap.Type.REMAINS; } drop(new IronKey(10), randomPrisonCell()); }
level.addItemToSpawn( new IronKey( Dungeon.depth ) );
&& Notes.keyCount(new IronKey(Dungeon.depth)) > 0) {
@Override public void paint( Level level) { Painter.fill( level, this, Terrain.WALL ); Painter.fill( level, this, 1, Terrain.CHASM ); Painter.drawInside( level, this, entrance(), 2, Terrain.EMPTY_SP); Painter.fill( level, this, 2, Terrain.EMPTY ); int n = Random.NormalIntRange(2, 3); int dropPos; for (int i = 0; i < n; i++) { do { dropPos = level.pointToCell(random()); } while (level.map[dropPos] != Terrain.EMPTY); level.drop(prize(level), dropPos); } entrance().set( Door.Type.LOCKED ); level.addItemToSpawn( new IronKey( Dungeon.depth ) ); }
&& Notes.keyCount(new IronKey(Dungeon.depth)) > 0) {
@Override public void paint( Level level) { Painter.fill( level, this, Terrain.WALL ); Painter.fill( level, this, 1, Terrain.CHASM ); Painter.drawInside( level, this, entrance(), 2, Terrain.EMPTY_SP); Painter.fill( level, this, 2, Terrain.EMPTY ); int n = Random.NormalIntRange(2, 3); int dropPos; for (int i = 0; i < n; i++) { do { dropPos = level.pointToCell(random()); } while (level.map[dropPos] != Terrain.EMPTY); level.drop(prize(level), dropPos); } entrance().set( Door.Type.LOCKED ); level.addItemToSpawn( new IronKey( Dungeon.depth ) ); }
level.addItemToSpawn( new IronKey( Dungeon.depth ) );
public void paint( Level level ) { Painter.fill( level, this, Terrain.WALL ); Painter.fill( level, this, 1, Terrain.EMPTY_SP ); Painter.fill( level, this, 2, Terrain.EMPTY ); int cx = (left + right) / 2; int cy = (top + bottom) / 2; int c = cx + cy * level.width(); Random.shuffle(prizeClasses); Item i1, i2; i1 = prize( level ); i2 = prize( level ); level.drop( i1, c ).type = Heap.Type.CRYSTAL_CHEST; level.drop( i2, c + PathFinder.NEIGHBOURS8[Random.Int( 8 )]).type = Heap.Type.CRYSTAL_CHEST; level.addItemToSpawn( new CrystalKey( Dungeon.depth ) ); entrance().set( Door.Type.LOCKED ); level.addItemToSpawn( new IronKey( Dungeon.depth ) ); }
} else { entrance.set( Door.Type.LOCKED ); level.addItemToSpawn( new IronKey( Dungeon.depth ) );
} else { entrance.set( Door.Type.LOCKED ); level.addItemToSpawn( new IronKey( Dungeon.depth ) );
public void paint( Level level ) { Painter.fill( level, this, Terrain.WALL ); Painter.fill( level, this, 1, Terrain.EMPTY_SP ); Painter.fill( level, this, 2, Terrain.EMPTY ); int cx = (left + right) / 2; int cy = (top + bottom) / 2; int c = cx + cy * level.width(); Random.shuffle(prizeClasses); Item i1, i2; i1 = prize( level ); i2 = prize( level ); level.drop( i1, c ).type = Heap.Type.CRYSTAL_CHEST; level.drop( i2, c + PathFinder.NEIGHBOURS8[Random.Int( 8 )]).type = Heap.Type.CRYSTAL_CHEST; level.addItemToSpawn( new CrystalKey( Dungeon.depth ) ); entrance().set( Door.Type.LOCKED ); level.addItemToSpawn( new IronKey( Dungeon.depth ) ); }
public void paint( Level level ) { Painter.fill( level, this, Terrain.WALL ); Painter.fill( level, this, 1, Terrain.EMPTY_SP ); Door entrance = entrance(); Painter.fill( level, left + 1, top+1, width() - 2, 1 , Terrain.BOOKSHELF ); Painter.drawInside(level, this, entrance, 1, Terrain.EMPTY_SP ); int n = Random.IntRange( 2, 3 ); for (int i=0; i < n; i++) { int pos; do { pos = level.pointToCell(random()); } while (level.map[pos] != Terrain.EMPTY_SP || level.heaps.get( pos ) != null); Item item; if (i == 0) item = Random.Int(2) == 0 ? new ScrollOfIdentify() : new ScrollOfRemoveCurse(); else item = prize( level ); level.drop( item, pos ); } entrance.set( Door.Type.LOCKED ); level.addItemToSpawn( new IronKey( Dungeon.depth ) ); }
public void paint( Level level ) { Painter.fill( level, this, Terrain.WALL ); Painter.fill( level, this, 1, Terrain.EMPTY_SP ); Door entrance = entrance(); Painter.fill( level, left + 1, top+1, width() - 2, 1 , Terrain.BOOKSHELF ); Painter.drawInside(level, this, entrance, 1, Terrain.EMPTY_SP ); int n = Random.IntRange( 2, 3 ); for (int i=0; i < n; i++) { int pos; do { pos = level.pointToCell(random()); } while (level.map[pos] != Terrain.EMPTY_SP || level.heaps.get( pos ) != null); Item item; if (i == 0) item = Random.Int(2) == 0 ? new ScrollOfIdentify() : new ScrollOfRemoveCurse(); else item = prize( level ); level.drop( item, pos ); } entrance.set( Door.Type.LOCKED ); level.addItemToSpawn( new IronKey( Dungeon.depth ) ); }
public void paint( Level level ) { Door entrance = entrance(); entrance.set(Door.Type.LOCKED); level.addItemToSpawn(new IronKey(Dungeon.depth)); Painter.fill(level, this, Terrain.WALL); Painter.fill(level, this, 1, Terrain.GRASS); int heartX = Random.IntRange(left+1, right-1); int heartY = Random.IntRange(top+1, bottom-1); if (entrance.x == left) { heartX = right - 1; } else if (entrance.x == right) { heartX = left + 1; } else if (entrance.y == top) { heartY = bottom - 1; } else if (entrance.y == bottom) { heartY = top + 1; } placePlant(level, heartX + heartY * level.width(), new RotHeart()); int lashers = ((width()-2)*(height()-2))/8; for (int i = 1; i <= lashers; i++){ int pos; do { pos = level.pointToCell(random()); } while (!validPlantPos(level, pos)); placePlant(level, pos, new RotLasher()); } }
public void paint( Level level ) { Door entrance = entrance(); entrance.set(Door.Type.LOCKED); level.addItemToSpawn(new IronKey(Dungeon.depth)); Painter.fill(level, this, Terrain.WALL); Painter.fill(level, this, 1, Terrain.GRASS); int heartX = Random.IntRange(left+1, right-1); int heartY = Random.IntRange(top+1, bottom-1); if (entrance.x == left) { heartX = right - 1; } else if (entrance.x == right) { heartX = left + 1; } else if (entrance.y == top) { heartY = bottom - 1; } else if (entrance.y == bottom) { heartY = top + 1; } placePlant(level, heartX + heartY * level.width(), new RotHeart()); int lashers = ((width()-2)*(height()-2))/8; for (int i = 1; i <= lashers; i++){ int pos; do { pos = level.pointToCell(random()); } while (!validPlantPos(level, pos)); placePlant(level, pos, new RotLasher()); } }
Notes.remove(new IronKey(Dungeon.depth)); Level.set( doorCell, Terrain.DOOR ); } else {
level.addItemToSpawn( new IronKey( Dungeon.depth ) );