Commit 57891a89 by BellCodeEditor

save project

parent 6a99ad7a
Showing with 3 additions and 2 deletions
......@@ -8,10 +8,11 @@ class Hero(object):
self.max_hp = self.hp
def cure(self): # 治疗
self.hp += 60
b=random.randint(30)
self.hp += random.randint(30)
if self.hp > self.max_hp:
self.np=self.max_hp
print (self.name+"使用了治疗术,血量增加60,目前血量为:"+ster(self.hp))
print (self.name+"使用了治疗术,血量增加","b",目前血量为:+"str(self.hp))
def combat(self, enemy): # 普通攻击
info1 = self.name+""+enemy.name+"发起进攻,"
info2 = "造成"+str(self.attack)+"点伤害,"
......
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