def test_magic_base_min_cap(self): stats = Stats() stats._magic_base = 10 stats._mana = 10 self.assertEqual(10, stats.reduce_magic_base(11)) self.assertEqual(0, stats._magic_base) self.assertEqual(0, stats._mana)
def test_magic_base_reduce(self): stats = Stats() stats._magic_base = 10 stats._mana = 10 self.assertEqual(4, stats.reduce_magic_base(4)) self.assertEqual(6, stats._magic_base) self.assertEqual(6, stats._mana)
def test_mana_min_cap(self): stats = Stats() stats._mana = 5 self.assertEqual(5, stats.reduce_mana(11)) self.assertEqual(0, stats._mana)
def test_mana_max_cap(self): stats = Stats() stats._magic_base = 10 stats._mana = 5 self.assertEqual(5, stats.increase_mana(6)) self.assertEqual(10, stats._mana)
def test_mana_reduce(self): stats = Stats() stats._mana = 5 self.assertEqual(2, stats.reduce_mana(2)) self.assertEqual(3, stats._mana)
def test_mana_increase(self): stats = Stats() stats._magic_base = 10 stats._mana = 5 self.assertEqual(2, stats.increase_mana(2)) self.assertEqual(7, stats._mana)