Esempio n. 1
0
 def test_default_human_creation(self):
     creature = Factory().create_creature(creature_class="human", first_name="John", second_name="Doe")
     stats = creature.stats()
     expected_values = (10, 10, 10, 10, 0, 0, 0, 0, False)
     actual_values = (
         stats.constitution(), stats.physicality_base(), stats.dexterity_base(), stats.social(), stats.experience(),
         stats.magic_base(), stats.gold_worth(), stats.experience_worth(), stats.magic_enabled()
     )
     self.assertTupleEqual(expected_values, actual_values)
Esempio n. 2
0
 def test_create_creature_with_stat_values(self):
     stat_values = {
         "constitution": 1, "physicality": 2, "dexterity": 3, "social": 4, "experience": 5, "magic_base": 6,
         "gold_worth": 7, "experience_worth": 8, "magic_enabled": True
     }
     creature = Factory().create_creature(
         creature_class="goblin", first_name="John", second_name="Doe", stat_values=stat_values
     )
     stats = creature.stats()
     expected_values = (1, 2, 3, 4, 5, 6, 7, 8, True)
     actual_values = (
         stats.constitution(), stats.physicality_base(), stats.dexterity_base(), stats.social(), stats.experience(),
         stats.magic_base(), stats.gold_worth(), stats.experience_worth(), stats.magic_enabled()
     )
     self.assertTupleEqual(expected_values, actual_values)