Commit b052c91c by BellCodeEditor

save project

parent 828e10c2
Showing with 4 additions and 15 deletions
...@@ -24,6 +24,10 @@ class Monster(): ...@@ -24,6 +24,10 @@ class Monster():
print(info) print(info)
exit() exit()
class Player(Monster):
super()__init__(self,hp,attack,attack_info):
#角色区 #角色区
flowy = Monster("flowy",20,3,"射出'友谊颗粒'") flowy = Monster("flowy",20,3,"射出'友谊颗粒'")
...@@ -31,18 +35,4 @@ frogy = Monster("frogy",10,2,"用舌头弹了一下") ...@@ -31,18 +35,4 @@ frogy = Monster("frogy",10,2,"用舌头弹了一下")
#选择怪物 #选择怪物
player = input("请选择你的怪物:\nA.frogy B.flowy\n_")
if player == "A":
player = "frogy"
print("你选择了" + player)
elif player == "B":
player = "flowy"
print("你选择了" + player)
else:
print("输入无效")
#战斗环节 #战斗环节
while True:
flowy.combat(frogy)
frogy.combat(flowy)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment