Commit 03462a41 by BellCodeEditor

save project

parent 45550bb3
Showing with 8 additions and 4 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): # 治疗
...@@ -62,4 +62,8 @@ while True: ...@@ -62,4 +62,8 @@ while True:
else: else:
print("请重新输入1或者2") print("请重新输入1或者2")
continue continue
status = random.randint(1,3) status = random.randint(1,3)
\ No newline at end of file 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