Added party XP thresholds to GM sheets.

This commit is contained in:
Mark Wolfman
2021-09-30 21:10:34 -05:00
parent 1d67463566
commit 5b8ef004c7
14 changed files with 152 additions and 20 deletions
+17
View File
@@ -0,0 +1,17 @@
from unittest import TestCase
from dungeonsheets import stats, character, encounter
class TestStats(TestCase):
def new_character(self, level=1):
return character.Character(classes=['cleric'], levels=[level])
def test_xp_thresholds(self):
# One level 1 character
xp_th = encounter.xp_thresholds([self.new_character(1)])
self.assertEqual(xp_th, (25, 50, 75, 100))
# Three mixed-level characters
party = [self.new_character(9), self.new_character(8), self.new_character(6)]
xp_th = encounter.xp_thresholds(party)
self.assertEqual(xp_th, (1300, 2600, 3900, 5900))