2022-03-10 18:34:58 +01:00
|
|
|
import pygame.image
|
2022-03-24 12:54:22 +01:00
|
|
|
import random
|
2022-03-10 18:34:58 +01:00
|
|
|
|
|
|
|
|
|
|
|
class Monster(pygame.sprite.Sprite):
|
2022-03-24 12:54:22 +01:00
|
|
|
images = []
|
2022-03-10 18:34:58 +01:00
|
|
|
|
2022-03-24 12:54:22 +01:00
|
|
|
def __init__(self):
|
2022-03-10 18:34:58 +01:00
|
|
|
super().__init__()
|
2022-03-24 12:54:22 +01:00
|
|
|
|
2022-03-24 13:09:43 +01:00
|
|
|
self.image = pygame.image.load("./resources/textures/dragon2.png")
|
2022-03-10 18:34:58 +01:00
|
|
|
self.image = pygame.transform.scale(self.image, (40, 40))
|
|
|
|
self.images.append(self.image)
|
|
|
|
self.rect = self.image.get_rect()
|
|
|
|
monster_list = pygame.sprite.Group()
|
2022-03-24 12:54:22 +01:00
|
|
|
self.health = random.randrange(15, 25)
|
|
|
|
self.attack = random.randrange(2, 10)
|