def __init__(self, matrix, x, y): Avatar.__init__(self, matrix, x, y) if not self.bot_image: image = engine.Surface((50,50), engine.SRCALPHA) color1 = (100,80,120) color2 = (200,80,100) color3 = (200,50,50) points = [(p[0]*2,p[1]*2) for p in [(12,0),(16,10),(24,13),(16,18),(12,24),(8,18),(0,13),(8,10)]] engine.draw.polygon(image, color1, points, 0) points = [(p[0]*2,p[1]*2) for p in [(16,11),(23,13),(16,17)]] engine.draw.polygon(image, color2, points, 0) points = [(p[0]*2,p[1]*2) for p in [(8,11),(1,13),(8,17)]] engine.draw.polygon(image, color2, points, 0) points = [(p[0]*2,p[1]*2) for p in [(12,8),(15,11),(15,17),(12,20),(9,17),(9,11)]] engine.draw.polygon(image, color3, points, 0) image = engine.transform.flip(image, True, True) self.images['normal'] = image self.mask = engine.mask.from_surface(self.images['normal']) self.bot_image = image self.image = self.images['normal'] self.rect = self.image.get_rect(center=(int(self.x),int(self.y))) self.targets = [self.matrix.avatars] self.field = {'u':50,'d':350,'l':50,'r':450} self.pulse_aim = 'd' self.nemesis = self.matrix.avatar self.identity = 'Bot' self.motion['d'] = True self.moving = True self.behaviours = {'roam':self.auto_move, 'node_attack':self.node_damage, 'target':self.target, 'evade':self.evade} self.behaviours_types = list(self.behaviours.keys()) self.behaviours_special = {'move_reverse':self.move_reverse, 'move_forward':self.move_forward, 'inactive':self.offline, 'stalk':self.stalk} self.behaviour = self.behaviours['roam'] self.behaviour_type = 'roam'
def __init__(self, matrix, x, y): Avatar.__init__(self, matrix, x, y) if not self.bot_image: image = engine.Surface((50, 50), engine.SRCALPHA) color1 = (100, 80, 120) color2 = (200, 80, 100) color3 = (200, 50, 50) points = [ (p[0] * 2, p[1] * 2) for p in [(12, 0), (16, 10), (24, 13), (16, 18), (12, 24), (8, 18), (0, 13), (8, 10)] ] engine.draw.polygon(image, color1, points, 0) points = [(p[0] * 2, p[1] * 2) for p in [(16, 11), (23, 13), (16, 17)]] engine.draw.polygon(image, color2, points, 0) points = [(p[0] * 2, p[1] * 2) for p in [(8, 11), (1, 13), (8, 17)]] engine.draw.polygon(image, color2, points, 0) points = [ (p[0] * 2, p[1] * 2) for p in [(12, 8), (15, 11), (15, 17), (12, 20), (9, 17), (9, 11)] ] engine.draw.polygon(image, color3, points, 0) image = engine.transform.flip(image, True, True) self.images['normal'] = image self.mask = engine.mask.from_surface(self.images['normal']) self.bot_image = image self.image = self.images['normal'] self.rect = self.image.get_rect(center=(int(self.x), int(self.y))) self.targets = [self.matrix.avatars] self.field = {'u': 50, 'd': 350, 'l': 50, 'r': 450} self.pulse_aim = 'd' self.nemesis = self.matrix.avatar self.identity = 'Bot' self.motion['d'] = True self.moving = True self.behaviours = { 'roam': self.auto_move, 'node_attack': self.node_damage, 'target': self.target, 'evade': self.evade } self.behaviours_types = list(self.behaviours.keys()) self.behaviours_special = { 'move_reverse': self.move_reverse, 'move_forward': self.move_forward, 'inactive': self.offline, 'stalk': self.stalk } self.behaviour = self.behaviours['roam'] self.behaviour_type = 'roam'
def __init__(self, pos, velocity, angle, target): """ Target is a reference to the target - so it is tracked. """ Avatar.__init__(self, pos) self.velocity = Add2DVector([0, 0], velocity) self.rotation = angle self.target = target self.mass = 0.1 for thruster in self.thrusters: thruster.strength = 0.25 thruster.fraction = 0.0 self.thruster_rear_forward.fraction = 0.2 self.points = [[0, -25], [10, 25], [-10, 25]] self.radius = 3 self.counter = 0
def __init__(self): Avatar.__init__(self) molde = raza.getDemiurgo() self.init2(molde)
def __init__(self): Avatar.__init__(self) molde = raza.getVampiro() self.init2(molde)
def __init__(self): #super(Nigromante,self).__init__() Avatar.__init__(self) molde = raza.getNigromante() self.init2(molde)
def __init__(self): Avatar.__init__(self) molde = raza.getCazador() self.init2(molde)
def __init__(self): Avatar.__init__(self) molde = raza.getHombreLobo() self.init2(molde)
def __init__(self): Avatar.__init__(self) molde = raza.getHechizero() self.init2(molde)