Added generic encounter class (doesn't really do anything yet).

This commit is contained in:
Mark Wolfman
2021-10-04 17:08:19 -05:00
parent 8be31abd25
commit be7268a0b3
3 changed files with 12 additions and 0 deletions
+6
View File
@@ -1,5 +1,7 @@
from collections import namedtuple
from dungeonsheets.content import Content
XPThreshold = namedtuple("XPThreshold", ("easy", "medium", "hard", "deadly"))
@@ -40,3 +42,7 @@ def xp_thresholds(party):
deadly=sum(th.deadly for th in thresholds),
)
return final_thresholds
class Encounter(Content):
pass
+1
View File
@@ -2,6 +2,7 @@
game mechanics."""
from dungeonsheets.content import Content, Creature
from dungeonsheets.encounter import Encounter
from dungeonsheets.spells import Spell
from dungeonsheets.features import Feature
from dungeonsheets.infusions import Infusion
+5
View File
@@ -15,3 +15,8 @@ class TestStats(TestCase):
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))
class TestEncounter(TestCase):
def test_encounter_init(self):
enc = encounter.Encounter()