public int randomDestination() { int cell; do { cell = Random.Int( length() ); } while (!passable[cell]); return cell; }
public int randomDestination() { int cell; do { cell = Random.Int( length() ); } while (!passable[cell]); return cell; }
public static void addHallsVisuals( Level level, Group group ) { for (int i=0; i < level.length(); i++) { if (level.map[i] == Terrain.WATER) { group.add( new Stream( i ) ); } } }
public int randomRespawnCell() { int cell; do { cell = Random.Int( length() ); } while ((Dungeon.level == this && heroFOV[cell]) || !passable[cell] || Actor.findChar( cell ) != null); return cell; }
public static void addCavesVisuals( Level level, Group group ) { for (int i=0; i < level.length(); i++) { if (level.map[i] == Terrain.WALL_DECO) { group.add( new Vein( i ) ); } } }
public static void addCavesVisuals( Level level, Group group ) { for (int i=0; i < level.length(); i++) { if (level.map[i] == Terrain.WALL_DECO) { group.add( new Vein( i ) ); } } }
public static void addSewerVisuals( Level level, Group group ) { for (int i=0; i < level.length(); i++) { if (level.map[i] == Terrain.WALL_DECO) { group.add( new Sink( i ) ); } } }
public static void addPrisonVisuals(Level level, Group group){ for (int i=0; i < level.length(); i++) { if (level.map[i] == Terrain.WALL_DECO) { group.add( new Torch( i ) ); } } }
public static void addCityVisuals( Level level, Group group ) { for (int i=0; i < level.length(); i++) { if (level.map[i] == Terrain.WALL_DECO) { group.add( new Smoke( i ) ); } } }
public int randomRespawnCell() { int cell; do { cell = Random.Int( length() ); } while ((Dungeon.level == this && heroFOV[cell]) || !passable[cell] || Actor.findChar( cell ) != null); return cell; }
public static void addPrisonVisuals(Level level, Group group){ for (int i=0; i < level.length(); i++) { if (level.map[i] == Terrain.WALL_DECO) { group.add( new Torch( i ) ); } } }
public static void addCityVisuals( Level level, Group group ) { for (int i=0; i < level.length(); i++) { if (level.map[i] == Terrain.WALL_DECO) { group.add( new Smoke( i ) ); } } }
public void seed( Level level, int cell, int amount ) { if (cur == null) cur = new int[level.length()]; if (off == null) off = new int[cur.length]; cur[cell] += amount; volume += amount; area.union(cell%level.width(), cell/level.width()); }
public WallBlockingTilemap() { super("wall_blocking.png", new TextureFilm( "wall_blocking.png", SIZE, SIZE ) ); map( new int[Dungeon.level.length()], Dungeon.level.width()); }
public void saySpawned(){ if (Messages.lang() != Languages.ENGLISH) return; //don't say anything if not on english int i = (Dungeon.depth - 1) / 5; fieldOfView = new boolean[Dungeon.level.length()]; Dungeon.level.updateFieldOfView(this, fieldOfView); if (chooseEnemy() == null) yell( Random.element( VOICE_AMBIENT[i] ) ); else yell( Random.element( VOICE_ENEMIES[i][ Dungeon.bossLevel() ? 1 : 0 ] ) ); Sample.INSTANCE.play( Assets.SND_GHOST ); }
public void saySpawned(){ if (Messages.lang() != Languages.ENGLISH) return; //don't say anything if not on english int i = (Dungeon.depth - 1) / 5; fieldOfView = new boolean[Dungeon.level.length()]; Dungeon.level.updateFieldOfView(this, fieldOfView); if (chooseEnemy() == null) yell( Random.element( VOICE_AMBIENT[i] ) ); else yell( Random.element( VOICE_ENEMIES[i][ Dungeon.bossLevel() ? 1 : 0 ] ) ); Sample.INSTANCE.play( Assets.SND_GHOST ); }