def __init__(self, x, y): self.player = player r = random.random() if r < 0.25: self.enemy = enemies.Bat() self.alive_text = "A bat swoops in on you out of nowhere." self.dead_text = "The body of a bat lies still on the ground" elif r < 0.50: self.enemy = enemies.Rat() self.alive_text = "A rat screeches and lunges at you." self.dead_text = "The dead body of a rat lies here." elif r < 0.75: self.enemy = enemies.Slime() self.alive_text = "A slime rolls towards you leaving an oozing trail." self.dead_text = "A slime lies dead here in a puddle of goo." else: self.enemy = enemies.Goblin() self.alive_text = "a goblin swinging a small branch scurries towards you." self.dead_text = "The bloody corpse of a goblin lies still." super().__init__(x, y)
def __init__(self, x, y): r = random.random() if r < 0.50: self.enemy = enemies.Goblin() self.alive_text = self.enemy.alive_text self.dead_text = self.enemy.dead_text elif r < 0.70: self.enemy = enemies.Orge() self.alive_text = self.enemy.alive_text self.dead_text = self.enemy.dead_text elif r < 0.85: self.enemy = enemies.GiantSpider() self.alive_text = self.enemy.alive_text self.dead_text = self.enemy.dead_text elif r < 0.95: self.enemy = enemies.Werewolf() self.alive_text = self.enemy.alive_text self.dead_text = self.enemy.dead_text else: self.enemy = enemies.RockGolem() self.alive_text = self.enemy.alive_text self.dead_text = self.enemy.dead_text super().__init__(x, y)
def __init__(self, x, y): super().__init__(x, y, enemies.Goblin())
def __init__(self, x, y): super().__init__(x, y, enemies.Goblin(), items.Dagger())