def __init__(self, x, y): r = random.random() if r < 0.50: self.enemy = enemies.GiantSpider() self.alive_text = "A giant spider jumps down from " \ "its web in front of you!" self.dead_text = "The corpse of a dead spider " \ "rots on the ground." elif r < 0.80: self.enemy = enemies.Ogre() self.alive_text = "An ogre is blocking your path!" self.dead_text = "A dead ogre reminds you of your triumph." elif r < 0.95: self.enemy = enemies.BatColony() self.alive_text = "You hear a squeaking noise growing louder" \ "...suddenly you are lost in s swarm of bats!" self.dead_text = "Dozens of dead bats are scattered on the ground." else: self.enemy = enemies.RockMonster() self.alive_text = "You've disturbed a rock monster " \ "from his slumber!" self.dead_text = "Defeated, the monster has reverted " \ "into an ordinary rock." super().__init__(x, y)
def __init__(self, x, y): r = random.random() if r < 0.50: self.enemy = enemies.GiantSpider() self.alive_text = "A giant spider jumps down from " \ "its web in front of you!" self.dead_text = "The corpse of the dead spider lies " \ "rotting on the ground." elif r < 0.80: self.enemy = enemies.Ogre() self.alive_text = "An ogre blocks your path!" self.dead_text = "An ogres stinking corpse litters the path." elif r < 0.90: self.enemy = enemies.BatColony() self.alive_text = "A distance squeaking grows louder and louder " \ "until you suddenly find yourself lost in a swarm of bats." self.dead_text = "Dozens of dead bats cover the ground. " \ "You can barely take a step without crushing bat corpses underfoot." elif r < 0.95: self.enemy = enemies.Seth() self.alive_text = "A terrifying Seth monster lumbers out of the shadows." self.dead_text = "Laying on the floor is the corpse of a Seth monster " \ "It's body is covered in Python and C++ code tattoos." else: self.enemy = enemies.RockMonster() self.alive_text = "You've disturbed a rock monster from his slumber!" self.dead_text = "A rock monster's corpse has crumbled into " \ "a mass of small bloody pebbles that cover the floor." super().__init__(x, y)
def __init__(self, x, y): r = random.random() if r < 0.50: self.enemy = enemies.GiantSpider() self.alive_text = 'A giant spider jump down fom ' \ 'its web in front of you!' self.dead_text = 'The corpse of a dead spider ' \ 'rots on the ground.' elif r < 0.80: self.enemy = enemies.Ogre() self.alive_text = 'An ogre is blocking your path!' self.dead_text = 'A dead ogre reminds you of your triumph.' elif r < 0.95: self.enemy = enemies.BatColony() self.alive_text = 'You hear a squeaking noise growing louser ' \ '...suddenly you are lost in a swarm of bats!' self.dead_text = 'Dozens of dead bats are scattered on the ground.' else: self.enemy = enemies.RockMonster() self.alive_text = 'You\'ve disturbed a rock monster ' \ 'from its slumber!' self.dead_text = 'Defeated, the monster has reverted ' \ 'into an ordinary rock.' super().__init__(x, y)
def create_enemy(self): r = random.random() if r < 0.50: return enemies.GiantSpider() elif r < 0.80: return enemies.Ogre() elif r < 0.95: return enemies.BatColony() else: return enemies.RockMonster()
def __init__(self, x, y): r = random.random() if r < 0.50: self.enemy = enemies.GiantSpider(x, y) elif r < 0.80: self.enemy = enemies.Ogre(x, y) elif r < 0.95: self.enemy = enemies.BatColony(x, y) else: self.enemy = enemies.RockMonster(x, y) super(EnemyTile, self).__init__(x, y, self.enemy)
def __init__(self, x, y): r = random.random() if r < 0.50: self.enemy = enemies.KillerTeddy() elif r < 0.75: self.enemy = enemies.Ogre() elif r < 0.90: self.enemy = enemies.BatColony() elif r < 0.97: self.enemy = enemies.GiantSpider() else: self.enemy = enemies.RockMonster() # print("Has Been created: " + self.enemy.name + " in [" + str(x) + "," + str(y) +"]") # print("r: " + str(r)) #print("Has Been created: " + self.enemy.name ) super().__init__(x, y)
def __init__(self, x, y): r = random.random() if r < 0.50: self.enemy = enemies.Guard() self.alive_text = "A brutish prison guard comes out of nowhere!" self.dead_text = "The guard looks better face down on the ground now." elif r < 0.80: self.enemy = enemies.BatColony() self.alive_text = "A swarm of bats streams from the broken vent overhead!" self.dead_text = "That was enough screeching to drive one batty." elif r < 0.95: self.enemy = enemies.Thug() self.alive_text = "A fellow prisoner decides to take out the competition - YOU!" self.dead_text = "The lifeless body of your attacker ceases to move on the ground." else: self.enemy = enemies.RobotEnforcer() self.alive_text = "Holy Snikees! It's a Robot Enforcer...egad!!!" self.dead_text = "Smelly nuts and bolts roll around where the metal monster of mayhem once stood." super(EnemyTile, self).__init__(x, y)
def __init__(self, x, y): r = random.randint(0, 5) if r <= 1: self.enemy = enemies.GiantSpider() self.alive_text = "A giant spider jumps down from\nit's web down in front of you!" self.dead_text = "The corpse of a dead spider\nrots on the ground" elif r <= 2: self.enemy = enemies.Ogre() self.alive_text = "An ogre is blocking your path!" self.dead_text = "A dead ogre reminds you of your triumph." elif r <= 3: self.enemy = enemies.BatColony() self.alive_text = "You hear a squeaking noise growing louder\nsuddenly you are lost in a swarm of bats!" self.dead_text = "Dozens of dead bats are scattered on the ground." else: self.enemy = enemies.RockMonster() self.alive_text = "You've disturbed a rock monster!" self.dead_text = "Defeated, the monster has gone into a deep hibernation and appears to be a normal rock." super().__init__(x, y)
def __init__(self, x, y): r = random.random() if r < 0.50: self.enemy = enemies.GiantSpider() self.alive_text = "A giant spider jumps down from " \ "it's web in front of you!" self.dead_text = "The remains of a dead spider rot on the ground." elif r < 0.80: self.enemy = enemies.Skeleton() self.alive_text = "You hear the clattering of bones." \ "A skeleton steps out of the dark, slowly moving towards you!" self.dead_text = "A pile of bones lies on the ground." elif r < 0.70: self.enemy = enemies.BatColony() self.alive_text = "You hear a squeaking nois growing louder" \ "...suddenly you are lost in a swarm of bats!" self.dead_text = "Dozens of dead bats are scattered on the ground." elif r < 0.98: self.enemy = enemies.Gravedigger() self.alive_text = "An angry looking gravedigger armed with a "\ "shovel blocks your way!" self.dead_text = "A dead gravedigger reminds you of your triumph." super().__init__(x, y)
def __init__(self, x, y): r = random.random() if r < 0.50: self.enemy = enemies.GiantSpider() self.alive_text = """ A giant spider jumps down from its web in front of you! """ self.dead_text = """ The corpse of a dead spider rots on the ground. """ elif r < 0.80: self.enemy = enemies.Ogre() self.alive_text = """ A mighty ogre blocks your path. """ self.dead_text = """ A dead ogre reminds you of your tryumph. """ elif r < 0.95: self.enemy = enemies.BatColony() self.alive_text = """ Seems like you got lost in the middle of a smarm of bats! """ self.dead_text = """ Dozens of dead bats are scattered on the ground. """ else: self.enemy = enemies.RockElemental() self.alive_text = """ A pile of rocks seems to have found its way to me middle of the room. When you get near it, you see it's a Rock Elemental! """ self.dead_text = """ As it was defeated, it became a pile of crumbled rocks. """ super().__init__(x, y)
def __init__(self, x, y): r = random.random() if r < 0.5: self.enemy = enemies.GiantSpider() self.alive_text = "The room is covered in spiderweb." \ "From the ceiling, a Giant Spider Descends!" self.dead_text = "The corpse of the dead spider decays before you." elif r < 0.80: self.enemy = enemies.Ogre() self.alive_text = "An Ogre is blocking the path!" self.dead_text = "A dead Ogre reminds you of your triumph." elif r < 0.95: self.enemy = enemies.BatColony() self.alive_text = "You hear a squeaking noise growing louder" \ "... suddenly you are lost in a swarm of bats!" self.dead_text = "Dozend of dead bats are scattered on the ground" else: self.enemy = enemies.RockMonster() self.alive_text = "You've disturbed a rock monster " \ "from his slumber!" self.dead_text = "Defeated, the monster has reverted " \ "into an ordinary rock." super().__init__(x,y)
def random_spawn(self): if (randint(0, 1) == 0): # 1 in 2 odds. self.enemies = [enemies.BatColony()] else: self.enemies = []
def __init__(self, x, y): super().__init__(x, y) self.enemy = enemies.BatColony() self.alive_text = "Soudainement le ciel s'assombrit. Vous réalisez au bout d'un seconde qu'une colonie de chauves-souris vampires virvoltent autour de vous. À peine avez-vous saisi votre armes qu'une multitude de bestioles ailées foncent sur vous. Vous vous dîtes que Barbe Noire savait qu'elles défendraient son précieux butin pour lui." self.dead_text = "Les cadavres par centaines de chiroptères qui jonchent le sol et aussi les morsures sur tout votre corps vous rappelle l'épuisant combat que vous avez mené contre ces mini-vampire ailés." self.first_time = True # La premiere fois que le joueur arrive ici
self.enemy = enemies.GiantRat() <<<<<<< HEAD self.alive_text = "\nLook at that R.O.U.S whats out it has sharp teeth." ======= self.alive_text = "\nLook at that ROUS whats out it has sharp teeth." >>>>>>> 45bf0b496c1d4f59d90e5c29989043ba435b2ac7 self.dead_text = "\nA body of a dead rat" elif r == 2: self.enemy = enemies.GiantSpider() self.alive_text = "\nA giant spider jumps down from " \ "its web in front of you!" self.dead_text = "\nThe corpse of a dead spider " \ "rots on the ground." elif r == 3: self.enemy = enemies.BatColony() self.alive_text = "\nYou hear a squeaking noise growing louder" \ "...suddenly you are lost in swarm of bats!" self.dead_text = "\nDozens of dead bats are scattered on the ground." else: self.enemy = enemies.RockMonster() self.alive_text = "\nYou've disturbed a rock monster " \ "from his slumber!" self.dead_text = "\nDefeated, the monster has reverted " \ "into an ordinary rock." super().__init__(x, y) class GoblinScoutTile(EnemyTile): def __init__(self,x,y): self.enemy = enemies.GoblinScout()