예제 #1
0
파일: player.py 프로젝트: aruse/Bludgeon
 def __init__(self,
              x,
              y,
              name,
              oid=None,
              ai=None,
              hp=None,
              max_hp=None,
              mp=None,
              max_mp=None,
              death=None,
              fov_radius=cfg.TORCH_RADIUS,
              inventory=None):
     if death is None:
         death = player_death
     Monster.__init__(self,
                      x,
                      y,
                      name,
                      oid=oid,
                      ai=ai,
                      hp=hp,
                      max_hp=max_hp,
                      mp=mp,
                      max_mp=max_mp,
                      death=death,
                      fov_radius=fov_radius,
                      inventory=inventory)
	def __init__(self):

		Hero.__init__(self)
		Monster.__init__(self)


		self.where = "on shoulders"
예제 #3
0
	def __init__(self):
		Monster.__init__(self) # we don't use super here because weird things will happen and overlap with multiple
		#inheritance
		Hero.__init__(self) # instead of super, we must specificy each parent class from which MonsterHero
		#is inheriting

		self.second_weapon = None # staying consistent with weapon variable
예제 #4
0
	def __init__(self):
		# Takes this instance(self) of Monster and adds all init properties from Monster class
		Monster.__init__(self)
		# Takes this instance(self) of Monster and adds all init properties from Monster class
		Hero.__init__(self)
		#MonsterHero to have a second weapon
		self.second_weapon = "second weapon!"
예제 #5
0
파일: player.py 프로젝트: aruse/Bludgeon
 def __init__(self, x, y, name, oid=None, ai=None, hp=None, max_hp=None,
              mp=None, max_mp=None, death=None, fov_radius=cfg.TORCH_RADIUS,
              inventory=None):
     if death is None:
         death = player_death
     Monster.__init__(self, x, y, name, oid=oid, ai=ai, hp=hp,
                      max_hp=max_hp, mp=mp, max_mp=max_mp, death=death,
                      fov_radius=fov_radius, inventory=inventory)
예제 #6
0
파일: kamikaze.py 프로젝트: iPazu/Slimy
 def __init__(self, terrain, initialPos, target, aiWorld, size, name):
     #terrain, initialPos, modelPath, movingSpeed, scale, lifePoint, volumicMass, target, aiWorld, detectionDistance, name, specificUpdate
     Monster.__init__(self, terrain, initialPos,
                      "assets/models/kamikaze.egg", 175, size, 1, 100,
                      target, aiWorld, 1000, name, self.Hpr)
     self.AIbehaviors.pursue(self.target.model)
     self.dx = 0
     self.dy = 0
     self.posx2, self.posy2 = self.pos[0], self.pos[1]
예제 #7
0
   def __init__(self):
      #super is a builtin python function that represents the parent class of
      #this object (parent class = Creature here). This makes a monster inside  
      #the parent class of creature, with all the properties of creature. 

      Monster.__init__(self)
      Hero.__init__(self)
      
      self.weapon2 = None
예제 #8
0
    def __init__(self,x,y):
        Monster.__init__(self,x,y,0,BAT_RADIUS,BAT_MOVE_SPEED)

        self._color = BAT_COLOR
        self._hp    = BAT_HP
        self._timer = BAT_TIMER
        self._base_speed = self._speed
        self._boost = self._speed * BAT_BOOST_SPEED
        self._randangle = choice([1,-1])
예제 #9
0
 def __init__(self, move_time, nodes):
     Monster.__init__(self, move_time, nodes)
     self.image = Surface((20, 20)).convert()
     self.image_inside = Surface((18, 18)).convert()
     self.image_inside.fill((255, 255, 0))
     self.image.blit(self.image_inside, (1, 1))
     self.rect = Rect(self.pos, (40, 40))
     self.speed = 4
     self.diag_speed = 3
     self.value = 0.5
     self.health = 50
     self.name = "Fast Monster"
     self.description = "A small monster with very quick movement speed, but low health."
예제 #10
0
 def __init__(self, move_time, nodes):
     Monster.__init__(self, move_time, nodes)
     self.image = Surface((20, 20)).convert()
     self.image_inside = Surface((18, 18)).convert()
     self.image_inside.fill((255, 255, 0))
     self.image.blit(self.image_inside, (1, 1))
     self.rect = Rect(self.pos, (40, 40))
     self.speed = 4
     self.diag_speed = 3
     self.value = 0.5
     self.health = 50
     self.name = "Fast Monster"
     self.description = "A small monster with very quick movement speed, but low health."
예제 #11
0
    def __init__(self, move_time, nodes):
        Monster.__init__(self, move_time, nodes)
        self.image_inside.fill((142, 163, 12))
        self.image.blit(self.image_inside, (1, 1))
        self.rect = Rect(self.pos, (40, 40))
        self.speed = 1
        self.diag_speed = 3
        self.value = 10
        self.health = 100
        self.armor = 500

        self.name = "Armored Monster"
        self.description = "An armored monster that takes progressively more damage as it is hit"
