Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #name Pokémon Obsidian BattleSystem v1.01.py
- import random
- you = input("What is your pokemon?\n ")
- lvl = int(input("Your " + you + "'s lvl is "))
- yourpokemon = 1
- if you == 'Pikachu':
- maxhp = 25 + (11 * lvl)
- hp = maxhp
- attacker = random.choice(['Pikachu', 'Bulbasaur', 'Lycanrock'])
- atkLvl = random.randint(1,99)
- attackerhp = 25 + (11 * atkLvl)
- print("A wild " + attacker + " has appeared!")
- print("Go! " + you + "!")
- battleEnd = 0
- while not battleEnd:
- if attackerhp <= 0:
- battleEnd = 1
- print(attacker + " has fainted!")
- coins = abs(attackerhp)
- coins = coins * 5
- print("You recieved " + str(coins) + " coins!")
- elif hp <= 0:
- print("Your " + you + " has fainted!")
- yourpokemon -= 1
- if yourpokemon == 0:
- print("You have no pokemon left that can fight!")
- print("You blacked out!")
- battleEnd = 1
- else:
- print("Attacker's " + attacker + " has " + str(attackerhp) + " health. You have " + str(hp) + " HP!")
- a = input("What do you do?\nF(ight) I(tem)\nR(un) B(ag)\nEnter the letter: ")
- if a == "R":
- print("Ran away safely")
- battleEnd = 1
- else:
- if a == "F":
- a = input("Enter T for thunderbolt, L for Lightning Flash, S for Shock, A for tackle.\n")
- if a == "T":
- print("Pikachu used Thunderbolt!")
- if attacker == 'Pikachu':
- print("It was not very effective!")
- attackerhp -= 3 * lvl
- elif attacker == "Bulbasaur":
- print('It was very effective!')
- attackerhp -= 11 * lvl
- elif attacker == 'Lycanrock':
- attackerhp -= 6 * lvl
- if attacker == 'Pikachu':
- a = random.choice(['T', 'L', 'S', 'A'])
- if a == "T":
- if you == 'Pikachu':
- print("Opposing Pikachu used Thunderbolt!")
- hp -= 3 * atkLvl
- if a == "L":
- print("Opposing Pikachu used Lightning Flash!")
- print(you + " is blinded!")
- if a == "S":
- print("Opposing Pikachu used Shock!")
- if random.randint(1,2) == 1:
- print(you + " is paralysed!")
- hp -= 1 * atkLvl
- if a == "A":
- print("Opposing Pikachu used Tackle!")
- hp -= 2 * atkLvl
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement