Commit dfd4504b by BellCodeEditor

save project

parent af66433f
Showing with 15 additions and 0 deletions
...@@ -28,6 +28,19 @@ class Hero(object): ...@@ -28,6 +28,19 @@ class Hero(object):
print('你干嘛啊~~') print('你干嘛啊~~')
exit() exit()
#def combat(self, enemy):
#info1 = self.name+"对"+enemy.name+"射出灼日之矢,"
#info2 = "造成"+str(self.attack+50)+"点伤害,"
#enemy.hp -= self.attack+50
#if enemy.hp > 0:
#info = info1+info2+info3
#else:
#info3 = enemy.name+"阵亡,游戏结束"
#info = info1+info2+info3
#print(info)
#print('你干嘛啊~~')
#exit()
class Player(Hero): class Player(Hero):
def __init__(self,hero_type,name): def __init__(self,hero_type,name):
super().__init__(name) super().__init__(name)
...@@ -55,6 +68,8 @@ while True: ...@@ -55,6 +68,8 @@ while True:
houyi.combat(yase) houyi.combat(yase)
elif int(a)==2: elif int(a)==2:
houyi.cure() houyi.cure()
#elif int(a)==3
#houyi.zhuorizhishi()
elif a=="q": elif a=="q":
print('游戏结束') print('游戏结束')
break break
......
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