Commit d21ce810 by BellCodeEditor

save project

parent 796ddeb6
Showing with 4 additions and 4 deletions
...@@ -5,7 +5,7 @@ class Hero(object): ...@@ -5,7 +5,7 @@ class Hero(object):
self.name = name self.name = name
self.level = 1 self.level = 1
self.hp = 250 self.hp = 250
self.attack = 40 self.attack = 410
self.max_hp = self.hp self.max_hp = self.hp
def cure(self): # 治疗 def cure(self): # 治疗
...@@ -39,7 +39,7 @@ class Player(Hero): ...@@ -39,7 +39,7 @@ class Player(Hero):
def __init__(self,hero_type,name): def __init__(self,hero_type,name):
super().__init__(name) super().__init__(name)
self.hp = 200 self.hp = 200
self.attack = 50 self.attack = 35
self.max_hp = self.hp self.max_hp = self.hp
self.hero_type = hero_type self.hero_type = hero_type
print("角色"+self.name+"创建成功,英雄类型为:", self.hero_type) print("角色"+self.name+"创建成功,英雄类型为:", self.hero_type)
...@@ -56,7 +56,7 @@ print(" 战斗开始") ...@@ -56,7 +56,7 @@ print(" 战斗开始")
while True: while True:
print(30*'-') print(30*'-')
choice = input("技能(1攻击,2治疗,3躲):") choice = input("技能(1攻击,2治疗,3满血):")
if choice == "1": if choice == "1":
houyi.combat(yase) houyi.combat(yase)
...@@ -67,7 +67,7 @@ while True: ...@@ -67,7 +67,7 @@ while True:
num = random.randint(1,3) num = random.randint(1,4)
if num == 1: if num == 1:
yase.cure() yase.cure()
else: 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