Commit 0c062487 by BellCodeEditor

save project

parent 831adf9c
Showing with 21 additions and 0 deletions
import random
def __init__ Hero(self):
self.hp = 250
self.max_hp = self.hp
houyi = Player('射手','后羿')
Yase = Hero
def cure(self):
blood = random.randint(30,61)
self.hp += blood
if self.hp > self.max_hp:
self.hp = self.max_hp
print(self.name + '恢复了'+ blood + "点血量,当前血量为" + self.hp)
......@@ -18,3 +31,8 @@ while True:
else:
print("输入错误,请重新输入!")
continue
status = random.randint(1,3)
if status == 1:
yase.combat(houyi)
else:
yase.cure()
\ No newline at end of file
import turtle
\ 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