Commit ad387859 by BellCodeEditor

save project

parent c2bdc35d
Showing with 8 additions and 0 deletions
...@@ -19,8 +19,15 @@ class Hero(object): ...@@ -19,8 +19,15 @@ class Hero(object):
self.hp+=40 self.hp+=40
else: else:
print("血量已满,加血无效!") print("血量已满,加血无效!")
class (Hero):
def __init__(name):
super().__init__(name):
self.hp = 200
self.attack = 60
while True: while True:
a=input("你要使用什么技能?(1回血/2攻击)") a=input("你要使用什么技能?(1回血/2攻击)")
yase = Hero("垭瑟") yase = Hero("垭瑟")
houyi= Hero("后羿") houyi= Hero("后羿")
\ 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