mirror of
https://github.com/Threnklyn/dungeon-sheets.git
synced 2026-06-03 03:18:28 +02:00
Added party XP thresholds to GM sheets.
This commit is contained in:
@@ -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))
|
||||
Reference in New Issue
Block a user