Commit 03462a41 by BellCodeEditor

save project

parent 45550bb3
Showing with 7 additions and 2 deletions
...@@ -3,8 +3,8 @@ class Hero(object): ...@@ -3,8 +3,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 = 200
self.attack = 40 self.attack = 50
self.max_hp = self.hp self.max_hp = self.hp
def cure(self): # 治疗 def cure(self): # 治疗
...@@ -63,3 +63,7 @@ while True: ...@@ -63,3 +63,7 @@ while True:
print("请重新输入1或者2") print("请重新输入1或者2")
continue continue
status = random.randint(1,3) status = random.randint(1,3)
if status == 1:
yase.cure()
else:
yase.combat(houyi)
\ 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