dodanie życia agenta + damage mobów

This commit is contained in:
Weranda 2023-03-31 10:56:43 +02:00
parent c5f00fc058
commit f82c22c14b
5 changed files with 10 additions and 5 deletions

View File

@ -29,6 +29,7 @@ class Agent(pygame.sprite.Sprite):
self.rect.y = self.y
self.level = 1
self.health = 100*self.level
def update(self):
self.movement()
@ -101,4 +102,4 @@ class Agent(pygame.sprite.Sprite):
else:
self.game.sauron.kill()
# brakuje levelowania postaci gdy zabije moba, jest zrobione tylko, że jeśli za wysoki poziom to ginie i od nowa zaczyna
# brakuje levelowania postaci gdy zabije moba, jest zrobione tylko, że jeśli za wysoki poziom to ginie i od nowa zaczyna

View File

@ -25,4 +25,5 @@ class Archer_ork(pygame.sprite.Sprite):
self.rect.x = self.x
self.rect.y = self.y
self.level = 1
self.level = 1
self.damage = 50*self.level

View File

@ -25,4 +25,5 @@ class Infantry_ork(pygame.sprite.Sprite):
self.rect.x = self.x
self.rect.y = self.y
self.level = 2
self.level = 2
self.damage = 50*self.level

View File

@ -25,4 +25,5 @@ class Infantry_ork2(pygame.sprite.Sprite):
self.rect.x = self.x
self.rect.y = self.y
self.level = 3
self.level = 3
self.damage = 50*self.level

View File

@ -25,4 +25,5 @@ class Sauron(pygame.sprite.Sprite):
self.rect.x = self.x
self.rect.y = self.y
self.level = 4
self.level = 4
self.damage = 50*self.level