コード例 #1
0
 def testTakeDamage(self):
     creature = create_creature_fixture()
     self.assertEqual(creature.take_damage(10), 90)
コード例 #2
0
 def testGetIntModifierForHumans(self):
     creature = create_creature_fixture()
     self.assertEqual(creature.get_intelligence_modifier(), -2)
コード例 #3
0
 def testGetChaModifierForHumans(self):
     creature = create_creature_fixture()
     self.assertEqual(creature.get_charisma_modifier(), -4)
コード例 #4
0
 def testGetConModifierForHumans(self):
     creature = create_creature_fixture()
     self.assertEqual(creature.get_constitution_modifier(), 1)
コード例 #5
0
 def testGetWisModifierForHumans(self):
     creature = create_creature_fixture()
     self.assertEqual(creature.get_wisdom_modifier(), 0)
コード例 #6
0
 def testGetStrengthModifierForHumans(self):
     creature = create_creature_fixture()
     self.assertEqual(creature.get_strength_modifier(), 8)
コード例 #7
0
 def testGetDexModifierForHumans(self):
     creature = create_creature_fixture()
     self.assertEqual(creature.get_dexterity_modifier(), 2)
コード例 #8
0
 def testGetInthModifier(self):
     creature = create_creature_fixture()
     self.assertEqual(creature.get_modifier(Ability.INTELLIGENCE), -2)
コード例 #9
0
 def testGetChaModifier(self):
     creature = create_creature_fixture()
     self.assertEqual(creature.get_modifier(Ability.CHARISMA), -4)
コード例 #10
0
 def testGetWisModifier(self):
     creature = create_creature_fixture()
     self.assertEqual(creature.get_modifier(Ability.WISDOM), 0)
コード例 #11
0
 def testGetConhModifier(self):
     creature = create_creature_fixture()
     self.assertEqual(creature.get_modifier(Ability.CONSTITUTION), 1)
コード例 #12
0
 def testGetDexModifier(self):
     creature = create_creature_fixture()
     self.assertEqual(creature.get_modifier(Ability.DEXTERITY), 2)
コード例 #13
0
 def testGetStrengthModifier(self):
     creature = create_creature_fixture()
     self.assertEqual(creature.get_modifier(Ability.STRENGTH), 8)
コード例 #14
0
 def testHeal(self):
     creature = create_creature_fixture()
     self.assertEqual(creature.heal(10), 110)