コード例 #1
0
 def test_social_min_cap(self):
     stats = Stats()
     stats._social = 10
     stats._charisma = 5
     self.assertEqual(10, stats.reduce_social(11))
     self.assertEqual(0, stats._social)
     self.assertEqual(0, stats._charisma)
コード例 #2
0
 def test_social_reduce(self):
     stats = Stats()
     stats._social = 10
     stats._charisma = 10
     self.assertEqual(4, stats.reduce_social(4))
     self.assertEqual(6, stats._social)
     self.assertEqual(6, stats._charisma)
コード例 #3
0
 def test_charisma_increase(self):
     stats = Stats()
     stats._social = 10
     stats._charisma = 5
     self.assertEqual(2, stats.increase_charisma(2))
     self.assertEqual(7, stats._charisma)
コード例 #4
0
 def test_charisma_max_cap(self):
     stats = Stats()
     stats._social = 10
     stats._charisma = 5
     self.assertEqual(5, stats.increase_charisma(6))
     self.assertEqual(10, stats._charisma)
コード例 #5
0
 def test_charisma_reduce(self):
     stats = Stats()
     stats._social = 10
     stats._charisma = 5
     self.assertEqual(2, stats.reduce_charisma(2))
     self.assertEqual(3, stats._charisma)