Example #1
0
    def run(self):
        self.vida.setValue(self.health)
        while self.health > 0:
            proximity = self.parent.juego.checkproximity(self)
            if len(proximity) != 0:
                for item in proximity:
                    if item.equipo != self.name and checkdistance(self, item) <= 40:
                        QTest.qWait(1000)
                        self.attack(item)

        self.image.hide()
        self.vida.hide()
        self.parent.juego.items.remove(self)
Example #2
0
 def atacar(self, item):
     if checkdistance(self, item) < 60:
         item.health -= self.dano
Example #3
0
 def atacar(self, item):
     if checkdistance(self, item) < self.distancia:
         item.health -= self.dano - item.resistencia