def test_experience_to_next_level(self): self.assertEqual(self.companion.experience_to_next_level, f.companions_coherence_for_level(1)) self.companion.coherence = 5 self.assertEqual(self.companion.experience_to_next_level, f.companions_coherence_for_level(6))
def test_add_experience__2_levels_changed(self): self.companion.coherence = 5 with self.check_delta(lambda: self.companion.coherence, 2): self.companion.add_experience(self.companion.experience_to_next_level+f.companions_coherence_for_level(7)+2) self.assertEqual(self.companion.experience, 2)
def test_add_experience__2_levels_changed(self): self.companion.coherence = 5 with self.check_delta(lambda: self.companion.coherence, 2): self.companion.add_experience(self.companion.experience_to_next_level+f.companions_coherence_for_level(7)+2) self.assertEqual(self.companion.experience, 2)
def experience_to_next_level(self): return f.companions_coherence_for_level(min(self.coherence + 1, c.COMPANIONS_MAX_COHERENCE))
def experience_to_next_level(self): return f.companions_coherence_for_level( min(self.coherence + 1, c.COMPANIONS_MAX_COHERENCE))
def test_experience_to_next_level(self): self.assertEqual(self.companion.experience_to_next_level, f.companions_coherence_for_level(1)) self.companion.coherence = 5 self.assertEqual(self.companion.experience_to_next_level, f.companions_coherence_for_level(6))