def __init__(self, element=None, comp=None, scient=None, hexparams=get_hex_params(35)): if scient != None: Scient.__init__(self, scient.element, scient.comp, scient.name, scient.weapon, scient.weapon_bonus, scient.location) else: if element == None: element = rand_element() if comp == None: comp = rand_comp(suit=element, kind='Scient') Scient.__init__(self, comp=comp, element=element) pygame.sprite.Sprite.__init__(self) self.hexparams = hexparams r,s,hexh,rech,size = self.hexparams self.size = size self.image = pygame.Surface(size) self.image.fill(COLORS[self.element]) self.image.fill(black) if self.weapon.type == 'Sword': x = r/2 y = hexh self.rect = pygame.draw.polygon(self.image, COLORS[self.element], [(x, y), (x+s, y), (x+s, y+s), (x, y+s)]) #square elif self.weapon.type == 'Bow': self.rect = pygame.draw.circle(self.image, COLORS[self.element], ((size[0]/2) + 1, (size[1]/2) + 1), size[0]/2 - hexh/2) # cirlcle elif self.weapon.type == 'Wand': self.rect = pygame.draw.polygon(self.image, COLORS[self.element], [(r+1,3), (2*r - 1 , rech-2*hexh), (r+1, rech-3), (2, rech - 2*hexh)]) elif self.weapon.type == 'Glove': self.rect = pygame.draw.polygon(self.image, COLORS[self.element], [(r,2), (2*r-2, rech-hexh-1), (2, rech - hexh-1)]) # triangle self.image.set_colorkey(black) self.text = []