Commit 70a38340 by BellCodeEditor

save project

parent 9579e038
Showing with 13 additions and 5 deletions
import random
class Hero(object):
def __init__(self, name):
self.name = name
......@@ -38,7 +39,14 @@ class Player(Hero):
houyi = Player("射手", "后羿")
yase = Hero("垭瑟")
houyi.combat(yase)
yase.combat(houyi)
houyi.cure()
yase.cure()
\ No newline at end of file
print('_' * 30)
print(' 战斗开始')
while True:
print('_' * 30)
if input("请选择释放技能(攻击1/治疗2)") == 1:
houyi.combat(yase)
else
houyi.cure()
if round(1,2) == 1:
yase.comba(houyi)
yase.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