Commit 4ad7945d by BellCodeEditor

save project

parent e7abd30c
Showing with 3 additions and 3 deletions
...@@ -43,13 +43,13 @@ class Player(Hero): ...@@ -43,13 +43,13 @@ class Player(Hero):
self.hp = self.hp + blood self.hp = self.hp + blood
if self.hp > self.max_hp: if self.hp > self.max_hp:
self.hp = self.max_hp self.hp = self.max_hp
print(self.name+"使用治疗术,血量:",blood,"目前的血零为:",self.hp) print(self.name+"使用治疗术,血量增加:",blood,"目前的血量为:",self.hp)
houyi = player("射手","后羿") houyi = Player("射手","后羿")
yase = Hero("垭瑟") yase = Hero("垭瑟")
print(30*'-') print(30*'-')
print(' 战斗开始') print(' 战斗开始')
while True: while True:
print('-'*30 print('-'*30)
choice = input("请选择(攻击1)和(治疗2)") choice = input("请选择(攻击1)和(治疗2)")
if choice == "q": if choice == "q":
print("游戏阵亡") print("游戏阵亡")
......
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