def test_blood_apply(self): self.assertEqual(self.hero.pvp.effectiveness, 0) ability = Blood(hero=self.hero, enemy=self.enemy) ability.apply() self.assertEqual(self.hero.pvp.effectiveness, 0) self.hero.pvp.set_energy(1) ability.apply() self.assertTrue(self.hero.pvp.effectiveness > 0)
def test_blood_apply(self): self.meta_action_battle.hero_1_pvp.set_effectiveness(0) ability = Blood(hero=self.hero, enemy=self.enemy) ability.apply() self.assertEqual(self.meta_action_battle.hero_1_pvp.effectiveness, 0) self.meta_action_battle.hero_1_pvp.set_energy(1) ability.apply() self.assertTrue(self.meta_action_battle.hero_1_pvp.effectiveness > 0)
def turn_ui_info(self): return { 'advantage': self.turn_advantage, 'effectiveness': int(self.turn_effectiveness), 'probabilities': { 'ice': Ice.get_probability(self.turn_energy, self.turn_energy_speed), 'blood': Blood.get_probability(self.turn_energy, self.turn_energy_speed), 'flame': Flame.get_probability(self.turn_energy, self.turn_energy_speed) }, 'energy': self.turn_energy, 'energy_speed': self.turn_energy_speed }
def test_blood_apply__with_might(self): self.hero.pvp.set_energy(1000) self.assertEqual(self.hero.pvp.effectiveness, 0) ability = Blood(hero=self.hero, enemy=self.enemy) ability.apply() clean_effectiveness = self.hero.pvp.effectiveness self.hero.pvp.set_energy(1000) self.hero.might = 10000 self.hero.pvp.set_effectiveness(0) ability = Blood(hero=self.hero, enemy=self.enemy) ability.apply() self.assertTrue(clean_effectiveness < self.hero.pvp.effectiveness)