diff options
Diffstat (limited to 'src/rules/npcs.rs')
-rw-r--r-- | src/rules/npcs.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/rules/npcs.rs b/src/rules/npcs.rs index 206151c..4ee687f 100644 --- a/src/rules/npcs.rs +++ b/src/rules/npcs.rs @@ -42,6 +42,7 @@ impl Npc { // Roll 3d6 down the line. let mut roll_result = roll_formula("3d6").unwrap(); let class_ref = self.class.unwrap(); + let race_ref = self.race.unwrap(); // For ability scores which are prime requisites of the class, // increase all dice by 1 which do not already show a 6. @@ -59,6 +60,13 @@ impl Npc { .copied() .unwrap_or(0) as u32; + // Add racial ability score modifiers. + total += race_ref + .npc_ability_score_modifiers + .get(&ability) + .copied() + .unwrap_or(0) as u32; + ability_score_rolls.insert(ability, total); } @@ -70,7 +78,6 @@ impl Npc { self.ability_scores = Some(score_collection); - // TODO: Modify results for race. // TODO: Apply racial minimums and maximums. // TODO: Verify legality of class based on alignment. // TODO: Verify legality of class based on race. |