summaryrefslogtreecommitdiff
path: root/src/rules
diff options
context:
space:
mode:
authorDavid Gay <eapoems@riseup.net>2023-10-15 00:33:38 -0400
committerDavid Gay <eapoems@riseup.net>2023-10-15 00:33:38 -0400
commit22465e9005b2e651443a1b9cc728fb3ca26ad41b (patch)
tree99ef02c96ceb674bda2a20d98d8f7fdb48617f3e /src/rules
parentaa7a297ddff8761b9d20077fe176bc1ed4deaffa (diff)
Draft some code of breaking up the NPC ability score generation
Diffstat (limited to 'src/rules')
-rw-r--r--src/rules/npcs.rs14
1 files changed, 13 insertions, 1 deletions
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]