0% found this document useful (0 votes)
13 views2 pages

Marvel Character Combat Game

The document outlines a Python program for a Marvel-themed fighting game where players can choose characters to battle against each other. It includes functions for handling character selection, health management, and determining the winner based on random number inputs. Additionally, the game offers different modes, including a combat mode and a lore-based mode, allowing players to engage in various types of fights.

Uploaded by

vishnuabboy
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views2 pages

Marvel Character Combat Game

The document outlines a Python program for a Marvel-themed fighting game where players can choose characters to battle against each other. It includes functions for handling character selection, health management, and determining the winner based on random number inputs. Additionally, the game offers different modes, including a combat mode and a lore-based mode, allowing players to engage in various types of fights.

Uploaded by

vishnuabboy
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

3/19/25, 11:23 AM Marvel Fight(Create Task) | CodeHS

Name: Vishnu Abboy

Marvel Fight(Create Task)


Erwin's CHarge

1.

[Link]

1. import random
2. Marvel_Characters = ["Iron Man","Captain America","Hawkeye","Hulk","Black
Widow","Thor","Loki","Venom","Thanos","Spiderman","Antman","Doctor Strange","Scarlet Witch","Professor X"]
3. Score1 = 0
4. Score2 = 0
5. def Marvel_Fight(Marvel_Characters):
6. global Score1
7. global Score2
8. health = {character: 100 for character in Marvel_Characters}
9. print("This is the list you can choose from" + str(Marvel_Characters))
10. Character1 = input("Who do you choose player 1:" )
11. Character2 = input("Who do you choose player 2: ")
12. if Character1 and Character2 in Marvel_Characters:
13. print(str(Character1) + " vs. " + str(Character2))
14. while health[Character1] > 0 and health[Character2] > 0:
15. User1 = int(input("Choose a number, " + str(Character1) + ": "))
16. User2 = int(input("Choose a number, " + str(Character2) + ": "))
17. if abs(User1 - [Link](1,10)) < abs(User2 - [Link](1,10)):
18. print("Player 1 wins")
19. health[Character2] -= [Link](1,30)
20. Score1 += 1
21. print(f"{Character2}'s health: {health[Character2]}")
22. else:
23. print("Player 2 wins")
24. health[Character1] -= [Link](1,30)
25. Score1 += 1
26. print(f"{Character1}'s health: {health[Character1]}")
27. if health[Character1]<= 0:
28. print(f"{Character1} loses!" + f"{Character2} Wins!")
29. if Character2 == Marvel_Characters[0]:
30. print("Jarvis, Ready my cocktail")
31. if Character2 == Marvel_Characters[1]:
32. print("Not bad for a World War 2 vet")
33. if Character2 == Marvel_Characters[2]:
34. print("I never miss my mark")
35. if Character2 == Marvel_Characters[3]:
36. print("Nobody stronger than HULK")
37. if Character2 == Marvel_Characters[4]:
38. print("Look like some red got crossed out")
39. if Character2 == Marvel_Characters[5]:
40. print("None may best the god of Thunder")
41. if Character2 == Marvel_Characters[6]:
42. print("I was born to rule, that is the cost of glorious purpose")
43. if Character2 == Marvel_Characters[7]:
44. print("WE ARE VENOM")
45. if Character2 == Marvel_Characters[8]:
46. print("I am inevitable")
47. if Character2 == Marvel_Characters[9]:
48. print("Courtesy of you friendly neighboorhood Spider Man")
49. if Character2 == Marvel_Characters[10]:
50. print("Looks like the little guy does win")
51. if Character2 == Marvel_Characters[11]:
52. print("Nobody will take my family again")
53. if Character2 == Marvel_Characters[12]:
54. print("Agamotto guides me")
55. if Character2 == Marvel_Characters[13]:
56. print("My mind is beyond you")
57. else:
58. print(f"{Character2} Loses!" + f"{Character1} Wins!")

[Link] 1/2
3/19/25, 11:23 AM Marvel Fight(Create Task) | CodeHS
59. if Character1 == Marvel_Characters[0]:
60. print("Jarvis, Ready my Cocktail")
61. if Character1 == Marvel_Characters[1]:
62. print("Not bad for a WW2 Vet")
63. if Character1 == Marvel_Characters[2]:
64. print("I never miss my mark")
65. if Character1 == Marvel_Characters[3]:
66. print("Nobody Stronger than Hulk")
67. if Character1 == Marvel_Characters[4]:
68. print("Looks like some red got crossed out")
69. if Character1 == Marvel_Characters[5]:
70. print("None may best the God of Thunder")
71. if Character1 == Marvel_Characters[6]:
72. print("I was born to rule, that is the cost of glorious purpose")
73. if Character1 == Marvel_Characters[7]:
74. print("We ARE VENOM")
75. if Character1 == Marvel_Characters[8]:
76. print("I am inevitable")
77. if Character1 == Marvel_Characters[9]:
78. print("Courtesy of your friendly neighboorhood Spider-Man")
79. if Character1 == Marvel_Characters[10]:
80. print("Looks like the little guy does win")
81. if Character1 == Marvel_Characters[11]:
82. print("Nobody will take my family again")
83. if Character1 == Marvel_Characters[12]:
84. print("Agamotto guides me")
85. if Character1 == Marvel_Characters[13]:
86. print("My mind is beyond you")
87. def Marvel_Levels():
88. Stats =["Iron Man_90","Captain America_93","Black
Panther_87","Hulk_94","Starlord_84","Thor_95","Deadpool_74","Spiderman_92","Ghost Rider_73","Thanos_96","Iron
Fist_96","Silver Surfer_92","Hawkeye_57","Captain Marvel_87","Daredevil_54","Black Widow_76","She-
Hulk_67","Mr.Fantastic_86"]
89. print("This is the list you can choose from: Iron Man, Captain America, Black Panther, Hulk, Starlord, Thor,
Deadpool, Spiderman, Ghost Rider, Thanos, Iron Fist,Silver Surfer, Hawkeye, Cpatain Marvel, Daredevil, Black
Widow, She-Hulk, [Link]")
90. Champion1 = input("Who is your Champion, Player 1: ")
91. Champion2 = input("Who is your Champion, Player 2: ")
92. Score1 = None
93. Score2 = None
94. for stat in Stats:
95. name, score = [Link]('_')
96. if [Link]() == [Link]():
97. Score1 = int(score)
98. elif [Link]() == [Link]():
99. Score2 = int(score)
100. if Score1 == None or Score2 == None:
101. print("One of the Champions not found in list")
102. else:
103. if Score1 > Score2:
104. print("Player 1 wins")
105. if Score1 < Score2:
106. print("Player 2 wins")
107. def God_Fight():
108. Player = input("Who are you: ")
109. print(Player + " vs. God")
110. Attack = input(" Are you lucky, choose a number 1,1000: ")
111. if Attack == '0':
112. print("You are the next god praise upon you, I will worship the ground you walk on you great one")
113. else:
114. print("You are now dead, what were you thinking trying to kill god your mother would be ashamed")
115. def Selection():
116. Game = input("This is Marvel Combat Game. You may choose between 2 game options. Iconic for random fight and
comic for lore accurate fights. What game do you want to play(1 for iconic and 2 for comic): ")
117. if Game == '1':
118. Marvel_Fight(Marvel_Characters)
119. elif Game == '2':
120. Marvel_Levels()
121. elif Game == '3':
122. God_Fight()
123. Selection()

[Link] 2/2

You might also like