repl.it
@alexeboy/

Pokemon Adventure

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import random
party = ""
name = input("Welcome to Kanto!\nWhat's your name?")
if name == "":
	print("Choose a name!")
while name == "":
	name = input("Welcome to Kanto!\nWhat's your name?")
rivalName = input("Give your rival a name!")
if rivalName == "":
	print("C'mon! Give him a name!")
	while rivalName == '':
		rivalName = input("Give your rival a name!")
starter = input(
    "Choose your starter! \nCharmander (c), Squirtle (s), Bulbasaur (b)")
health = random.randint(15, 20)
defense = random.randint(1, 5)
offence = random.randint(1, 5)
oppHealth = random.randint(15, 20)
oppDefence = random.randint(1, 3)
oppOffence = random.randint(1, 3)
oppStarterSet = ["c", "s", "b"]
if starter == 'c':
	starter = "Charmander"
oppStarterSet = ["s", "b"]
oppStarter = random.choice(oppStarterSet)
party = "Charmander"
if starter == 's':
	starter = "Squirtle"
	oppStarterSet = ["c", "b"]
	oppStarter = random.choice(oppStarterSet)
	party = "Squirtle"
if starter == 'b':
	starter = "Bulbasaur"
	oppStarterSet = ["c", "s"]
	oppStarter = random.choice(oppStarterSet)
	party = "Bulbasaur"
if oppStarter == "c":
	oppStarter = "Charmander"
if oppStarter == "s":
	oppStarter = "Squirtle"
if oppStarter == "b":
	oppStarter = "Bulbasaur"
print("You have", offence, "attack,", defense, "defense, and", health,
      "health")
print(rivalName, "chose", oppStarter)
print("Your party is:", party)
print(rivalName, "has challenged you to a fight!")
print("You have", health, "health")
while (health > 0 or oppHealth > 0):
	moves = input("Your moves are scratch (s) and growl (g)")
	if moves == "s":
		oppHealth -= 3 - oppDefence
		oppHealth -= 3 + offence
		damage = 5 + offence
		print("you did", damage, "damage!")
		print("your opponent has", oppHealth, "health")
	if moves == "g":
		print("You used Growl!\nYou reduced", rivalName, "attack by 2!")
		oppOffence -= 2
		if oppDefence < 0:
			oppDefence = 0
			print(rivalName, "has", oppDefence, "defense")
	oppMoveset = ["scratch", "tail-whip"]
	oppMove = random.choice(oppMoveset)
	if oppMove == "scratch":
		health -= 5
		print(rivalName, "used Scratch!")
		print("You have", health, "health")
	if oppMove == "tail-whip":
		defense -= 2
		print(rivalName, "used Tail Whip!")
if (health < 0 or health == 0):
	print("You Lose!")
if oppHealth < 0 or oppHealth == 0:
  print("You win!")	
quit()
  
?