Commit ff95fee7 by BellCodeEditor

save project

parent 6581c1bd
Showing with 7 additions and 5 deletions
......@@ -35,6 +35,7 @@ class Player(Hero):
self.hero_type = hero_type
print("角色"+self.name+"创建成功,英雄类型为:", self.hero_type)
print("当前等级、血量、攻击力分别为:",self.level,self.hp,self.attack)
import random
houyi = Player("射手", "后羿")
yase = Hero("垭瑟")
......@@ -48,11 +49,12 @@ while True:
elif ji_neng=="1":
houyi.combat(yase)
elif ji_neng=="2":
houyi.cure(self)
houyi.cure()
else:
print("输入有误,请重新输入:")
continue
a=random.randint(1,3)
if a==1:
yase.cure()
else:
yase.combat(houyi)
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