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_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_magic_base_increase(self): stats = Stats() stats._magic_base = 10 self.assertEqual(6, stats.increase_magic_base(6)) self.assertEqual(16, stats._magic_base)
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)