Commit e25f0fd4 by BellCodeEditor

auto save

parent ab87b09c
Showing with 22 additions and 2 deletions
a = 1
b = 1
for i in range(81):
x = a*b
print(x)
a += 1
if a == 9:
b += 1
a = 1
......@@ -8,10 +8,10 @@ class Hero(object):
self.max_hp = self.hp
def cure(self): # 治疗
self.hp += 60
blood = random.randint(30,50)
self.hp += blood
if self.hp > self.max_hp:
self.hp = self.max_hp
print(self.name+"使用了治疗,血量增加:", 60,",目前的血量为:",self.hp)
def combat(self, enemy): # 普通攻击
......@@ -52,6 +52,7 @@ while True:
houyi.combat(yase)
elif choice == '2' :
houyi.cure()
else:
print('SB')
continue
......
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