summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs
index 20e4bcf..95f92b7 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -39,8 +39,12 @@ fn main() {
Some(race_ref),
Some(class_ref),
None,
+ None,
);
+
npc.roll_henchman_ability_scores();
+ npc.randomize_personality();
+
let ability_scores = npc.ability_scores.unwrap();
let output_csv = henchman_matches.get_flag("csv");
@@ -49,7 +53,7 @@ fn main() {
// string literal at compile time.
if output_csv {
println!(
- "{},{},{},{},{},{},{},{},{}",
+ "{},{},{},{},{},{},{},{},{},\"{}\"",
npc.alignment
.unwrap()
.split_whitespace()
@@ -66,11 +70,12 @@ fn main() {
.get_score(AbilityScore::Constitution)
.unwrap(),
ability_scores.get_score(AbilityScore::Dexterity).unwrap(),
- ability_scores.get_score(AbilityScore::Charisma).unwrap()
+ ability_scores.get_score(AbilityScore::Charisma).unwrap(),
+ npc.personality.unwrap(),
);
} else {
println!(
- "{} {} {}. STR {}, INT {}, WIS {}, CON {}, DEX {}, CHA {}",
+ "{} {} {}. STR {}, INT {}, WIS {}, CON {}, DEX {}, CHA {}. {}",
npc.alignment.unwrap(),
npc.race.unwrap().name,
npc.class.unwrap().name,
@@ -83,7 +88,8 @@ fn main() {
.get_score(AbilityScore::Constitution)
.unwrap(),
ability_scores.get_score(AbilityScore::Dexterity).unwrap(),
- ability_scores.get_score(AbilityScore::Charisma).unwrap()
+ ability_scores.get_score(AbilityScore::Charisma).unwrap(),
+ npc.personality.unwrap(),
);
};
}