Esempio n. 1
0
 def test_handle_entity_death_trigger_reborn(self):
     friendly = create_entity(deathrattle=False, reborn=True)
     combat = SimulatedCombat(([friendly], []))
     # combat.handle_entity_death(friendly)
     combat.damage([combat.controllers[0][0]], friendly, friendly.health)
     combat.clean_up_dead_minions()
     self.assertEqual(len(combat.controllers[0]), 1)
     self.assertEqual(combat.controllers[0][0].reborn, False)
Esempio n. 2
0
 def test_clean_up_dead_minions(self):
     combat = SimulatedCombat(([
         create_entity(health=0),
         create_entity(health=-1),
         create_entity(health=1)
     ], [create_entity(health=0),
         create_entity(health=-1)]))
     combat.clean_up_dead_minions()
     self.assertEqual(len(combat.controllers[0]), 1)
     self.assertEqual(len(combat.controllers[1]), 0)