combat system overhaul - d20/hack-like
This commit is contained in:
parent
32044dbb6a
commit
c169a1eae6
20 changed files with 762 additions and 292 deletions
|
|
@ -69,7 +69,7 @@ pub const GOBLINS_4X4: PrefabVault =
|
|||
PrefabVault { template: GOBLINS_4X4_V, width: 4, height: 4, first_id: 0, last_id: 100, can_flip: Flipping::Both };
|
||||
const GOBLINS_4X4_V: &str = "
|
||||
#^
|
||||
#G#
|
||||
#$#
|
||||
#g#
|
||||
^g^
|
||||
";
|
||||
|
|
@ -78,13 +78,13 @@ pub const GOBLINS2_4X4: PrefabVault =
|
|||
PrefabVault { template: GOBLINS2_4X4_V, width: 4, height: 4, first_id: 0, last_id: 100, can_flip: Flipping::Both };
|
||||
const GOBLINS2_4X4_V: &str = "
|
||||
#^#g
|
||||
G# #
|
||||
$# #
|
||||
g#
|
||||
# g^
|
||||
";
|
||||
|
||||
pub const GOBLINS_5X5: PrefabVault =
|
||||
PrefabVault { template: GOBLINS_5X5_V, width: 5, height: 5, first_id: 0, last_id: 100, can_flip: Flipping::Both };
|
||||
PrefabVault { template: GOBLINS_5X5_V, width: 5, height: 5, first_id: 3, last_id: 100, can_flip: Flipping::Both };
|
||||
const GOBLINS_5X5_V: &str = "
|
||||
^#g
|
||||
G#?#^
|
||||
|
|
@ -94,7 +94,7 @@ G#?#^
|
|||
";
|
||||
|
||||
pub const GOBLINS_6X6: PrefabVault =
|
||||
PrefabVault { template: GOBLINS_6X6_V, width: 6, height: 6, first_id: 0, last_id: 100, can_flip: Flipping::Both };
|
||||
PrefabVault { template: GOBLINS_6X6_V, width: 6, height: 6, first_id: 5, last_id: 100, can_flip: Flipping::Both };
|
||||
const GOBLINS_6X6_V: &str = "
|
||||
#
|
||||
#^#g
|
||||
|
|
@ -157,7 +157,7 @@ const HOUSE_TRAP_7X7_V: &str = "
|
|||
";
|
||||
|
||||
pub const ORC_HOUSE_8X8: PrefabVault =
|
||||
PrefabVault { template: ORC_HOUSE_8X8_V, width: 8, height: 8, first_id: 0, last_id: 100, can_flip: Flipping::Both };
|
||||
PrefabVault { template: ORC_HOUSE_8X8_V, width: 8, height: 8, first_id: 2, last_id: 100, can_flip: Flipping::Both };
|
||||
const ORC_HOUSE_8X8_V: &str = "
|
||||
|
||||
######
|
||||
|
|
|
|||
|
|
@ -233,14 +233,8 @@ impl TownBuilder {
|
|||
build_data: &mut BuilderMap,
|
||||
rng: &mut rltk::RandomNumberGenerator,
|
||||
) {
|
||||
for y in building.1..building.1 + building.3 {
|
||||
for x in building.0..building.0 + building.2 {
|
||||
let idx = build_data.map.xy_idx(x, y);
|
||||
if build_data.map.tiles[idx] == TileType::WoodFloor && idx != 0 && rng.roll_dice(1, 3) == 1 {
|
||||
build_data.spawn_list.push((idx, "rat".to_string()));
|
||||
}
|
||||
}
|
||||
}
|
||||
let mut to_place: Vec<&str> = vec!["rat", "rat", "rat"];
|
||||
self.random_building_spawn(building, build_data, rng, &mut to_place, 0);
|
||||
}
|
||||
|
||||
fn grass_layer(&mut self, build_data: &mut BuilderMap) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue