import pygame.image import random class Monster(pygame.sprite.Sprite): images = [] def __init__(self): super().__init__() self.image = pygame.image.load("./resources/textures/dragon2.png") 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() self.health = random.randrange(15, 25) self.attack = random.randrange(2, 10)