예제 #12
0
  def __init__(self, move_time, nodes):
    Monster.__init__(self, move_time, nodes)
    self.image_inside.fill((142, 163, 12))
    self.image.blit(self.image_inside, (1, 1))
    self.rect = Rect(self.pos, (40, 40))
    self.speed = 1
    self.diag_speed = 3
    self.value = 10
    self.health = 100
    self.armor = 500

    self.name = "Armored Monster"
    self.description = "An armored monster that takes progressively more damage as it is hit"
예제 #13
0
파일: evilSlime.py 프로젝트: iPazu/Slimy
 def __init__(self, terrain, initialPos, target, aiWorld, size, name):
     #terrain, initialPos, modelPath, movingSpeed, scale, lifePoint, volumicMass, target, aiWorld, detectionDistance, name, specificUpdate
     Monster.__init__(self, terrain, initialPos,
                      "assets/models/evil_slime.egg", 10, size,
                      50 + size // 2, 10, target, aiWorld, 500, name,
                      self.detection)
     #initialise AI stuff related to this object
     targetDistance = distance(self.pos, self.target.pos)
     self.statusD = (targetDistance < self.detectionDistance)
     self.statusS = (self.target.scale < self.scale)
     self.AIbehaviors.pursue(self.target.model, 1)
     self.AIbehaviors.flee(self.target.model, 500, 500)
     self.AIbehaviors.wander(50, 0, 50, 1)
     self.AIbehaviors.pauseAi("pursue")
     self.AIbehaviors.pauseAi("flee")
예제 #14
0
 def __init__(self, x, y, level, game):
     Monster.__init__(self,
                      x=x,
                      y=y,
                      game=game,
                      name="player",
                      disp="@",
                      color="Player",
                      description="A hero of might and courage.",
                      blocks=True,
                      fighter_comp=Fighter(st=14, dx=12, iq=14, ht=14))
     self.fighter_comp.equipped['right hand'] = weapon.Weapon(
         'Longsword', ')', 'player', game, None, 5, 'slashing', self,
         'Longswords')
     self.fighter_comp.add_skill("Longswords", 'ST', 10, 0, 'attack')
     self.fighter_comp.add_skill("Defense", 'DX', 0, 0, 'defense')
예제 #15
0
 def __init__(self,x,y):
     Monster.__init__(self,x,y,0,GHOUL_RADIUS,GHOUL_MOVE_SPEED)
     
     self._color = GHOUL_COLOR
     self._hp    = GHOUL_HP
예제 #16
0
 def __init__(self):
    #passing the memory reference of self and calling monster initiation
    Monster.__init__(self)
    #passing the memory ref of self and calling hero initiation 
    Hero.__init__(self)
예제 #17
0
 def __init__(self, x, y, end, lives, begin=0, IA='random', look=1):
     Monster.__init__(self, x, y, 5, 13, 40, 55, 6, 30, 8, end, lives,
                      begin, 6, IA, look)
     self.name = "goblin"
예제 #18
0
 def __init__(self, x, y, end, lives, begin=0, IA='agressive', look=1):
     Monster.__init__(self, x, y, 10, 25, 80, 75, 10, 200, 10, end, lives,
                      begin, 3, IA, look)
     self.name = "golem"
예제 #19
0
    def __init__(self,x,y):
        Monster.__init__(self,x,y,0,ABOM_RADIUS,ABOM_MOVE_SPEED)

        self._color = ABOM_COLOR
        self._hp = ABOM_HP
예제 #20
0
 def __init__(self, terrain, initialPos, target, aiWorld, size, name):
     #terrain, initialPos, modelPath, movingSpeed, scale, lifePoint, volumicMass, target, aiWorld, detectionDistance, name
     Monster.__init__(self, terrain, initialPos, "assets/models/candy.egg",
                      100, size, 1, 10, target, aiWorld, 100000, name,
                      self.none)
     self.AIbehaviors.flee(self.target.model, 300, 600)
예제 #21
0
 def __init__(self, x, y, end, lives, begin=0, IA='random', look=1):
     Monster.__init__(self, x, y, 7, 12, 45, 45, 4, 10, 3, end, lives,
                      begin, 5, IA, look)
     self.name = "ghost"
예제 #22
0
 def __init__(self, x, y):
     Monster.__init__(self, x, y, 1, 1)
     self.image = pygame.image.load("./images/goblin.png").convert_alpha()
     self.rect = self.image.get_rect()
     self.rect.center = self.x, self.y
예제 #23
0
 def __init__(self, x, y, end, lives, begin=0, IA='random', look=1):
     Monster.__init__(self, x, y, 10, 15, 40, 60, 6, 40, 8, end, lives,
                      begin, 4, IA, look)
     self.name = "human"
예제 #24
0
    def __init__(self,x,y):
        Monster.__init__(self,x,y,0,ZOMBIE_RADIUS,ZOMBIE_MOVE_SPEED)

        self._color = ZOMBIE_COLOR
        self._hp    = ZOMBIE_HP
예제 #25
0
	def __init__(self):
		Monster.__init__(self)
		Hero.__init__(self)

		self.second_weapon = self.weapon	
예제 #26
0
	def __init__(self):
		Monster.__init__(self) 
		Hero.__init__(self)

		#self.weapon = Monster_hero.SECOND_WEAPON