WMICraft/models/knight.py
2022-04-11 17:51:46 +02:00

18 lines
530 B
Python

import pygame.image
import random
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()
self.health = random.randint(7, 12)
self.attack = random.randint(4, 7)
self.defense = random.randint(1, 4)
self.points = 1