mirror of
https://github.com/Threnklyn/dungeon-sheets.git
synced 2026-05-18 20:23:27 +02:00
Merge pull request #71 from 94d90b08-c4ef-416c-bf7b-b6c5b7275e6a/master
hp_max basic auto-calculation, boolean inspiration
This commit is contained in:
Regular → Executable
+10
-1
@@ -21,7 +21,11 @@ class TestCharacter(TestCase):
|
||||
char.level = 2
|
||||
char.hit_dice_faces = 10
|
||||
self.assertEqual(char.hit_dice, '2d10')
|
||||
|
||||
|
||||
def test_max_hp(self):
|
||||
char = Wizard(level=3, constitution=12)
|
||||
self.assertEqual(char.hp_max, 17)
|
||||
|
||||
def test_set_attrs(self):
|
||||
char = Character()
|
||||
char.set_attrs(name='Inara')
|
||||
@@ -37,6 +41,11 @@ class TestCharacter(TestCase):
|
||||
# Check that race gets set to an object
|
||||
char.set_attrs(race='high elf')
|
||||
self.assertIsInstance(char.race, race.HighElf)
|
||||
# Check inspiration works
|
||||
char.set_attrs(inspiration=True)
|
||||
self.assertTrue(char.inspiration)
|
||||
char.set_attrs(inspiration=False)
|
||||
self.assertFalse(char.inspiration)
|
||||
|
||||
def test_wield_weapon(self):
|
||||
char = Character()
|
||||
|
||||
Reference in New Issue
Block a user