Commit 637d4439 by BellCodeEditor

save project

parent 164f74ef
Showing with 10 additions and 2 deletions
......@@ -25,7 +25,13 @@ class Hero(object):
info = info1+info2+info3
print(info)
exit()
def dazhao(self,enemy):
if self.hp>self.max_hp/2:
enemy.hp-=150
self.hp-=self.max_hp/2
print(self.name+"使用大招,对"+enemy+"造成150伤害"+enemy+"血量:"+str(enemy.hp)+self.name+"血量"+str(self.hp))
else:
pass
class Player(Hero):
def __init__(self,hero_type,name):
super().__init__(name)
......@@ -50,9 +56,11 @@ while True:
print("-"*30)
aaa=input("请选择释放英雄技能(1攻击/2治疗/q退出)")
if aaa=="1":
houyi.combat(yase)
houyi.combat("yase")
elif aaa=="2":
houyi.cure()
elif aaa=="3":
houyi.dazhao("yase")
elif aaa=="q":
exit()
else:
......
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