diff options
author | David Gay <eapoems@riseup.net> | 2023-10-16 16:30:23 -0400 |
---|---|---|
committer | David Gay <eapoems@riseup.net> | 2023-10-16 16:30:23 -0400 |
commit | f2c4ff69213c3e98bc0e679b4acce2a0d0019876 (patch) | |
tree | 584c12a4141950d55413ce3895c097d4cc141781 /src/main.rs | |
parent | 84837a689e71d0e695fa016f1e667bbeb16b515b (diff) |
NPC personalities
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 14 |
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(), ); }; } |