mirror of
https://github.com/Threnklyn/dungeon-sheets.git
synced 2026-05-19 04:33:26 +02:00
Added generic encounter class (doesn't really do anything yet).
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user