Commit 43e38731 by BellCodeEditor

save project

parent c9f049b9
Showing with 5 additions and 4 deletions
......@@ -3,7 +3,7 @@ class Hero(object):
def __init__(self, name):
self.name = name
self.level = 1
self.hp = 250
self.hp = 260
self.attack = 40
self.max_hp = self.hp
......@@ -27,12 +27,12 @@ class Hero(object):
info = info1+info2+info3
print(info)
exit()
def shengji(self)
class Player(Hero):
def __init__(self,hero_type,name):
super().__init__(name)
self.hp = 200
self.attack = 50
self.hp = 210
self.attack = 60
self.max_hp = self.hp
self.hero_type = hero_type
print("角色"+self.name+"创建成功,英雄类型为:", self.hero_type)
......@@ -49,6 +49,7 @@ while True:
houyi.combat(yase)
if a=='2':
houyi.cure()
# b = random.randid
# houyi.combat(yase)
# 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