summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs
index 6070e06..1470811 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,5 +1,6 @@
use dmn::dice;
use dmn::random_tables::RandomTables;
+use dmn::rules::ability_scores::AbilityScore;
use dmn::rules::classes::CLASSES;
use dmn::rules::npcs::Npc;
@@ -24,17 +25,25 @@ fn main() {
eprintln!("Class '{}' not found.", &*class_name);
std::process::exit(1);
});
- let npc = Npc::new(
+ let mut npc = Npc::new(
Some(random_tables.roll_table("npc_alignment")),
Some(random_tables.roll_table("henchman_race")),
Some(class_ref),
None,
);
+ npc.roll_henchman_ability_scores();
+ let ability_scores = npc.ability_scores.unwrap();
println!(
- "{} {} {}",
+ "{} {} {}. STR: {}, INT: {}, WIS: {}, CON: {}, DEX: {}, CHA: {}",
npc.alignment.unwrap(),
npc.race.unwrap(),
- npc.class.unwrap().name
+ npc.class.unwrap().name,
+ ability_scores.get_score(AbilityScore::Strength).unwrap(),
+ ability_scores.get_score(AbilityScore::Intelligence).unwrap(),
+ ability_scores.get_score(AbilityScore::Wisdom).unwrap(),
+ ability_scores.get_score(AbilityScore::Constitution).unwrap(),
+ ability_scores.get_score(AbilityScore::Dexterity).unwrap(),
+ ability_scores.get_score(AbilityScore::Charisma).unwrap()
);
}
("magic", _) => {