def probe(self, character, difficulty):
     """
     Character try to use a skill.
     """
     attribute = getattr(character, self.attribute)
     dice_roll = d20()
     total_result = attribute() + dice_roll
     return total_result >= difficulty
示例#2
0
 def probe(self, character, difficulty):
     """
     Character try to use a skill.
     """
     attribute = getattr(character, self.attribute)
     dice_roll = d20()
     total_result = attribute() + dice_roll
     return total_result >= difficulty
示例#3
0
 def test_d20(self):
     for _ in range(0, 100):
         r = d20()
         self.assertTrue(r <= 20)
         self.assertTrue(r >= 1)
 def test_d20(self):
     for _ in range(0, 100):
         r = d20()
         self.assertTrue(r <= 20)
         self.assertTrue(r >= 1)