Exemplo n.º 1
0
    def test_communication_telepathic(self):
        with mock.patch('the_tale.game.heroes.objects.Hero.power', power.Power(0, 1)):
            self.assertTrue(self.hero.communication_telepathic.is_CAN)

        with mock.patch('the_tale.game.heroes.objects.Hero.power', power.Power(1, 0)):
            self.assertTrue(self.hero.communication_telepathic.is_CAN_NOT)

        with mock.patch('the_tale.game.heroes.objects.Hero.power', power.Power(1, 1)):
            self.assertTrue(self.hero.communication_telepathic.is_CAN_NOT)
Exemplo n.º 2
0
def dress_new_hero(hero):
    for equipment_slot in relations.EQUIPMENT_SLOT.records:
        if equipment_slot.default:
            hero.equipment.equip(
                equipment_slot,
                artifacts_storage.artifacts.get_by_uuid(
                    equipment_slot.default).create_artifact(level=1,
                                                            power=power.Power(
                                                                1, 1)))