Commit e2abeba7 by BellCodeEditor

save project

parent 7c19e12e
Showing with 3 additions and 3 deletions
import random
class Hero(object):
def __init__(self, name):
self.name = name
......@@ -9,7 +9,7 @@ class Hero(object):
self.max_hp = self.hp
def cure(self): # 治疗
self.hp+=60
self.hp+=random.randint(30,50)
if self.hp>self.max_hp:
self.hp=self.max_hp
......@@ -55,7 +55,7 @@ while True:
else:
print("12")
continue
num = randon.randint(1,3)
num = random.randint(1,3)
if num == 1:
yase.cure()
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