2023-05-04 14:06:31 +02:00
|
|
|
import pygame
|
|
|
|
from config import *
|
|
|
|
|
|
|
|
class Archer_ork(pygame.sprite.Sprite):
|
|
|
|
|
|
|
|
|
|
|
|
def __init__(self, game, x, y):
|
|
|
|
self.game = game
|
|
|
|
self.groups = self.game.all_sprites, self.game.archer_orks
|
|
|
|
pygame.sprite.Sprite.__init__(self, self.groups)
|
|
|
|
|
|
|
|
self.x = x * TILE_SIZE
|
|
|
|
self.y = y * TILE_SIZE
|
|
|
|
self.width = TILE_SIZE
|
|
|
|
self.height = TILE_SIZE
|
|
|
|
|
2023-06-14 12:31:39 +02:00
|
|
|
self.image_path = "./zdjecia/ORK_ARCHER/ork_lucznik.png"
|
2023-06-13 15:50:03 +02:00
|
|
|
self.ARCHER_ORK_IMG = pygame.image.load(self.image_path)
|
2023-05-04 14:06:31 +02:00
|
|
|
self.ARCHER_ORK = pygame.transform.scale(self.ARCHER_ORK_IMG,(64,64))
|
|
|
|
|
|
|
|
self.image = pygame.Surface([self.width, self.height])
|
|
|
|
self.image.blit(self.ARCHER_ORK, (0,0))
|
|
|
|
self.image.set_colorkey((0, 0, 0))
|
|
|
|
|
|
|
|
self.rect = self.image.get_rect()
|
|
|
|
self.rect.x = self.x
|
|
|
|
self.rect.y = self.y
|
|
|
|
|
|
|
|
self.level = 1
|
|
|
|
self.damage = 50*self.level
|
2023-06-13 15:50:03 +02:00
|
|
|
self.health = 50
|
2023-05-04 14:06:31 +02:00
|
|
|
|
|
|
|
class Infantry_ork(pygame.sprite.Sprite):
|
|
|
|
|
|
|
|
|
|
|
|
def __init__(self, game, x, y):
|
|
|
|
self.game = game
|
|
|
|
self.groups = self.game.all_sprites, self.game.infantry_orks
|
|
|
|
pygame.sprite.Sprite.__init__(self, self.groups)
|
|
|
|
|
|
|
|
self.x = x * TILE_SIZE
|
|
|
|
self.y = y * TILE_SIZE
|
|
|
|
self.width = TILE_SIZE
|
|
|
|
self.height = TILE_SIZE
|
|
|
|
|
2023-06-14 12:31:39 +02:00
|
|
|
self.image_path = "./zdjecia/ORK_MELEE/ork-piechota.png"
|
2023-06-13 15:50:03 +02:00
|
|
|
self.INFANTRY_ORK_IMG = pygame.image.load(self.image_path)
|
2023-05-04 14:06:31 +02:00
|
|
|
self.INFANTRY_ORK = pygame.transform.scale(self.INFANTRY_ORK_IMG,(64,64))
|
|
|
|
|
|
|
|
self.image = pygame.Surface([self.width, self.height])
|
|
|
|
self.image.blit(self.INFANTRY_ORK, (0,0))
|
|
|
|
self.image.set_colorkey((0, 0, 0))
|
|
|
|
|
|
|
|
self.rect = self.image.get_rect()
|
|
|
|
self.rect.x = self.x
|
|
|
|
self.rect.y = self.y
|
|
|
|
|
|
|
|
self.level = 2
|
|
|
|
self.damage = 50*self.level
|
2023-06-13 15:50:03 +02:00
|
|
|
self.health = 100
|
2023-05-27 17:05:45 +02:00
|
|
|
|
2023-05-04 14:06:31 +02:00
|
|
|
|
|
|
|
class Sauron(pygame.sprite.Sprite):
|
|
|
|
|
|
|
|
|
|
|
|
def __init__(self, game, x, y):
|
|
|
|
self.game = game
|
|
|
|
self.groups = self.game.all_sprites, self.game.sauronL
|
|
|
|
pygame.sprite.Sprite.__init__(self, self.groups)
|
|
|
|
|
|
|
|
self.x = x * TILE_SIZE
|
|
|
|
self.y = y * TILE_SIZE
|
|
|
|
self.width = TILE_SIZE
|
|
|
|
self.height = TILE_SIZE
|
|
|
|
|
2023-06-14 12:31:39 +02:00
|
|
|
self.image_path = "./zdjecia/SAURON/sauron.png"
|
2023-06-13 15:50:03 +02:00
|
|
|
self.SAURON_IMG = pygame.image.load(self.image_path)
|
2023-05-04 14:06:31 +02:00
|
|
|
self.SAURON = pygame.transform.scale(self.SAURON_IMG,(64,64))
|
|
|
|
|
|
|
|
self.image = pygame.Surface([self.width, self.height])
|
|
|
|
self.image.blit(self.SAURON, (0,0))
|
|
|
|
self.image.set_colorkey((0, 0, 0))
|
|
|
|
|
|
|
|
self.rect = self.image.get_rect()
|
|
|
|
self.rect.x = self.x
|
|
|
|
self.rect.y = self.y
|
|
|
|
|
2023-06-13 15:50:03 +02:00
|
|
|
self.level = 3
|
2023-05-04 14:06:31 +02:00
|
|
|
self.damage = 50*self.level
|
2023-06-13 15:50:03 +02:00
|
|
|
self.health = 150
|