Koar
Never
import random import time import sys from os import system, name ### Clear Terminal ### def clear(): if name == 'nt': _ = system('cls') else: _ = system('clear') ### Fancy Scrolling Text ### def flush(area_choose): for character in area_choose: sys.stdout.write(character) sys.stdout.flush() time.sleep(.03) ### Player ### class Player: def __init__(self): self.currentLocation = "1a" self.name = '' self.char = 'Warrior' self.lvl = 1 self.hp = 120 self.atk = 35 userPlayer = Player() ### Player Inventory ### ### SCRAPPED ENTIRELY ### class inventory: def __init__(self): self.items = ['Longsword','Health Potion'] self.invamount = len(self.items) self.openslots = str(30 - self.invamount) inv = inventory() ### Chances ### class roll_dice: def __init__(self): self.playercrit = random.randint(1,100) self.playerhitchance = random.randint(1,100) self.mobcrit = random.randint(1,100) self.mobhitchance = random.randint(1,100) self.restore = random.randint(60,80) ### Mobs ### class mob_orc: def __init__(self): self.mob_name = 'Orc' self.lvl = userPlayer.lvl + 2 self.hp = 75 self.atk = userPlayer.atk - 15 self.xp_given = 30 orcMob = mob_orc() class mob_wolf: def __init__(self): self.mob_name = 'Wolf' self.lvl = userPlayer.lvl + 1 self.hp = 50 self.atk = userPlayer.atk - 20 self.xp_given = 20 wolfMob = mob_wolf() class mob_ogre: def __init__(self): self.mob_name = 'Ogre' self.lvl = userPlayer.lvl + 4 self.hp = 100 self.atk = userPlayer.atk - 5 self.xp_given = 70 ogreMob = mob_ogre() ### Player Attacks def playerAttackWolf(): ### PLAYER ATTACK ### while True: roll = roll_dice() roll.playercrit roll.playerhitchance if roll.playercrit <= 10 and roll.playerhitchance >= 6: wolfMob.hp = wolfMob.hp - userPlayer.atk * 2 print("You crit for",userPlayer.atk*2,"damage!") time.sleep(.08) break elif roll.playercrit >= 11 and roll.playerhitchance >= 6: wolfMob.hp = wolfMob.hp - userPlayer.atk print("You hit for",userPlayer.atk,"damge!") time.sleep(.08) break elif roll.playercrit >= 11 and roll.playerhitchance <= 5: print("You missed!") time.sleep(.08) break elif roll.playercrit <= 10 and roll.playerhitchance <= 5: print("You missed!") time.sleep(.08) break def playerAttackOrc(): ### PLAYER ATTACK ### while True: roll = roll_dice() roll.playercrit roll.playerhitchance if roll.playercrit <= 10 and roll.playerhitchance >= 6: orcMob.hp = orcMob.hp - userPlayer.atk * 2 print("You crit for",userPlayer.atk*2,"damage!") time.sleep(.08) break elif roll.playercrit >= 11 and roll.playerhitchance >= 6: orcMob.hp = orcMob.hp - userPlayer.atk print("You hit for",userPlayer.atk,"damage!") time.sleep(.08) break elif roll.playercrit >= 11 and roll.playerhitchance <= 5: print("You missed!") time.sleep(.08) break elif roll.playercrit <= 10 and roll.playerhitchance <= 5: print("You missed!") time.sleep(.08) break def playerAttackOgre(): ### PLAYER ATTACK ### while True: roll = roll_dice() roll.playercrit roll.playerhitchance if roll.playercrit <= 10 and roll.playerhitchance >= 6: ogreMob.hp = ogreMob.hp - userPlayer.atk * 2 print("You crit for",userPlayer.atk,"damage!") time.sleep(.08) break elif roll.playercrit >= 11 and roll.playerhitchance >= 6: ogreMob.hp = ogreMob.hp - userPlayer.atk print("You hit for",userPlayer.atk,"damage!") time.sleep(.08) break elif roll.playercrit >= 11 and roll.playerhitchance <= 5: print("You missed!") time.sleep(.08) break elif roll.playercrit <= 10 and roll.playerhitchance <= 5: print("You missed!") time.sleep(.08) break ### Mob Attacks ### def orcAttack(): ### ORC ATTACK ### while True: roll = roll_dice() roll.mobcrit roll.mobhitchance if roll.mobcrit <= 5 and roll.mobhitchance >= 21: print("Orc crit for",orcMob.atk*2,"damage!") time.sleep(1.2) userPlayer.hp = userPlayer.hp - orcMob.atk * 2 break elif roll.mobcrit >= 6 and roll.mobhitchance >= 21: userPlayer.hp = userPlayer.hp - orcMob.atk print("Orc hit for",orcMob.atk,"damage!") time.sleep(1.2) break elif roll.mobcrit <= 6 and roll.mobhitchance <= 20: print("Orc missed!") time.sleep(1.2) break elif roll.mobcrit >= 5 and roll.mobhitchance <= 20: print("Orc missed!") time.sleep(1.2) break def wolfAttack(): ### WOLF ATTACK ### while True: roll = roll_dice() roll.mobcrit roll.mobhitchance if roll.mobcrit <= 5 and roll.mobhitchance >= 26: print("Wolf crit for",wolfMob.atk*2,"damage!") time.sleep(1.2) userPlayer.hp = userPlayer.hp - wolfMob.atk * 2 break elif roll.mobcrit >= 6 and roll.mobhitchance >= 26: userPlayer.hp = userPlayer.hp - wolfMob.atk print("Wolf hit for",wolfMob.atk,"damage!") time.sleep(1.2) break elif roll.mobcrit <= 6 and roll.mobhitchance <= 25: print("Wolf missed!") time.sleep(1.2) break elif roll.mobcrit >= 5 and roll.mobhitchance <= 25: print("Wolf missed!") time.sleep(1.2) break def ogreAttack(): ### OGRE ATTACK ### while True: roll = roll_dice() roll.mobcrit roll.mobhitchance if roll.mobcrit <= 5 and roll.mobhitchance >= 11: print("Ogre crit for",ogreMob.atk*2,"damage!") time.sleep(1.2) userPlayer.hp = userPlayer.hp - ogreMob.atk * 2 break elif roll.mobcrit >= 6 and roll.mobhitchance >= 11: userPlayer.hp = userPlayer.hp - ogreMob.atk print("Ogre hit for",ogreMob.atk,"damage!") time.sleep(1.2) break elif roll.mobcrit <= 6 and roll.mobhitchance <= 10: print("Ogre missed!") time.sleep(1.2) break elif roll.mobcrit >= 5 and roll.mobhitchance <= 10: print("Ogre missed!") time.sleep(1.2) break ### Battles ### def wolf_battle(): ### Wolf Battle ### while True: clear() time.sleep(.01) if userPlayer.hp >= 100: if wolfMob.hp >= 1 and userPlayer.hp >= 1: print(" Wolf ",userPlayer.name) print("╔═══════════════════════╗ ╔═══════════════════════╗") print("║ HP:",wolfMob.hp," ║ ║ ","HP:",userPlayer.hp," ║") print("╚═══════════════════════╝ ╚═══════════════════════╝") print(" ╔══════════╗") print(" ║A = Attack║") print(" ╚══════════╝") elif wolfMob.hp <= 0 and userPlayer.hp >= 1: print(" Wolf ",userPlayer.name) print("╔═══════════════════════╗ ╔═══════════════════════╗") print("║ HP: 0 ║ ║ ","HP:",userPlayer.hp," ║") print("╚═══════════════════════╝ ╚═══════════════════════╝") if userPlayer.hp <= 40 and userPlayer.hp >= 1: print("I see your health is low, would you like to use a health potion? [y/n]") while True: roll = roll_dice() use_health = input(">>> ") use_health = use_health.lower() use_health = use_health.strip() use_health = use_health.replace(" ","") if (use_health in ["y","yes"]): restorehp = roll.restore print("You restored",str(restorehp),"health!") time.sleep(1) userPlayer.hp += restorehp break elif (use_health in ["n","no"]): break else: print("Please enter a valid input!") continue if (use_health in ["y","yes"]): continue else: print("") if wolfMob.hp >= 1 and userPlayer.hp >= 1: usemove = input(">>> ") usemove = usemove.lower() usemove = usemove.strip() usemove = usemove.replace(" ","") if usemove == "a" and wolfMob.hp >= 1: ### Player Attack ### playerAttackWolf() if wolfMob.hp <= 0 and userPlayer.hp >= 1: time.sleep(1) continue ### Wolf Attack ### wolfAttack() if userPlayer.hp <= 40 and userPlayer.hp >= 1: continue elif wolfMob.hp <= 0 and userPlayer.hp >= 1: print("You win!") break elif wolfMob.hp >= 1 and userPlayer.hp <= 0: print("You Died!") exit() elif userPlayer.hp <= 99: if wolfMob.hp >= 1 and userPlayer.hp >= 1: print(" Wolf ",userPlayer.name) print("╔═══════════════════════╗ ╔═══════════════════════╗") print("║ HP:",wolfMob.hp," ║ ║ ","HP:",userPlayer.hp," ║") print("╚═══════════════════════╝ ╚═══════════════════════╝") print(" ╔══════════╗") print(" ║A = Attack║") print(" ╚══════════╝") elif wolfMob.hp <= 0 and userPlayer.hp >= 1: print(" Wolf ",userPlayer.name) print("╔═══════════════════════╗ ╔═══════════════════════╗") print("║ HP: 0 ║ ║ ","HP:",userPlayer.hp," ║") print("╚═══════════════════════╝ ╚═══════════════════════╝") elif wolfMob.hp >= 1 and userPlayer.hp <= 0: print(" Wolf ",userPlayer.name) print("╔═══════════════════════╗ ╔═══════════════════════╗") print("║ HP:",wolfMob.hp," ║ ║ ","HP: 0 ║") print("╚═══════════════════════╝ ╚═══════════════════════╝") if userPlayer.hp <= 40 and userPlayer.hp >= 1: print("I see your health is low, would you like to use a health potion? [y/n]") while True: roll = roll_dice() use_health = input(">>> ") use_health = use_health.lower() use_health = use_health.strip() use_health = use_health.replace(" ","") if (use_health in ["y","yes"]): restorehp = roll.restore print("You restored",str(restorehp),"health!") time.sleep(1) userPlayer.hp += restorehp break elif (use_health in ["n","no"]): break else: print("Please enter a valid input!") continue if (use_health in ["y","yes"]): continue else: print("") if wolfMob.hp >= 1 and userPlayer.hp >= 1: usemove = input(">>> ") usemove = usemove.lower() usemove = usemove.strip() usemove = usemove.replace(" ","") if usemove == "a" and wolfMob.hp >= 1: ### Player Attack ### playerAttackWolf() if wolfMob.hp <= 0 and userPlayer.hp >= 1: time.sleep(1) continue ### Wolf Attack ### wolfAttack() if userPlayer.hp <= 40 and userPlayer.hp >= 1: continue elif wolfMob.hp <= 0 and userPlayer.hp >= 1: print("You win!") break elif wolfMob.hp >= 1 and userPlayer.hp <= 0: print("You Died!") exit() elif userPlayer.hp < 100: if wolfMob.hp >= 1 and userPlayer.hp <= 0: print(" Wolf ",userPlayer.name) print("╔═══════════════════════╗ ╔═══════════════════════╗") print("║ HP:",wolfMob.hp," ║ ║ HP:0 ║") print("╚═══════════════════════╝ ╚═══════════════════════╝") print(" ╔══════════╗") print(" ║A = Attack║") print(" ╚══════════╝") break elif wolfMob.hp <= 0 and userPlayer.hp <= 0: print(" Wolf ",userPlayer.name) print("╔═══════════════════════╗ ╔═══════════════════════╗") print("║ HP: 0 ║ ║ HP:0 ║") print("╚═══════════════════════╝ ╚═══════════════════════╝") print(" ╔══════════╗") print(" ║A = Attack║") print(" ╚══════════╝") def orc_battle(): ### Orc Battle ### while True: clear() time.sleep(.01) if userPlayer.hp >= 100: if orcMob.hp <= 9 and orcMob.hp >= 1: print(" Orc ",userPlayer.name) print("╔═══════════════════════╗ ╔═══════════════════════╗") print("║ HP:",orcMob.hp," ║ ║ ","HP:",userPlayer.hp," ║") print("╚═══════════════════════╝ ╚═══════════════════════╝") print(" ╔══════════╗") print(" ║A = Attack║") print(" ╚══════════╝") elif orcMob.hp >= 1 and userPlayer.hp >= 1: print(" Orc ",userPlayer.name) print("╔═══════════════════════╗ ╔═══════════════════════╗") print("║ HP:",orcMob.hp," ║ ║ ","HP:",userPlayer.hp," ║") print("╚═══════════════════════╝ ╚═══════════════════════╝") print(" ╔══════════╗") print(" ║A = Attack║") print(" ╚══════════╝") elif orcMob.hp <= 0 and userPlayer.hp >= 1: print(" Orc ",userPlayer.name) print("╔═══════════════════════╗ ╔═══════════════════════╗") print("║ HP: 0 ║ ║ ","HP:",userPlayer.hp," ║") print("╚═══════════════════════╝ ╚═══════════════════════╝") if userPlayer.hp <= 40 and userPlayer.hp >= 1: print("I see your health is low, would you like to use a health potion? [y/n]") while True: roll = roll_dice() use_health = input(">>> ") use_health = use_health.lower() use_health = use_health.strip() use_health = use_health.replace(" ","") if (use_health in ["y","yes"]): restorehp = roll.restore print("You restored",str(restorehp),"health!") time.sleep(1) userPlayer.hp += restorehp break elif (use_health in ["n","no"]): break else: print("Please enter a valid input!") continue if (use_health in ["y","yes"]): continue else: print("") if orcMob.hp >= 1 and userPlayer.hp >= 1: usemove = input(">>> ") usemove = usemove.lower() usemove = usemove.strip() usemove = usemove.replace(" ","") if usemove == "a" and orcMob.hp >= 1: ### Player Attack ### playerAttackOrc() if orcMob.hp <= 0 and userPlayer.hp >= 1: time.sleep(1) continue ### Orc Attack ### orcAttack() if userPlayer.hp <= 40 and userPlayer.hp >= 1: continue if userPlayer.hp <= 0 and orcMob.hp >= 1: continue elif orcMob.hp <= 0 and userPlayer.hp >= 1: print("You win!") break elif orcMob.hp >= 1 and userPlayer.hp <= 0: print("You Died!") exit() elif userPlayer.hp <= 99: if orcMob.hp <= 9 and orcMob.hp >= 1: print(" Orc ",userPlayer.name) print("╔═══════════════════════╗ ╔═══════════════════════╗") print("║ HP:",orcMob.hp," ║ ║ ","HP:",userPlayer.hp," ║") print("╚═══════════════════════╝ ╚═══════════════════════╝") print(" ╔══════════╗") print(" ║A = Attack║") print(" ╚══════════╝") elif orcMob.hp >= 1 and userPlayer.hp >= 1: print(" Orc ",userPlayer.name) print("╔═══════════════════════╗ ╔═══════════════════════╗") print("║ HP:",orcMob.hp," ║ ║ ","HP:",userPlayer.hp," ║") print("╚═══════════════════════╝ ╚═══════════════════════╝") print(" ╔══════════╗") print(" ║A = Attack║") print(" ╚══════════╝") elif orcMob.hp <= 0 and userPlayer.hp >= 1: print(" Orc ",userPlayer.name) print("╔═══════════════════════╗ ╔═══════════════════════╗") print("║ HP: 0 ║ ║ ","HP:",userPlayer.hp," ║") print("╚═══════════════════════╝ ╚═══════════════════════╝") elif orcMob.hp >= 1 and userPlayer.hp <= 0: print(" Orc ",userPlayer.name) print("╔═══════════════════════╗ ╔═══════════════════════╗") print("║ HP:",orcMob.hp," ║ ║ ","HP: 0 ║") print("╚═══════════════════════╝ ╚═══════════════════════╝") if userPlayer.hp <= 40 and userPlayer.hp >= 1: print("I see your health is low, would you like to use a health potion? [y/n]") while True: roll = roll_dice() use_health = input(">>> ") use_health = use_health.lower() use_health = use_health.strip() use_health = use_health.replace(" ","") if (use_health in ["y","yes"]): restorehp = roll.restore print("You restored",str(restorehp),"health!") time.sleep(1) userPlayer.hp += restorehp break elif (use_health in ["n","no"]): break else: print("Please enter a valid input!") continue if (use_health in ["y","yes"]): continue else: print("") if orcMob.hp >= 1 and userPlayer.hp >= 1: usemove = input(">>> ") usemove = usemove.lower() usemove = usemove.strip() usemove = usemove.replace(" ","") if usemove == "a" and orcMob.hp >= 1: ### Player Attack ### playerAttackOrc() if orcMob.hp <= 0 and userPlayer.hp >= 1: time.sleep(1) continue ### Orc Attack ### orcAttack() if userPlayer.hp <= 40 and userPlayer.hp >= 1: continue elif orcMob.hp <= 0 and userPlayer.hp >= 1: print("You win!","green") break elif orcMob.hp >= 1 and userPlayer.hp <= 0: print("You Died!") exit() elif userPlayer.hp < 100: if orcMob.hp >= 1 and userPlayer.hp <= 0: print(" Orc ",userPlayer.name) print("╔═══════════════════════╗ ╔═══════════════════════╗") print("║ HP:",orcMob.hp," ║ ║ HP:0 ║") print("╚═══════════════════════╝ ╚═══════════════════════╝") print(" ╔══════════╗") print(" ║A = Attack║") print(" ╚══════════╝") break elif orcMob.hp <= 0 and userPlayer.hp <= 0: print(" Orc ",userPlayer.name) print("╔═══════════════════════╗ ╔═══════════════════════╗") print("║ HP: 0 ║ ║ HP:0 ║") print("╚═══════════════════════╝ ╚═══════════════════════╝") print(" ╔══════════╗") print(" ║A = Attack║") print(" ╚══════════╝") def ogre_battle(): ### Ogre Battle ### while True: clear() time.sleep(.01) if userPlayer.hp >= 100: if ogreMob.hp >= 1 and userPlayer.hp >= 1: if ogreMob.hp <= 99 and ogreMob.hp >= 1: print(" Ogre ",userPlayer.name) print("╔═══════════════════════╗ ╔═══════════════════════╗") print("║ HP:",ogreMob.hp," ║ ║ ","HP:",userPlayer.hp," ║") print("╚═══════════════════════╝ ╚═══════════════════════╝") print(" ╔══════════╗") print(" ║A = Attack║") print(" ╚══════════╝") elif ogreMob.hp >= 100 and userPlayer.hp >= 100: print(" Ogre ",userPlayer.name) print("╔═══════════════════════╗ ╔═══════════════════════╗") print("║ HP:",ogreMob.hp," ║ ║ ","HP:",userPlayer.hp," ║") print("╚═══════════════════════╝ ╚═══════════════════════╝") print(" ╔══════════╗") print(" ║A = Attack║") print(" ╚══════════╝") elif ogreMob.hp <= 0 and userPlayer.hp >= 1: print(" Ogre ",userPlayer.name) print("╔═══════════════════════╗ ╔═══════════════════════╗") print("║ HP: 0 ║ ║ ","HP:",userPlayer.hp," ║") print("╚═══════════════════════╝ ╚═══════════════════════╝") if userPlayer.hp <= 40 and userPlayer.hp >= 1: print("I see your health is low, would you like to use a health potion? [y/n]") while True: roll = roll_dice() use_health = input(">>> ") use_health = use_health.lower() use_health = use_health.strip() use_health = use_health.replace(" ","") if (use_health in ["y","yes"]): restorehp = roll.restore print("You restored",str(restorehp),"health!") time.sleep(1) userPlayer.hp += restorehp break elif (use_health in ["n","no"]): break else: print("Please enter a valid input!") continue if (use_health in ["y","yes"]): continue else: print("") if ogreMob.hp >= 1 and userPlayer.hp >= 1: usemove = input(">>> ") usemove = usemove.lower() usemove = usemove.strip() usemove = usemove.replace(" ","") if usemove == "a" and ogreMob.hp >= 1: ### Player Attack ### playerAttackOgre() if ogreMob.hp <= 0 and userPlayer.hp >= 1: time.sleep(1) continue ### Ogre Attack ### ogreAttack() if userPlayer.hp <= 40 and userPlayer.hp >= 1: continue if userPlayer.hp <= 0 and ogreMob.hp >= 1: continue elif ogreMob.hp <= 1 and userPlayer.hp >= 1: print("You win!") break elif ogreMob.hp >= 1 and userPlayer.hp <= 0: print("You Died!") exit() elif userPlayer.hp <= 99: if ogreMob.hp <= 0 and orcMob.hp >= 1: print(" Ogre ",userPlayer.name) print("╔═══════════════════════╗ ╔═══════════════════════╗") print("║ HP: 0 ║ ║ ","HP:",userPlayer.hp," ║") print("╚═══════════════════════╝ ╚═══════════════════════╝") print(" ╔══════════╗") print(" ║A = Attack║") print(" ╚══════════╝") elif ogreMob.hp >= 100 and userPlayer.hp <= 99: print(" Ogre ",userPlayer.name) print("╔═══════════════════════╗ ╔═══════════════════════╗") print("║ HP:",ogreMob.hp," ║ ║ ","HP:",userPlayer.hp," ║") print("╚═══════════════════════╝ ╚═══════════════════════╝") print(" ╔══════════╗") print(" ║A = Attack║") print(" ╚══════════╝") elif ogreMob.hp >= 1 and userPlayer.hp >= 1: print(" Ogre ",userPlayer.name) print("╔═══════════════════════╗ ╔═══════════════════════╗") print("║ HP:",ogreMob.hp," ║ ║ ","HP:",userPlayer.hp," ║") print("╚═══════════════════════╝ ╚═══════════════════════╝") print(" ╔══════════╗") print(" ║A = Attack║") print(" ╚══════════╝") elif ogreMob.hp >= 1 and userPlayer.hp <= 0: print(" Ogre ",userPlayer.name) print("╔═══════════════════════╗ ╔═══════════════════════╗") print("║ HP:",ogreMob.hp," ║ ║ ","HP: 0 ║") print("╚═══════════════════════╝ ╚═══════════════════════╝") if userPlayer.hp <= 40 and userPlayer.hp >= 1: print("I see your health is low, would you like to use a health potion? [y/n]") while True: roll = roll_dice() use_health = input(">>> ") use_health = use_health.lower() use_health = use_health.strip() use_health = use_health.replace(" ","") if (use_health in ["y","yes"]): restorehp = roll.restore print("You restored",str(restorehp),"health!") time.sleep(1) userPlayer.hp += restorehp break elif (use_health in ["n","no"]): break else: print("Please enter a valid input!") continue if (use_health in ["y","yes"]): continue else: print("") if ogreMob.hp >= 1 and userPlayer.hp >= 1: usemove = input(">>> ") usemove = usemove.lower() usemove = usemove.strip() usemove = usemove.replace(" ","") if usemove == "a" and ogreMob.hp >= 1: ### Player Attack ### playerAttackOgre() if ogreMob.hp <= 0 and userPlayer.hp >= 1: time.sleep(1) continue ### Ogre Attack ### ogreAttack() if userPlayer.hp <= 40 and userPlayer.hp >= 1: continue elif ogreMob.hp <= 1 and userPlayer.hp >= 1: print("You win!") break elif ogreMob.hp >= 1 and userPlayer.hp <= 0: print("You Died!") exit() elif userPlayer.hp < 100: if ogreMob.hp >= 1 and userPlayer.hp <= 0: print(" Ogre ",userPlayer.name) print("╔═══════════════════════╗ ╔═══════════════════════╗") print("║ HP:",ogreMob.hp," ║ ║ HP:0 ║") print("╚═══════════════════════╝ ╚═══════════════════════╝") print(" ╔══════════╗") print(" ║A = Attack║") print(" ╚══════════╝") break elif ogreMob.hp <= 0 and userPlayer.hp <= 0: print(" Ogre ",userPlayer.name) print("╔═══════════════════════╗ ╔═══════════════════════╗") print("║ HP: 0 ║ ║ HP:0 ║") print("╚═══════════════════════╝ ╚═══════════════════════╝") print(" ╔══════════╗") print(" ║A = Attack║") print(" ╚══════════╝") ### Map Locations ### def game_map_1a(): print(" a b c ") print(" -------------") print("1 | • | | |") print(" -------------") print("2 | | | |") print(" -------------") print("3 | | | |") print(" -------------") def game_map_1b(): print(" a b c ") print(" -------------") print("1 | | • | |") print(" -------------") print("2 | | | |") print(" -------------") print("3 | | | |") print(" -------------") def game_map_1c(): print(" a b c ") print(" -------------") print("1 | | | • |") print(" -------------") print("2 | | | |") print(" -------------") print("3 | | | |") print(" -------------") def game_map_2a(): print(" a b c ") print(" -------------") print("1 | | | |") print(" -------------") print("2 | • | | |") print(" -------------") print("3 | | | |") print(" -------------") def game_map_2b(): print(" a b c ") print(" -------------") print("1 | | | |") print(" -------------") print("2 | | • | |") print(" -------------") print("3 | | | |") print(" -------------") def game_map_2c(): print(" a b c ") print(" -------------") print("1 | | | |") print(" -------------") print("2 | | | • |") print(" -------------") print("3 | | | |") print(" -------------") def game_map_3a(): print(" a b c ") print(" -------------") print("1 | | | |") print(" -------------") print("2 | | | |") print(" -------------") print("3 | • | | |") print(" -------------") def game_map_3b(): print(" a b c ") print(" -------------") print("1 | | | |") print(" -------------") print("2 | | | |") print(" -------------") print("3 | | • | |") print(" -------------") def game_map_3c(): print(" a b c ") print(" -------------") print("1 | | | |") print(" -------------") print("2 | | | |") print(" -------------") print("3 | | | • |") print(" -------------") ### Zones ### discoveredZones = ["1a"] class zone_1a: def __init__(self): self.discovered = "True" self.totalmobs = 3 self.mobskilled = 0 self.mobsleft = self.totalmobs - self.mobskilled zone_1a = zone_1a() class zone_1b: def __init__(self): self.discovered = "False" self.totalmobs = 5 self.mobskilled = 0 self.mobsleft = self.totalmobs - self.mobskilled zone_1b = zone_1b() class zone_1c: def __init__(self): self.discovered = "False" self.totalmobs = 7 self.mobskilled = 0 self.mobsleft = self.totalmobs - self.mobskilled zone_1c = zone_1c() class zone_2a: def __init__(self): self.discovered = "True" self.totalmobs = 10 self.mobskilled = 0 self.mobsleft = self.totalmobs - self.mobskilled zone_2a = zone_2a() class zone_2b: def __init__(self): self.discovered = "False" self.totalmobs = 13 self.mobskilled = 0 self.mobsleft = self.totalmobs - self.mobskilled zone_2b = zone_2b() class zone_2c: def __init__(self): self.discovered = "False" self.totalmobs = 15 self.mobskilled = 0 self.mobsleft = self.totalmobs - self.mobskilled zone_2c = zone_2c() class zone_3a: def __init__(self): self.discovered = "False" self.totalmobs = 20 self.mobskilled = 0 self.mobsleft = self.totalmobs - self.mobskilled zone_3a = zone_3a() class zone_3b: def __init__(self): self.discovered = "False" self.totalmobs = 23 self.mobskilled = 0 self.mobsleft = self.totalmobs - self.mobskilled zone_3b = zone_3b() class zone_3c: def __init__(self): self.discovered = "False" self.totalmobs = 25 self.mobskilled = 0 self.mobsleft = self.totalmobs - self.mobskilled zone_3c = zone_3c() ### Areas ### class area_one: def __init__(self): self.locationFound = "True" areaOne = area_one() class area_two: def __init__(self): self.locationFound = "True" areaTwo = area_two() class area_three: def __init__(self): self.locationFound = "False" areaThree = area_three() ### Choose Zone/Area ### def area_zone_choose(): while True: print("Current Location:",userPlayer.currentLocation) print("Discovered Zones:",', '.join(discoveredZones)) area_choose = "\nWhich area do you want to go to? [1/2/3]\n" flush(area_choose) area_in = input(">>> ") area_in = area_in.lower() area_in = area_in.strip() area_in = area_in.replace(" ","") ### AREA 1 ### if area_in == "1" and areaOne.locationFound == "True": clear() time.sleep(.01) print("Discovered Zones:",', '.join(discoveredZones)) zone_choose = "\nWhich zone do you want to go to? [a/b/c]\n" flush(zone_choose) zone_in = input(">>> ") zone_in = zone_in.lower() zone_in = zone_in.strip() zone_in = zone_in.replace(" ","") ### ZONE 1A ### if zone_in == "a" and zone_1a.discovered == "True": userPlayer.currentLocation = "1a" clear() time.sleep(.01) zoneOneA() break elif zone_in == "a" and zone_1a.discovered != "True": print("You have not discovered this zone yet.") continue ### ZONE 1B ### elif zone_in == "b" and zone_1b.discovered == "True": userPlayer.currentLocation = "1b" clear() time.sleep(.01) zoneOneB() break elif zone_in == "b" and zone_1b.discovered != "True": print("You have not discovered this zone yet.") continue ### ZONE 1C ### elif zone_in == "c" and zone_1c.discovered == "True": userPlayer.currentLocation = "1c" clear() time.sleep(.01) zoneOneC() break elif zone_in == "c" and zone_1c.discovered != "True": print("You have not discovered this zone yet.") continue elif area_in == "1" and areaOne.locationFound != "True": print("You have not discovered this area yet.") continue ### AREA 2 ### elif area_in == "2" and areaTwo.locationFound == "True": clear() time.sleep(.01) print("Discovered Zones:",', '.join(discoveredZones)) zone_choose = "Which zone do you want to go to? [a/b/c]\n" flush(zone_choose) zone_in = input(">>> ") ### ZONE 2A ### if zone_in == "a" and zone_2a.discovered == "True": userPlayer.currentLocation = "2a" clear() time.sleep(.01) zoneTwoA() break elif zone_in == "a" and zone_2a.discovered != "True": print("You have not discovered this zone yet.") continue ### ZONE 2B ### elif zone_in == "b" and zone_2b.discovered == "True": userPlayer.currentLocation = "2b" clear() time.sleep(.01) zoneTwoB() break elif zone_in == "b" and zone_2b.discovered != "True": print("You have not discovered this zone yet.") continue ### ZONE 2C ### elif zone_in == "c" and zone_2c.discovered == "True": userPlayer.currentLocation = "2c" clear() time.sleep(.01) zoneTwoC() break elif zone_in == "c" and zone_2c.discovered != "True": print("You have not discovered this zone yet.") continue elif area_in == "2" and areaTwo.locationFound != "True": print("You have not discovered this area yet.") continue ### AREA 3 ### elif area_in == "3" and areaThree.locationFound == "True": clear() time.sleep(.01) print("Discovered Zones:",', '.join(discoveredZones)) zone_choose = "Which zone do you want to go to? [a/b/c]\n" flush(zone_choose) zone_in = input(">>> ") ### ZONE 3A ### if zone_in == "a" and zone_3a.discovered == "True": userPlayer.currentLocation = "3a" clear() time.sleep(.01) zoneThreeA() break elif zone_in == "a" and zone_3a.discovered != "True": print("You have not discovered this zone yet.") continue ### ZONE 3B ### elif zone_in == "b" and zone_3b.discovered == "True": userPlayer.currentLocation = "3b" clear() time.sleep(.01) zoneThreeB() break elif zone_in == "b" and zone_3b.discovered != "True": print("You have not discovered this zone yet.") continue ### ZONE 3C ### elif zone_in == "c" and zone_3c.discovered == "True": userPlayer.currentLocation = "3c" clear() time.sleep(.01) zoneThreeC() break elif zone_in == "c" and zone_3c.discovered != "True": print("You have not discovered this zone yet.") continue elif area_in == "3" and areaThree.locationFound != "True": print("You have not discovered this area yet.") continue else: print("Please enter a valid command!") continue ### Print Zones ### def print_zones(): if userPlayer.currentLocation == "1a": print("The dot represents your current location.\n") game_map_1a() elif userPlayer.currentLocation == "1b": print("The dot represents your current location.\n") game_map_1b() elif userPlayer.currentLocation == "1c": print("The dot represents your current location.\n") game_map_1c() elif userPlayer.currentLocation == "2a": print("The dot represents your current location.\n") game_map_2a() elif userPlayer.currentLocation == "2b": print("The dot represents your current location.\n") game_map_2b() elif userPlayer.currentLocation == "2c": print("The dot represents your current location.\n") game_map_2c() elif userPlayer.currentLocation == "3a": print("The dot represents your current location.\n") game_map_3a() elif userPlayer.currentLocation == "3b": print("The dot represents your current location.\n") game_map_3b() elif userPlayer.currentLocation == "3c": print("The dot represents your current location.\n") game_map_3c() else: print("Something seems to have went wrong. Now exiting the game...") exit() ### Zone Interact ### def zoneOneA(): while True: print_zones() if zone_1a.mobskilled >= 10: print("") print("╔══════════════════╗") print("║ Zone 1a ║") print("║ ║") print("║Mobs left:",zone_1a.mobsleft," ║") print("║Mobs killed:",zone_1a.mobskilled," ║") print("║ ║") print("║ F = Fight ║") print("║ C = Change areas ║") print("╚══════════════════╝") else: print("") print("╔══════════════════╗") print("║ Zone 1a ║") print("║ ║") print("║Mobs left:",zone_1a.mobsleft," ║") print("║Mobs killed:",zone_1a.mobskilled," ║") print("║ ║") print("║ F = Fight ║") print("║ C = Change areas ║") print("╚══════════════════╝") time.sleep(.01) while True: chooseIn = input(">>> ") chooseIn = chooseIn.lower() chooseIn = chooseIn.strip() chooseIn = chooseIn.replace(" ","") if chooseIn == "f" and zone_1a.mobsleft > 1: clear() time.sleep(.02) wolf_battle() wolfMob.hp = 50 zone_1a.mobskilled += 1 zone_1a.mobsleft = zone_1a.totalmobs - zone_1a.mobskilled time.sleep(1) break elif chooseIn == "f" and zone_1a.mobsleft == 1: clear() time.sleep(.02) ogre_battle() ogreMob.hp = 100 zone_1a.mobskilled += 1 zone_1a.mobsleft = zone_1a.totalmobs - zone_1a.mobskilled discoveredZones.append("1b") print("You have discovered zone 1b!") zone_1b.discovered = "True" time.sleep(2) break elif chooseIn == "f" and zone_1a.mobsleft <= 0: clear() time.sleep(.02) orc_battle() orcMob.hp = 75 zone_1a.mobskilled += 1 zone_1a.mobsleft = 0 time.sleep(1) break elif chooseIn == "c" and zone_1a.mobsleft == 0: area_zone_choose() elif chooseIn == "c" and zone_1a.mobsleft > 0: if userPlayer.currentLocation == "1a" and len(discoveredZones) <= 1: print("You have not discovered any other areas yet!") continue else: area_zone_choose() else: print("Please enter a valid input!") continue clear() time.sleep(.02) continue def zoneOneB(): while True: print_zones() print("") if zone_1b.mobskilled >= 10: print("") print("╔══════════════════╗") print("║ Zone 1b ║") print("║ ║") print("║Mobs left:",zone_1b.mobsleft," ║") print("║Mobs killed:",zone_1b.mobskilled," ║") print("║ ║") print("║ F = Fight ║") print("║ C = Change areas ║") print("╚══════════════════╝") else: print("") print("╔══════════════════╗") print("║ Zone 1b ║") print("║ ║") print("║Mobs left:",zone_1b.mobsleft," ║") print("║Mobs killed:",zone_1b.mobskilled," ║") print("║ ║") print("║ F = Fight ║") print("║ C = Change areas ║") print("╚══════════════════╝") time.sleep(.01) while True: chooseIn = input(">>> ") chooseIn = chooseIn.lower() chooseIn = chooseIn.strip() chooseIn = chooseIn.replace(" ","") if chooseIn == "f" and zone_1b.mobsleft > 1: clear() time.sleep(.02) wolf_battle() wolfMob.hp = 50 zone_1b.mobskilled += 1 zone_1b.mobsleft = zone_1b.totalmobs - zone_1b.mobskilled time.sleep(1) break elif chooseIn == "f" and zone_1b.mobsleft == 1: clear() time.sleep(.02) ogre_battle() ogreMob.hp = 100 zone_1b.mobskilled += 1 zone_1b.mobsleft = zone_1b.totalmobs - zone_1b.mobskilled discoveredZones.append("1c") print("You have discovered zone 1c!") zone_1c.discovered = "True" time.sleep(2) break elif chooseIn == "f" and zone_1b.mobsleft <= 0: clear() time.sleep(.02) orc_battle() orcMob.hp = 75 zone_1b.mobskilled += 1 zone_1b.mobsleft = 0 time.sleep(1) break elif chooseIn == "c" and zone_1b.mobsleft == 0: area_zone_choose() elif chooseIn == "c" and zone_1b.mobsleft > 0: if userPlayer.currentLocation == "1a" and len(discoveredZones) <= 1: print("You have not cleared this area yet!") continue else: area_zone_choose() else: print("Please enter a valid input!") continue clear() time.sleep(.02) continue def zoneOneC(): while True: print_zones() print("") if zone_1c.mobskilled >= 10: print("╔══════════════════╗") print("║ Zone 1c ║") print("║ ║") print("║Mobs left:",zone_1c.mobsleft," ║") print("║Mobs killed:",zone_1c.mobskilled," ║") print("║ ║") print("║ F = Fight ║") print("║ C = Change areas ║") print("╚══════════════════╝") else: print("") print("╔══════════════════╗") print("║ Zone 1c ║") print("║ ║") print("║Mobs left:",zone_1c.mobsleft," ║") print("║Mobs killed:",zone_1c.mobskilled," ║") print("║ ║") print("║ F = Fight ║") print("║ C = Change areas ║") print("╚══════════════════╝") time.sleep(.01) while True: chooseIn = input(">>> ") chooseIn = chooseIn.lower() chooseIn = chooseIn.strip() chooseIn = chooseIn.replace(" ","") if chooseIn == "f" and zone_1c.mobsleft > 1: clear() time.sleep(.02) wolf_battle() wolfMob.hp = 50 zone_1c.mobskilled += 1 zone_1c.mobsleft = zone_1c.totalmobs - zone_1c.mobskilled time.sleep(1) break elif chooseIn == "f" and zone_1c.mobsleft == 1: clear() time.sleep(.02) ogre_battle() ogreMob.hp = 100 zone_1c.mobskilled += 1 zone_1c.mobsleft = zone_1c.totalmobs - zone_1c.mobskilled discoveredZones.append("2a") print("You have discovered area 2!") areaTwo.locationFound = "True" zone_2a.discovered = "True" time.sleep(2) break elif chooseIn == "f" and zone_1a.mobsleft <= 0: clear() time.sleep(.02) orc_battle() orcMob.hp = 75 zone_1c.mobskilled += 1 zone_1c.mobsleft = 0 time.sleep(1) break elif chooseIn == "c" and zone_1c.mobsleft == 0: area_zone_choose() elif chooseIn == "c" and zone_1c.mobsleft > 0: if userPlayer.currentLocation == "1a" and len(discoveredZones) <= 1: print("You have not cleared this area yet!") continue else: area_zone_choose() else: print("Please enter a valid input!") continue clear() time.sleep(.02) continue def zoneTwoA(): while True: print_zones() print("") if zone_2a.mobskilled >= 10: print("╔══════════════════╗") print("║ Zone 2a ║") print("║ ║") print("║Mobs left:",zone_2a.mobsleft," ║") print("║Mobs killed:",zone_2a.mobskilled," ║") print("║ ║") print("║ F = Fight ║") print("║ C = Change areas ║") print("╚══════════════════╝") elif zone_2a.mobskilled >= 1 and zone_2a.mobsleft <= 9: print("╔══════════════════╗") print("║ Zone 2a ║") print("║ ║") print("║Mobs left:",zone_2a.mobsleft," ║") print("║Mobs killed:",zone_2a.mobskilled," ║") print("║ ║") print("║ F = Fight ║") print("║ C = Change areas ║") print("╚══════════════════╝") else: print("╔══════════════════╗") print("║ Zone 2a ║") print("║ ║") print("║Mobs left:",zone_2a.mobsleft," ║") print("║Mobs killed:",zone_2a.mobskilled," ║") print("║ ║") print("║ F = Fight ║") print("║ C = Change areas ║") print("╚══════════════════╝") time.sleep(.01) while True: chooseIn = input(">>> ") chooseIn = chooseIn.lower() chooseIn = chooseIn.strip() chooseIn = chooseIn.replace(" ","") if chooseIn == "f" and zone_2a.mobsleft > 1: clear() time.sleep(.02) wolf_battle() wolfMob.hp = 50 zone_2a.mobskilled += 1 zone_2a.mobsleft = zone_2a.totalmobs - zone_2a.mobskilled time.sleep(1) break elif chooseIn == "f" and zone_2a.mobsleft == 1: clear() time.sleep(.02) ogre_battle() ogreMob.hp = 100 zone_2a.mobskilled += 1 zone_2a.mobsleft = zone_2a.totalmobs - zone_2a.mobskilled discoveredZones.append("2b") print("You have discovered zone 2b!") zone_2b.discovered = "True" time.sleep(2) break elif chooseIn == "f" and zone_2a.mobsleft <= 0: clear() time.sleep(.02) orc_battle() orcMob.hp = 75 zone_2a.mobskilled += 1 zone_2a.mobsleft = 0 time.sleep(1) break elif chooseIn == "c" and zone_2a.mobsleft == 0: area_zone_choose() elif chooseIn == "c" and zone_2a.mobsleft > 0: if userPlayer.currentLocation == "1a" and len(discoveredZones) <= 1: print("You have not cleared this area yet!") continue else: area_zone_choose() else: print("Please enter a valid input!") continue clear() time.sleep(.02) continue def zoneTwoB(): while True: print_zones() print("") if zone_2b.mobsleft >= 10: print("╔══════════════════╗") print("║ Zone 2b ║") print("║ ║") print("║Mobs left:",zone_2b.mobsleft," ║") print("║Mobs killed:",zone_2b.mobskilled," ║") print("║ ║") print("║ F = Fight ║") print("║ C = Change areas ║") print("╚══════════════════╝") elif zone_2b.mobsleft <= 9 and zone_2b.mobsleft >= 1: if zone_2b.mobskilled >= 10: print("╔══════════════════╗") print("║ Zone 2b ║") print("║ ║") print("║Mobs left:",zone_2b.mobsleft," ║") print("║Mobs killed:",zone_2b.mobskilled," ║") print("║ ║") print("║ F = Fight ║") print("║ C = Change areas ║") print("╚══════════════════╝") else: print("╔══════════════════╗") print("║ Zone 2b ║") print("║ ║") print("║Mobs left:",zone_2b.mobsleft," ║") print("║Mobs killed:",zone_2b.mobskilled," ║") print("║ ║") print("║ F = Fight ║") print("║ C = Change areas ║") print("╚══════════════════╝") else: if zone_2b.mobskilled >= 10: print("╔══════════════════╗") print("║ Zone 2b ║") print("║ ║") print("║Mobs left:",zone_2b.mobsleft," ║") print("║Mobs killed:",zone_2b.mobskilled," ║") print("║ ║") print("║ F = Fight ║") print("║ C = Change areas ║") print("╚══════════════════╝") else: print("╔══════════════════╗") print("║ Zone 2b ║") print("║ ║") print("║Mobs left:",zone_2b.mobsleft," ║") print("║Mobs killed:",zone_2b.mobskilled," ║") print("║ ║") print("║ F = Fight ║") print("║ C = Change areas ║") print("╚══════════════════╝") time.sleep(.01) while True: chooseIn = input(">>> ") chooseIn = chooseIn.lower() chooseIn = chooseIn.strip() chooseIn = chooseIn.replace(" ","") if chooseIn == "f" and zone_2b.mobsleft > 1: clear() time.sleep(.02) wolf_battle() wolfMob.hp = 50 zone_2b.mobskilled += 1 zone_2b.mobsleft = zone_2b.totalmobs - zone_2b.mobskilled time.sleep(1) break elif chooseIn == "f" and zone_2b.mobsleft == 1: clear() time.sleep(.02) ogre_battle() ogreMob.hp = 100 zone_2b.mobskilled += 1 zone_2b.mobsleft = zone_2b.totalmobs - zone_2b.mobskilled discoveredZones.append("2c") print("You have discovered zone 2c!") zone_2c.discovered = "True" time.sleep(2) break elif chooseIn == "f" and zone_2b.mobsleft <= 0: clear() time.sleep(.02) orc_battle() orcMob.hp = 75 zone_2b.mobskilled += 1 zone_2b.mobsleft = 0 time.sleep(1) break elif chooseIn == "c" and zone_2b.mobsleft == 0: area_zone_choose() elif chooseIn == "c" and zone_2b.mobsleft > 0: if userPlayer.currentLocation == "1a" and len(discoveredZones) <= 1: print("You have not cleared this area yet!") continue else: area_zone_choose() else: print("Please enter a valid input!") continue clear() time.sleep(.02) continue def zoneTwoC(): while True: print_zones() print("") if zone_2c.mobsleft >= 10: print("╔══════════════════╗") print("║ Zone 2c ║") print("║ ║") print("║Mobs left:",zone_2c.mobsleft," ║") print("║Mobs killed:",zone_2c.mobskilled," ║") print("║ ║") print("║ F = Fight ║") print("║ C = Change areas ║") print("╚══════════════════╝") elif zone_2c.mobsleft <= 9 and zone_2c.mobsleft >= 1: if zone_2c.mobskilled >= 10: print("╔══════════════════╗") print("║ Zone 2c ║") print("║ ║") print("║Mobs left:",zone_2c.mobsleft," ║") print("║Mobs killed:",zone_2c.mobskilled," ║") print("║ ║") print("║ F = Fight ║") print("║ C = Change areas ║") print("╚══════════════════╝") else: print("╔══════════════════╗") print("║ Zone 2c ║") print("║ ║") print("║Mobs left:",zone_2c.mobsleft," ║") print("║Mobs killed:",zone_2c.mobskilled," ║") print("║ ║") print("║ F = Fight ║") print("║ C = Change areas ║") print("╚══════════════════╝") else: if zone_2c.mobskilled >= 10: print("╔══════════════════╗") print("║ Zone 2c ║") print("║ ║") print("║Mobs left:",zone_2c.mobsleft," ║") print("║Mobs killed:",zone_2c.mobskilled," ║") print("║ ║") print("║ F = Fight ║") print("║ C = Change areas ║") print("╚══════════════════╝") else: print("╔══════════════════╗") print("║ Zone 2c ║") print("║ ║") print("║Mobs left:",zone_2c.mobsleft," ║") print("║Mobs killed:",zone_2c.mobskilled," ║") print("║ ║") print("║ F = Fight ║") print("║ C = Change areas ║") print("╚══════════════════╝") time.sleep(.01) while True: chooseIn = input(">>> ") chooseIn = chooseIn.lower() chooseIn = chooseIn.strip() chooseIn = chooseIn.replace(" ","") if chooseIn == "f" and zone_2c.mobsleft > 1: clear() time.sleep(.02) wolf_battle() wolfMob.hp = 50 zone_2c.mobskilled += 1 zone_2c.mobsleft = zone_2c.totalmobs - zone_2c.mobskilled time.sleep(1) break elif chooseIn == "f" and zone_2c.mobsleft == 1: clear() time.sleep(.02) ogre_battle() ogreMob.hp = 100 zone_2c.mobskilled += 1 zone_2c.mobsleft = zone_2c.totalmobs - zone_2c.mobskilled discoveredZones.append("3a") print("You have discovered area 3!") areaThree.locationFound = "True" zone_3a.discovered = "True" time.sleep(2) break elif chooseIn == "f" and zone_2c.mobsleft <= 0: clear() time.sleep(.02) orc_battle() orcMob.hp = 75 zone_2c.mobskilled += 1 zone_2c.mobsleft = 0 time.sleep(1) break elif chooseIn == "c" and zone_2c.mobsleft == 0: area_zone_choose() elif chooseIn == "c" and zone_2c.mobsleft > 0: if userPlayer.currentLocation == "1a" and len(discoveredZones) <= 1: print("You have not cleared this area yet!") continue else: area_zone_choose() else: print("Please enter a valid input!") continue clear() time.sleep(.02) continue def zoneThreeA(): while True: print_zones() print("") if zone_3a.mobsleft >= 10: if zone_3a.mobskilled >= 10: print("╔══════════════════╗") print("║ Zone 3a ║") print("║ ║") print("║Mobs left:",zone_3a.mobsleft," ║") print("║Mobs killed:",zone_3a.mobskilled," ║") print("║ ║") print("║ F = Fight ║") print("║ C = Change areas ║") print("╚══════════════════╝") else: print("╔══════════════════╗") print("║ Zone 3a ║") print("║ ║") print("║Mobs left:",zone_3a.mobsleft," ║") print("║Mobs killed:",zone_3a.mobskilled," ║") print("║ ║") print("║ F = Fight ║") print("║ C = Change areas ║") print("╚══════════════════╝") elif zone_3a.mobsleft <= 9 and zone_3a.mobsleft >= 1: if zone_3a.mobskilled >= 10: print("╔══════════════════╗") print("║ Zone 3a ║") print("║ ║") print("║Mobs left:",zone_3a.mobsleft," ║") print("║Mobs killed:",zone_3a.mobskilled," ║") print("║ ║") print("║ F = Fight ║") print("║ C = Change areas ║") print("╚══════════════════╝") else: print("╔══════════════════╗") print("║ Zone 3a ║") print("║ ║") print("║Mobs left:",zone_3a.mobsleft," ║") print("║Mobs killed:",zone_3a.mobskilled," ║") print("║ ║") print("║ F = Fight ║") print("║ C = Change areas ║") print("╚══════════════════╝") else: if zone_3a.mobskilled >= 10: print("╔══════════════════╗") print("║ Zone 3a ║") print("║ ║") print("║Mobs left:",zone_3a.mobsleft," ║") print("║Mobs killed:",zone_3a.mobskilled," ║") print("║ ║") print("║ F = Fight ║") print("║ C = Change areas ║") print("╚══════════════════╝") else: print("╔══════════════════╗") print("║ Zone 3a ║") print("║ ║") print("║Mobs left:",zone_3a.mobsleft," ║") print("║Mobs killed:",zone_3a.mobskilled," ║") print("║ ║") print("║ F = Fight ║") print("║ C = Change areas ║") print("╚══════════════════╝") time.sleep(.01) while True: chooseIn = input(">>> ") chooseIn = chooseIn.lower() chooseIn = chooseIn.strip() chooseIn = chooseIn.replace(" ","") if chooseIn == "f" and zone_3a.mobsleft > 1: clear() time.sleep(.02) wolf_battle() wolfMob.hp = 50 zone_3a.mobskilled += 1 zone_3a.mobsleft = zone_3a.totalmobs - zone_3a.mobskilled time.sleep(1) break elif chooseIn == "f" and zone_3a.mobsleft == 1: clear() time.sleep(.02) ogre_battle() ogreMob.hp = 100 zone_3a.mobskilled += 1 zone_3a.mobsleft = zone_3a.totalmobs - zone_3a.mobskilled discoveredZones.append("3b") print("You have discovered zone 3b!") zone_3b.discovered = "True" time.sleep(2) break elif chooseIn == "f" and zone_3a.mobsleft <= 0: clear() time.sleep(.02) orc_battle() orcMob.hp = 75 zone_3a.mobskilled += 1 zone_3a.mobsleft = 0 time.sleep(1) break elif chooseIn == "c" and zone_3a.mobsleft == 0: area_zone_choose() elif chooseIn == "c" and zone_3a.mobsleft > 0: if userPlayer.currentLocation == "1a" and len(discoveredZones) <= 1: print("You have not cleared this area yet!") continue else: area_zone_choose() else: print("Please enter a valid input!") continue clear() time.sleep(.02) continue def zoneThreeB(): while True: print_zones() if zone_3b.mobsleft >= 10: if zone_3b.mobskilled >= 10: print("╔══════════════════╗") print("║ Zone 3b ║") print("║ ║") print("║Mobs left:",zone_3b.mobsleft," ║") print("║Mobs killed:",zone_3b.mobskilled," ║") print("║ ║") print("║ F = Fight ║") print("║ C = Change areas ║") print("╚══════════════════╝") else: print("╔══════════════════╗") print("║ Zone 3b ║") print("║ ║") print("║Mobs left:",zone_3b.mobsleft," ║") print("║Mobs killed:",zone_3b.mobskilled," ║") print("║ ║") print("║ F = Fight ║") print("║ C = Change areas ║") print("╚══════════════════╝") elif zone_3b.mobsleft <= 9 and zone_3b.mobsleft >= 1: if zone_3b.mobskilled >= 10: print("╔══════════════════╗") print("║ Zone 3b ║") print("║ ║") print("║Mobs left:",zone_3b.mobsleft," ║") print("║Mobs killed:",zone_3b.mobskilled," ║") print("║ ║") print("║ F = Fight ║") print("║ C = Change areas ║") print("╚══════════════════╝") else: print("╔══════════════════╗") print("║ Zone 3b ║") print("║ ║") print("║Mobs left:",zone_3b.mobsleft," ║") print("║Mobs killed:",zone_3b.mobskilled," ║") print("║ ║") print("║ F = Fight ║") print("║ C = Change areas ║") print("╚══════════════════╝") else: if zone_3b.mobskilled >= 10: print("╔══════════════════╗") print("║ Zone 3b ║") print("║ ║") print("║Mobs left:",zone_3b.mobsleft," ║") print("║Mobs killed:",zone_3b.mobskilled," ║") print("║ ║") print("║ F = Fight ║") print("║ C = Change areas ║") print("╚══════════════════╝") else: print("╔══════════════════╗") print("║ Zone 3b ║") print("║ ║") print("║Mobs left:",zone_3b.mobsleft," ║") print("║Mobs killed:",zone_3b.mobskilled," ║") print("║ ║") print("║ F = Fight ║") print("║ C = Change areas ║") print("╚══════════════════╝") time.sleep(.01) while True: chooseIn = input(">>> ") chooseIn = chooseIn.lower() chooseIn = chooseIn.strip() chooseIn = chooseIn.replace(" ","") if chooseIn == "f" and zone_3b.mobsleft > 1: clear() time.sleep(.02) wolf_battle() wolfMob.hp = 50 zone_3b.mobskilled += 1 zone_3b.mobsleft = zone_3b.totalmobs - zone_3b.mobskilled time.sleep(1) break elif chooseIn == "f" and zone_3b.mobsleft == 1: clear() time.sleep(.02) ogre_battle() ogreMob.hp = 100 zone_3b.mobskilled += 1 zone_3b.mobsleft = zone_3b.totalmobs - zone_3b.mobskilled discoveredZones.append("3c") print("You have discovered zone 3c!") zone_3c.discovered = "True" time.sleep(2) break elif chooseIn == "f" and zone_3b.mobsleft <= 0: clear() time.sleep(.02) orc_battle() orcMob.hp = 75 zone_3b.mobskilled += 1 zone_3b.mobsleft = 0 time.sleep(1) break elif chooseIn == "c" and zone_3b.mobsleft == 0: area_zone_choose() elif chooseIn == "c" and zone_3b.mobsleft > 0: if userPlayer.currentLocation == "1a" and len(discoveredZones) <= 1: print("You have not cleared this area yet!") continue else: area_zone_choose() else: print("Please enter a valid input!") continue clear() time.sleep(.02) continue def zoneThreeC(): while True: print_zones() print("") if zone_3c.mobsleft == 0 and zone_3c.mobskilled == 25: print("Congratulations! You have finished the game. I don't have anything to give you but some advice.") print("Stop wasting your time playing my bad game, go do something productive.") elif zone_3c.mobsleft != 0 and zone_3c.mobskilled != 25: print("You're almost done!") if zone_3c.mobsleft >= 10: if zone_3c.mobskilled >= 10: print("╔══════════════════╗") print("║ Zone 3c ║") print("║ ║") print("║Mobs left:",zone_3c.mobsleft," ║") print("║Mobs killed:",zone_3c.mobskilled," ║") print("║ ║") print("║ F = Fight ║") print("║ C = Change areas ║") print("╚══════════════════╝") else: print("╔══════════════════╗") print("║ Zone 3c ║") print("║ ║") print("║Mobs left:",zone_3c.mobsleft," ║") print("║Mobs killed:",zone_3c.mobskilled," ║") print("║ ║") print("║ F = Fight ║") print("║ C = Change areas ║") print("╚══════════════════╝") elif zone_3c.mobsleft <= 9 and zone_3c.mobsleft >= 1: if zone_3c.mobskilled >= 10: print("╔══════════════════╗") print("║ Zone 3c ║") print("║ ║") print("║Mobs left:",zone_3c.mobsleft," ║") print("║Mobs killed:",zone_3c.mobskilled," ║") print("║ ║") print("║ F = Fight ║") print("║ C = Change areas ║") print("╚══════════════════╝") else: print("╔══════════════════╗") print("║ Zone 3c ║") print("║ ║") print("║Mobs left:",zone_3c.mobsleft," ║") print("║Mobs killed:",zone_3c.mobskilled," ║") print("║ ║") print("║ F = Fight ║") print("║ C = Change areas ║") print("╚══════════════════╝") else: if zone_3c.mobskilled >= 10: print("╔══════════════════╗") print("║ Zone 3c ║") print("║ ║") print("║Mobs left:",zone_3c.mobsleft," ║") print("║Mobs killed:",zone_3c.mobskilled," ║") print("║ ║") print("║ F = Fight ║") print("║ C = Change areas ║") print("╚══════════════════╝") else: print("╔══════════════════╗") print("║ Zone 3c ║") print("║ ║") print("║Mobs left:",zone_3c.mobsleft," ║") print("║Mobs killed:",zone_3c.mobskilled," ║") print("║ ║") print("║ F = Fight ║") print("║ C = Change areas ║") print("╚══════════════════╝") time.sleep(.01) while True: chooseIn = input(">>> ") chooseIn = chooseIn.lower() chooseIn = chooseIn.strip() chooseIn = chooseIn.replace(" ","") if chooseIn == "f" and zone_3c.mobsleft > 1: clear() time.sleep(.02) wolf_battle() wolfMob.hp = 50 zone_3c.mobskilled += 1 zone_3c.mobsleft = zone_3c.totalmobs - zone_3c.mobskilled time.sleep(1) break elif chooseIn == "f" and zone_3c.mobsleft == 1: clear() time.sleep(.02) ogre_battle() ogreMob.hp = 100 zone_3c.mobskilled += 1 zone_3c.mobsleft = zone_3c.totalmobs - zone_3c.mobskilled time.sleep(2) break elif chooseIn == "f" and zone_3c.mobsleft <= 0: clear() time.sleep(.02) orc_battle() orcMob.hp = 75 zone_3c.mobskilled += 1 zone_3c.mobsleft = 0 time.sleep(1) break elif chooseIn == "c" and zone_3c.mobsleft == 0: area_zone_choose() elif chooseIn == "c" and zone_3c.mobsleft > 0: if userPlayer.currentLocation == "1a" and len(discoveredZones) <= 1: print("You have not cleared this area yet!") continue else: area_zone_choose() else: print("Please enter a valid input!") continue clear() time.sleep(.02) continue ### Character Info ### def charInfo(): print('╔══════════════════════════╗') print('║ ║') print('║ Character info ║') print('║ ║') print('╚══════════════════════════╝') print(' ● Name:', userPlayer.name) print(' ● Class:', userPlayer.char) print(' ● HP:', str(userPlayer.hp)) print(' ● ATK DMG:', str(userPlayer.atk)) ### Info Screen ### def game_info(): print(" ╔══════════════════════════════════════════╗") print(" ║ ║") print(" ║ This is a simple text based RPG game ║") print(" ║ ║") print(" ╚══════════════════════════════════════════╝") starting_screen_inputs() ### Help Screen ### def game_help(): print(" ╔══════════════════════════════════════════╗") print(" ║ ║") print(" ║ You spawn in an area, ║") print(" ║ to proceed, clear all mobs in that area. ║") print(" ║ ║") print(" ╚══════════════════════════════════════════╝") starting_screen_inputs() ### Game ### def game_start(): clear() time.sleep(.01) Name = True while Name: name_question = "What is your name?\n" flush(name_question) player_name = input(">>> ") player_name = player_name.strip() i = 0 listn = [] while i < len(player_name): if i == 0: listn.append(player_name.upper()[0]) else: listn.append(player_name[i]) i += 1 namefull = ''.join(listn) player_name_confirm = "So your name is ", namefull + "?", " [Yes/No]\n" flush(player_name_confirm) player_name_conf = input(">>> ") player_name_conf = player_name_conf.lower() player_name_conf = player_name_conf.strip() player_name_conf = player_name_conf.replace(" ","") if (player_name_conf in ['yes', 'y']): userPlayer.name = namefull Name = False break elif (player_name_conf in ['no', 'n']): continue else: print("Please enter a valid command!") continue clear() time.sleep(.03) charInfo() while True: play_start = "\nAre you ready to play? [Yes/No]\n" flush(play_start) play_start_in = input(">>> ") play_start_in = play_start_in.lower() play_start_in = play_start_in.strip() play_start_in = play_start_in.replace(" ","") if (play_start_in in ['yes', 'y']): break elif (play_start_in in ['no', 'n']): while True: print("Press enter when you are ready to play or type Q to quit.") no_start_in = input(">>> ") no_start_in = no_start_in.lower() no_start_in = no_start_in.strip() no_start_in = no_start_in.replace(" ","") if no_start_in == "": break elif no_start_in == "q": exit() else: print("please enter a valid command:") continue else: print("Please enter a valid command.") continue clear() time.sleep(.02) zoneOneA() ### Inputs For Start Screen ### def starting_screen_inputs(): while True: option = input(" >>> ") option = option.lower() option = option.strip() option = option.replace(" ","") if option == ("play"): game_start() elif option == ("info"): game_info() elif option == ("help"): game_help() elif option == ("quit"): exit() else: print("Please enter a valid input!") continue ### Start Screen ### def starting_screen(): clear() time.sleep(.01) print(" /\_\ /\ \ / /\ /\ \\") print(" / / / / \ \ / / \ / \ \\") print(" / / / /\_\ / /\ \ \ / / /\ \ / /\ \ \\") print(" / / /__/ / / / / /\ \ \ / / /\ \ \ / / /\ \_\\") print(" / /\_____/ / / / / \ \_\ / / / \ \ \ / / /_/ / /") print(" / /\_______/ / / / / / / / / /___/ /\ \ / / /__\/ /") print(" / / /\ \ \ / / / / / / / / /_____/ /\ \ / / /_____/") print(" / / / \ \ \ / / /___/ / / / /_________/\ \ \ / / /\ \ \\") print("/ / / \ \ \ / / /____\/ / / / /_ __\ \_\/ / / \ \ \\") print("\/_/ \_\_\\\/_________/ \_\___\ /____/_/\/_/ \_\/") print(" ╔══════════════════════════════════════════╗") print(" ║ Welcome to Koar! ║") print(" ║ - Play - ║") print(" ║ - Info - ║") print(" ║ - Help - ║") print(" ║ - Quit - ║") print(" ╚══════════════════════════════════════════╝") starting_screen_inputs() starting_screen()
Raw Text
-
https://www.facebook.com/CerebrozenReviews/
26 min ago
-
Happy holiday, dear ladies!
26 min ago
-
No Deposit Bonus
27 min ago
-
Adult Telegram Channels
28 min ago
-
Fitspresso Reviews – PRICE ALERT (Hoax Or Real) Fitspresso Coffee Loophole Expert In Weight Loss?
30 min ago
-
"ACV Delight: Shark Tank's Gummy Keto Marvel"
42 min ago
-
SMA BERHIJAB CANTIK BGT
43 min ago
-
2play best collections
44 min ago
-
Ngga Kuat Aku Bang T
45 min ago
-
2play best collectionsT
46 min ago