Advertisement
CookieQ

Pokémon Obsidian BattleSystem v1.01

Jul 14th, 2019
541
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.67 KB | None | 0 0
  1. #name Pokémon Obsidian BattleSystem v1.01.py
  2. import random
  3.  
  4. you = input("What is your pokemon?\n    ")
  5. lvl = int(input("Your " + you + "'s lvl is "))
  6. yourpokemon = 1
  7. if you == 'Pikachu':
  8.     maxhp = 25 + (11 * lvl)
  9.     hp = maxhp
  10. attacker = random.choice(['Pikachu', 'Bulbasaur', 'Lycanrock'])
  11. atkLvl = random.randint(1,99)
  12. attackerhp = 25 + (11 * atkLvl)
  13. print("A wild " + attacker + " has appeared!")
  14. print("Go! " + you + "!")
  15. battleEnd = 0
  16. while not battleEnd:
  17.     if attackerhp <= 0:
  18.         battleEnd = 1
  19.         print(attacker + " has fainted!")
  20.         coins = abs(attackerhp)
  21.         coins = coins * 5
  22.         print("You recieved " + str(coins) + " coins!")
  23.     elif hp <= 0:
  24.         print("Your " + you + " has fainted!")
  25.         yourpokemon -= 1
  26.         if yourpokemon == 0:
  27.           print("You have no pokemon left that can fight!")
  28.           print("You blacked out!")
  29.           battleEnd = 1
  30.     else:
  31.           print("Attacker's " + attacker + " has " + str(attackerhp) + " health. You have " + str(hp) + " HP!")
  32.           a = input("What do you do?\nF(ight) I(tem)\nR(un)   B(ag)\nEnter the letter: ")
  33.           if a == "R":
  34.               print("Ran away safely")
  35.               battleEnd = 1
  36.           else:
  37.               if a == "F":
  38.                   a = input("Enter T for thunderbolt, L for Lightning Flash, S for Shock, A for tackle.\n")
  39.                   if a == "T":
  40.                       print("Pikachu used Thunderbolt!")
  41.                       if attacker == 'Pikachu':
  42.                           print("It was not very effective!")
  43.                           attackerhp -= 3 * lvl
  44.                       elif attacker == "Bulbasaur":
  45.                           print('It was very effective!')
  46.                           attackerhp -= 11 * lvl
  47.                       elif attacker == 'Lycanrock':
  48.                           attackerhp -= 6 * lvl
  49.              
  50.               if attacker == 'Pikachu':
  51.                  a = random.choice(['T', 'L', 'S', 'A'])
  52.                  if a == "T":
  53.                      if you == 'Pikachu':
  54.                           print("Opposing Pikachu used Thunderbolt!")
  55.                           hp -= 3 * atkLvl
  56.                  if a == "L":
  57.                      print("Opposing Pikachu used Lightning Flash!")
  58.                      print(you + " is blinded!")
  59.                  if a == "S":
  60.                      print("Opposing Pikachu used Shock!")
  61.                      if random.randint(1,2) == 1:
  62.                          print(you + " is paralysed!")
  63.                      hp -= 1 * atkLvl
  64.                  if a == "A":
  65.                      print("Opposing Pikachu used Tackle!")
  66.                      hp -= 2 * atkLvl
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement