From 22465e9005b2e651443a1b9cc728fb3ca26ad41b Mon Sep 17 00:00:00 2001 From: David Gay Date: Sun, 15 Oct 2023 00:33:38 -0400 Subject: Draft some code of breaking up the NPC ability score generation --- src/rules/npcs.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/rules') diff --git a/src/rules/npcs.rs b/src/rules/npcs.rs index dc3d751..22907cd 100644 --- a/src/rules/npcs.rs +++ b/src/rules/npcs.rs @@ -75,6 +75,18 @@ impl Npc { // TODO: Verify legality of class based on race. // TODO: Verify legality of class based on ability scores. } + + // TODO: Probably break this out later like this. + // fn increase_prime_requisites(&mut self, roll_result: &mut RollResult) { + // let class_ref = self.class.unwrap(); + // + // // For ability scores which are prime requisites of the class, + // // increase all dice by 1 which do not already show a 6. + // if class_ref.prime_requisites.contains(&ability) { + // roll_result.increase_sides_below_max(6, 1); + // } + // roll_result.increase_sides_below_max(6, 1); + // } } // impl fmt::Display for Npc { @@ -95,8 +107,8 @@ impl Npc { #[cfg(test)] mod tests { - use crate::rules::classes::CLASSES; use super::*; + use crate::rules::classes::CLASSES; #[test] #[ignore] -- cgit v1.2.3