2022-03-11 19:42:17 +01:00
|
|
|
import pygame.image
|
2022-03-24 12:54:22 +01:00
|
|
|
import random
|
2022-03-11 19:42:17 +01:00
|
|
|
|
|
|
|
class Knight(pygame.sprite.Sprite):
|
|
|
|
def __init__(self, img):
|
|
|
|
super().__init__()
|
|
|
|
self.images = []
|
|
|
|
self.image = pygame.image.load("./resources/textures/knight.png")
|
|
|
|
self.image = pygame.transform.scale(self.image, (40, 40))
|
|
|
|
self.images.append(self.image)
|
|
|
|
self.rect = self.image.get_rect()
|
2022-03-24 21:45:17 +01:00
|
|
|
|
|
|
|
self.health = random.randint(7, 12)
|
|
|
|
self.attack = random.randint(4, 7)
|
|
|
|
self.defense = random.randint(1,4)
|
|
|
|
self.points = 1
|
2022-03-11 19:42:17 +01:00
|
|
|
|