Commit a6d775f2 by BellCodeEditor

save project

parent d21ce810
Showing with 4 additions and 4 deletions
...@@ -4,8 +4,8 @@ class Hero(object): ...@@ -4,8 +4,8 @@ class Hero(object):
def __init__(self, name): def __init__(self, name):
self.name = name self.name = name
self.level = 1 self.level = 1
self.hp = 250 self.hp = 220
self.attack = 410 self.attack = 38
self.max_hp = self.hp self.max_hp = self.hp
def cure(self): # 治疗 def cure(self): # 治疗
...@@ -51,6 +51,8 @@ class Player(Hero): ...@@ -51,6 +51,8 @@ class Player(Hero):
houyi = Player("射手", "后羿") houyi = Player("射手", "后羿")
yase = Hero("亚瑟") yase = Hero("亚瑟")
print(30*'-') print(30*'-')
print(" 战斗开始") print(" 战斗开始")
...@@ -65,8 +67,6 @@ while True: ...@@ -65,8 +67,6 @@ while True:
elif choice == "3": elif choice == "3":
houyi.manblood() houyi.manblood()
num = random.randint(1,4) num = random.randint(1,4)
if num == 1: if num == 1:
yase.cure() yase.cure()
......
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