1
0
Fork 0

Add the Dark elf city

This commit is contained in:
Timothy Warren 2022-02-04 09:41:46 -05:00
parent b6e05b157a
commit 5731b346cd
2 changed files with 20 additions and 0 deletions

View File

@ -6,6 +6,7 @@ mod bsp_interior;
mod cellular_automata;
mod common;
mod cull_unreachable;
mod dark_elves;
mod distant_exit;
mod dla;
mod door_placement;
@ -42,6 +43,7 @@ use bsp_dungeon::BspDungeonBuilder;
use bsp_interior::BspInteriorBuilder;
use cellular_automata::CellularAutomataBuilder;
use cull_unreachable::CullUnreachable;
use dark_elves::*;
use distant_exit::DistantExit;
use dla::DLABuilder;
use door_placement::DoorPlacement;
@ -354,6 +356,7 @@ pub fn level_builder(new_depth: i32, width: i32, height: i32) -> BuilderChain {
7 => mushroom_entrance(new_depth, width, height),
8 => mushroom_builder(new_depth, width, height),
9 => mushroom_exit(new_depth, width, height),
10 => dark_elf_city(new_depth, width, height),
_ => random_builder(new_depth, width, height),
}
}

View File

@ -0,0 +1,17 @@
use super::{
AreaEndingPosition, AreaStartingPosition, BspInteriorBuilder, BuilderChain, CullUnreachable,
VoronoiSpawning, XEnd, XStart, YEnd, YStart,
};
pub fn dark_elf_city(new_depth: i32, width: i32, height: i32) -> BuilderChain {
let mut chain = BuilderChain::new(new_depth, width, height, "Dark Elven City");
chain
.start_with(BspInteriorBuilder::new())
.with(AreaStartingPosition::new(XStart::Center, YStart::Center))
.with(CullUnreachable::new())
.with(AreaStartingPosition::new(XStart::Right, YStart::Center))
.with(AreaEndingPosition::new(XEnd::Left, YEnd::Center))
.with(VoronoiSpawning::new());
chain
}