Commit 6549c49a by BellCodeEditor

save project

parent de03d5b6
Showing with 27 additions and 2 deletions
import random
class Hero: # 英雄类
def __init__(self, name): # 实例属性
self.name = name
......@@ -44,4 +45,28 @@ print("-" * 60)
print(" " * 28+"战斗开始"+" " * 28)
while True:
print("-" * 60)
choice = input('请选择释放英雄技能(1攻击/2治疗)')
\ No newline at end of file
choice = input('请选择释放英雄技能(1攻击/2治疗/t退出/3逃跑/4udjjsuicedjwcdkcij/5djiskxjcnksjidhuwsjciujw)')
if choice == "1":
后羿.combat(垭瑟)
elif choice == "2":
后羿.cure()
elif choice == "t":
print("滚!!!")
break
elif choice == "3":
print("滚!!!")
break
elif choice == "4":
print("滚!!!")
break
elif choice == "5":
print("滚!!!")
break
else:
print("你有病吧?瞎打。再选一次!")
continue
num = random.randint(1,2)
if num == "1":
垭瑟.combat(后羿)
else:
垭瑟.cure()
\ 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